-
Notifications
You must be signed in to change notification settings - Fork 1
Linux HW Testing
As you would expect there are a lot of tools available for linux which can be used to test hardware. The following details some specifics.
Provides a sensors app which if your system is configured correctly will find and show data based on your sensors. Utilises /sys/class/hwmon to parse and find your sensors.
Yocto lmsensors recipe: http://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-bsp/lm_sensors?h=sumo
Also provides a daemon that can be configured to monitor your device so you can watch things over time.
Man pages give reasonable details on sensors and associated apps. https://www.systutorials.com/docs/linux/man/5-sensors.conf/
Sensord is lmsensors daemon which uses libsensors to monitor its configured sensors over a period of time and saves data to an 'rrd' database, which is created using rrdtool which is simply a perl based 'round robin' logger, hence the r-r-d (round robin database).
Once you have setup libsensors with /etc/config/sensor.d/my-machine.conf, install sensord (if using yocto, use its defaults to start with). Start the daemon
# sysvinit systems: /etc/init.d/sensord start
Let it run for a period, and run the following to create the sensord cgi file.
sensord --load-average --rrd-file /var/lib/sensord.rrd --rrd-cgi /var/www/sensord > sensord.cgi
Assuming you don't have rrd-cgi on your target, copy the database off your target system to your desktop into /var/lib/ (you can probably copy it elsewhere, but the above cgi will assume its at /var/lib)
On your desktop (or on target if you have rrd-cgi and a web browser on it), run the following.
/var/www/sensord$ sudo rrdcgi -f sensord.cgi
This will create the image files for you to serve. Copy the stdout to a file, say sensord.html and serve /var/www/sensord on your web browser. (you only need to save the html once if you don't change the sensord settings)
If all went well you'll see a web page with a bunch of graphs for a weeks worth of data. This data was extracted from your rrd file, so if something went wrong, quite probably files were not in the right place.