PSCPUG(1)

NAME
pscpug - represent CPU usage for processes as a graph

SYNOPSIS
pscpug [-gs] [-w delay] pid

DESCRIPTION
pscpug will make a graph the CPU percent usage of a given process id. As samples are taken of the given process, pscpug will scroll the display, showing the most recent percent CPU utilization of the process as a bar across the terminal.

pscpug will stop graphing a process when any key is pressed.

When the process being watched no longer exists, or upon quitting pscpug, various statistics about the process being watched are printed to the terminal.

As pscpug makes a graph of only one specific process, it can be more useful than top(1) to watch how various factors effect the CPU usage of a process at a given time.

pscpug options are as follows:

-g  Gather process information in the most generic way possible. This option is useful if the optimized calls which retrieve process data are unavailable for some reason.

    On some systems, if pscpug is run without elevated privileges, it would be impossible to gather process data. pscpug will automatically revert to this "generic" mode, and may suggest that it be run with the -g in the future.

-s  Suppresses the statistics usually printed when pscpug quits.

-w  Sets the interval, in seconds, of the frequency that pscpug polls the system to gather process data. The default is every two seconds. If set to 0, pscpug will try to continuously gather data on the process, at the expense of taking a (generally) large amount of CPU time itself.

DISPLAY
pscpug makes graphical bars across the terminal to display the percentage being taken by the specified process ID. If the given process is taking an insignificant amount of CPU time -- for example, 0.1% -- pscpug will continue to draw the graph, but no bar will be visible.

pscpug requires a terminal capable of drawing inverse video to make the graph on the terminal. If no such terminal exists, no display will be seen. This will likely be changed in a forthcoming version.

On quitting, the following statistics are printed about a process:

Average CPU percentage
showing the mean of the percent CPU taken by the task.

Maximum CPU percentage
showing the highest sample.

Minimum CPU percentage
showing the lowest sample.

BUGS
pscpug could support more UNIX architectures. The generic mode does not simply work correctly on some esoteric systems.

SEE ALSO
top(1), ps(1)

AUTHOR
Charles Mercadal, <mercadal@diablonet.net>