pre-pend log timestamp

Adds a timestamp before alog from a script awk -v sec=$(date -u +%s) '{print strftime("%Y-%m-%d %H:%M:%S",sec), $0; fflush();}' in cron : awk -v sec=$(date -u +\%s) '{print strftime("\%Y-\%m-\%d \%H:\%M:\%S",sec), $0; fflush();}' So : # echo hello world | awk -v sec=$(date -u +%s) '{print strftime("%Y-%m-%d %H:%M:%S",sec), $0; fflush();}'   2014-10-30 08:40:26 test nJoy 🙂

Fix Raid on LSI controllers when a disk is shown as ubad

This can be done with both megacli and storcli. Since the way forward is storcli this how to will be based on that.   storcli /c0 show all   Drive Information : =================   ——————————————————————————- EID:Slt DID State DG Size Intf Med SED PI SeSz Model Sp ——————————————————————————- 8:1 7 Onln 0 465.25 GB SATA HDD […]

How to test varnish vcl file

Unlike most other configuration systems varnish went with a compiled configuration so if there is a mistake all you get is :   Starting varnish HTTP accelerator: [FAILED] To check what the problem is use the following : varnishd -C -f default.vcl varnishd -C -f default.vcl Message from VCC-compiler: Expected return action name. (input Line […]