Thank you but I already know that script. However, I am looking at something more simple, just to show network usage.
If you have a shell command you can use the command 'uptime' to find out the CPU loads. If you are allowed to run PHP scripts that can call system calls (or issue commands as one would do on a terminal) uptime would work for CPU. As for network usage, sometime you can get a url to the graph of the usage from your hosting company. You could use awstats or some site analysis tool and run it every few minutes to construct new report with the new usage, but is impractical for busy sites.
I thought webalizer wasn't real time-- that it runs once a day or so on the log files. One way to get current CPU load is to make a cron job that runs
and parses the correct value to a file. Then read this file and show the correct image or some symbol corresponding to the value of the cpu load.
To get network activity information use the
command which gives a buch of information about your network interfaces (commonly ethernet cards). What you should be interested in is the number of transmistted (TX) and received (RX) bytes. Make a cron job that runs every x amount of time. Everytime the script is run the amount of transmitted and received bytes should be recorded and from it you should subtract the previous received and transmitted bytes and divide that by the amount of time in seconds. You now have the average number of bytes per second, which should be compared to the total byte capacity of the server's link to the internet. From here it should make sense what to do next.
I hope this helps... but it may be easier simpler to just do it yourself (as I outlined above) than to get as one feature of many in a larger program.