I have recently added in the development branch the logging of sensors for both psensor and psensor-server. I still think that it is better to use a simple shell script or a dedicated tool like sensord for this purpose. Anyway, I have received a high number of requests for this feature, so I have finally decided to add it.
For psensor-server the logging is enabled by the option --sensor-log-file.
For psensor the logging is enabled by the option ‘Enable log of measures’ ( Psensor menu > Preferences > Sensors tab ) and the file is $HOME/.psensor/sensors.log.
Here is an example:
I,1346757494,0.7.0.x
S,lmsensor coretemp-isa-0000 Physical id 0,101
S,lmsensor coretemp-isa-0000 Core 0,101
S,lmsensor coretemp-isa-0000 Core 1,101
S,lmsensor f71889a-isa-0290 fan1,102
S,lmsensor f71889a-isa-0290 fan3,102
S,lmsensor f71889a-isa-0290 temp1,101
S,lmsensor f71889a-isa-0290 temp2,101
S,lmsensor f71889a-isa-0290 temp3,101
S,hdd /dev/sda,4401
S,hdd /dev/sdc,4401
S,nvidia GPU0,201
S,cpu usage,800
34,40.0,39.0,39.0,761.0,519.0,40.0,46.0,38.0,33.0,40.0,53.0,29.4
44,41.0,38.0,,766.0,515.0,,,,,,,28.2
54,40.0,39.0,,758.0,519.0,39.0,,,,,,27.7
64,,,40.0,,517.0,,,,,,,27.7
74,41.0,40.0,,761.0,515.0,40.0,,,,,,28.1
The log format is described in the manpage of psensor-server.
A binary format or a even a database is better for performance and data size but it increases the difficulty to read it from a shell script so I have adopted a tradeoff with a text format using a couple of very simple optimization.
The exact format may evolve before the 0.7.0.4 version. Until this release, you can give it a try by compiling psensor directly from the SVN source repository or using the daily build PPA for Ubuntu.