Sample code/Sh/Status Information

How To Use Shell Scripts
These simple scripts allow you to monitor the status of important information on your gumstix via command line or the web.

To use these scripts: --> /var/www/cgi-bin/ (for web access) --> /usr/bin/ (for general command line use from any directory)
 * copy their contents to a new file
 * save it with a sensible name like
 * make the file executable via
 * test it by typing
 * put it somewhere useful:

Network Status (Web Usable)
echo -e 'HTTP/1.1 200 OK\r\nContent-type: text/plain\r\n\r\n' echo -e '\n *  ifconfig Data  *  \n' /sbin/ifconfig
 * 1) !/bin/sh

echo -e '\n *  iwconfig Data  *  \n' /sbin/iwconfig

Processor Status (Web Usable)
echo -e 'HTTP/1.1 200 OK\r\nContent-type: text/plain\r\n\r\n'
 * 1) !/bin/sh

echo -e '\n\n *  CPU Load Average (in %)  *  \n' echo -e '1Min 5Min 15Mn Thrd Proc' cat /proc/loadavg

echo -e '\n\n *  CPU Info  *  \n' cat /proc/cpuinfo

echo -e '\n\n *  Current Processes  *  \n' ps -ef

Memory Status (Web Usable)
echo -e 'HTTP/1.1 200 OK\r\nContent-type: text/plain\r\n\r\n' echo -e '\n\n *  Memory Status  *  \n' cat /proc/meminfo
 * 1) !/bin/sh

Kernel Status (Web Usable)
echo -e 'HTTP/1.1 200 OK\r\nContent-type: text/plain\r\n\r\n' echo -e '\n *  Kernel Messages  *  \n' dmesg
 * 1) !/bin/sh