In this MP* you will create a shell script that will generate a web page summarizing how the system resources are being used.
Background
A shell scipt has been created that generates a summary of the utilization of the system processor. This script uses a utility called mystats (available here) that reports per-processor statistics in tabular form. The script is shown below:
The script generates two files:
/tmp/mpstats - this file contains processor statistics collected every 30 seconds for 1 second. The file contains at a maximum 1 hours worth (120 entries) of processor statistics.
/tmp/mpdates - this file contains the date and time each of the values in /tmp/mpstats was collected. Maximum of 120 entries.
The format of the files is as follows.
/tmp/mpstats
Tue Mar 16 18:21:03 CST 1999 Tue Mar 16 18:21:35 CST 1999 ... Tue Mar 16 19:22:36 CST 1999 Tue Mar 16 19:23:07 CST 1999
/tmp/mpstats
0 41 0 0 250 49 202 75 0 0 0 2899 96 3 0 1 0 41 0 0 215 15 81 32 0 0 0 2242 98 2 0 0 ...
0 42 0 0 240 37 103 38 0 0 0 2143 96 4 0 0 0 41 0 0 353 140 103 39 0 0 0 2406 97 3 0 0
The columns of interest are the last four in the /tmp/mpstats file. These columns contain the following information:
usr - percent user time
sys - percent system time
wt - percent wait time
idl - percent idle time
The Task
What You Will Turn In
A sheet containing your name, assignment number, course name, link to cgi/bin script (like http://mathcssun(1).emporia.edu/~ppalmsha/mp9.cgi) and a listing the script.
Example Web Page
