Jonathan Arbib

Alix 3d3 scripts

by on May.18, 2010, under Gadgets, Tutorials

Simple stats script:

#!/bin/bash
clear
while [ 1 ]
do
 uptime
 df -h | grep Filesystem
 df -h | grep rootfs
 df -h | grep usb
 echo ""
 Temp1=$(cat /sys/bus/i2c/drivers/lm90/0-004c/temp1_input)
 Temp2=$(cat /sys/bus/i2c/drivers/lm90/0-004c/temp2_input)
 echo "MB T  = "$Temp1
 echo "CPU T = "$Temp2
 sleep 1
 clear
done

Insert it in a file. I called it stats.sh

chmod a+x stats.sh

and run with ./stats.sh

It updates every second and returns:

  • uptime with load
  • Disk space and usb disk space
  • MB temp
  • CPU temp

You can add all you want in there or remove what you don’t need :-)

:, , ,

2 Comments for this entry

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...