Realtime loggingJune 8, 2011
So first I had to find an application that did what I wanted, i.e. log something.
I decided to use coretemp, which can log to file the cpu speed, temp and load. So I set the settings for coretemp that it should start in the background and log to a file, that’s on the same smb mount as my webroot.
I then wanted something that could show if the feed the user is looking at is realtime or not, this was easily done by comparing the latest datapoint time with current time, minus interval, ( log_unixtimestamp > (time()-10) ), if this returns true, then the data is coming in realtime.