Hi, thanks for replying. Here is the weird thing. If i execute this PHP script in a terminal box as root, it runs perfect fine.
However, if its setup to run by crontab, it gives that error.
Thanks for the suggestion on uptime. It doesn't seem to be working on my server, it just says 0.00, 0.00, 0.00 every time when I execute uptime.
The top command is more what I need, cause it gives the cpu load by user, system, nice and idle.