Read Me
This directory contains a grab-bag of utilities for exercising and
using microstate accounting.
USING MICROSTATE ACCOUNTING:
ruse -- print usage according to microstate accounting. Usage
similar to time(1), but with no options.
usage -- plot usage at one second intervals. Also save the raw
data to a file. Uses gnuplot to do the plotting, not
useful unless you're on an X display.
Usage:
usage [ -o outputprefix ] [ -l] (pid | cmd args...)
-l -- log only
usage always logs to a file, so that replay can be
used. The name of the file is
(outputprefix)?log-CMD-PID (where CMD is the basename
of the command being tracked, and PID is its
processID).
replay -- replot a usage plot from a log file.
replay -p logfile
plots as fast as it can and then leaves the
graph there. Without -p, the graph is replotted at
one second intervals, exactly as if it had been shown
by the `usage' cmd..
PROGRAMS TO EXERCISE MICROSTATE ACCOUNTING
poll -- calls poll on standard input with a two-second timeout.
spin -- use processor time as fast as possible. Takes one optional
argument, the time to spin for.
spin1 -- spin a percentage of time, using approx 50:50 user and sys.
Usage: spin1 time_in_secs busy
where busy is the proportion in tenths of a percent,
So
spin1 10 500
runs for 10 seconds elapsed, and spins for 50% of the time: it
will use approx 2.5 seconds user and 2.5 system.
time_ruse: time the sys_msa system call.
hog,sh : a shell script to spin.