Archive for November, 2016

How to log errors of all scripts executed via cron to one file?

To achieve such feature I prepared mix which is to be used in both script and cron The example: crontab -l CRON_ERR=/var/log/overseer.log * * * * * YourScript.sh 2>>$CRON_ERR || echo “[`date`] YourScript.sh” >>$CRON_ERR 2>&1 As I have already mentioned you have to modify your script either #!/bin/bash set -E GLOBAL_ERR=0 trap “GLOBAL_ERR=127” ERR [… […]

Read more...

OS X routing changed by Cisco AnyConnect

If you connect via VPN Cisco client, the routing table is changed. You can see the actual routes with following command: netstat -nr | grep “192.168” # this is my result: 192.168.0/16 10.0.255.208 UGSc 1 0 utun1 192.168.191 link#17 UCS 2 0 utun1 192.168.191.255 link#17 UHWIi 2 2 utun1 192.168.203 link#17 UCS 2 0 utun1 […]

Read more...

What resides in Linux cache? That is the question. How it is related to the docker containers?

Here you will find bunch of the answers; problem solved. https://hoytech.com/vmtouch/ https://github.com/tobert/pcstat # pcstat installation yum install golang.x86_64 go get golang.org/x/sys/unix go get github.com/tobert/pcstat/pcstat # vmtouch installtion git clone https://github.com/hoytech/vmtouch.git cd vmtouch make make install ln -s /usr/local/bin/vmtouch /sbin/ See how the cache looks like (buff/cache position): free -g == Discovery which parts of dockers’ […]

Read more...