The following was kindly provided by my friend, James. You can find his setup at www.donut-tech.com
I wanted to echo (read: output) some system commands to webpages over time. James has done this as part of a wider project and provided the useful code for TOP. The TOP command displays the processes running and the CPU and Memory commitments, amongst other things.
This code is for a .php page and will execute and return the outputs of /usr/bin/top
<html><head><title>Pi</title></head><body><h1>Pi</h1><br><pre><?system(“/usr/bin/top -b -n 1”);?></pre></body></html>