This is a blog about me, Seinfeld, okonomiyaki, japanese toilet seats, and other things of interest

Thursday, November 22, 2007

Life, but how to live it?

A few months ago I wanted to write a script that would run top in batch-mode every minute or so to write stats about a server to a log file. The script worked fine when I tested it on the command line, but when run from cron it truncated all lines at 80 characters. This meant that some important information was lost and then I gave up and moved on to something else. After recent events at work I again decided that this script would be useful. Again as I was stumped about the truncating problem until I got help on the bbs.linux.se forums. The solution is to set the COLUMNS environment variable for the top call, e.g
COLUMNS=150 top -bc -n 1 | grep bla >> $LOG_FILE


Apart from finally fixing the truncating problem one highlight this week was to finally find some video footage of Norway's finest, the classic hardcore band Life! But how to live it?. Watching this video it almost feels like Oslo is a suburb of Washington DC:


(Recorded 1991 in Stavanger)

0 Comments:

Post a Comment

<< Home