Skip to main content

Posts

Showing posts from February, 2007

Ubuntu beginnings

After days of false starts with Ubuntu 6.10, a move to 6.06LTS made all the difference and I'm now making my first blog entry as a Linux user. Neither the Edgy Eft i386 version at work nor the AMD64 version at home ever worked usably, but Dapper Drake is humming along on the live CD. Next steps, which I hope go as smoothly as today's attempt, are to load it onto two hard drives.

Codewalkers Tutorials

From strings to this on codewalkers. /* Author: Andrew Walsh Username: Andrew Email: andrew@walshdev.com Url: http://walshdev.com */ $uptime = @exec('uptime'); preg_match("/averages?: ([0-9\.]+),[\s]+([0-9\.]+),[\s]+([0-9\.]+)/",$uptime,$avgs); $uptime = explode(' up ', $uptime); $uptime = explode(',', $uptime[1]); $uptime = $uptime[0].', '.$uptime[1]; $start=mktime(0, 0, 0, 1, 1, date("Y"), 0); $end=mktime(0, 0, 0, date("m"), date("j"), date("y"), 0); $diff=$end-$start; $days=$diff/86400; $percentage=($uptime/$days) * 100; $load=$avgs[1].",".$avgs[2].",".$avgs[3].""; $page=' Server Statistics For '.getenv('SERVER_NAME').' Server Details Server Statistics     Name:  '.getenv('SERVER_NAME').' Uptime (days): '.$uptime.' Port: '.getenv('SERVER_PORT&