1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222
|
PROCMETER V2.5.1
================
A performance metering/logging program for Linux.
Displays statistics direct from /proc on the local machine.
Usage: procmeter [-h] [-update u [lu]]
[-horizontal|-vertical] [-label <label>]
[(-log|-logonly) (<filename>|syslog|-)]
[-data <filename>]
[-force-spkt] [-force-fpkt]
[options ...]
-h Print out a help message.
-update u [lu] The time interval between display updates in seconds.
The optional second argument multiplied by the first is
the log file update interval.
-horizontal Display a horizontal arrangement of meters.
-vertical Display a vertical arrangement of meters.
-log <filename> Write the statistics to the named file.
-logonly <filename> The same as '-log' but do not display a graph.
(If '-' is used here then the logs go to standard out.)
(If 'syslog' is used here then the logs go to system log.)
-label <label> Use label in the window and logfile instead of hostname.
-data <filename> Specifies a named pipe to read additional data from.
-force-spkt Force spkt statistics even if not auto-detected.
-force-fpkt Force fpkt statistics even if not auto-detected.
options ... One or more of the statistics options below.
Available statistics are in a number of classes
Processes:
cpu % Total cpu usage
cpu-user % cpu used by user processes
cpu-nice % cpu used by niced processes
cpu-sys % cpu used by system processes
cpu-idle % cpu unused
load System load
proc The number of processes (kernel version >1.2)
fork The rate at which processes are created (kernel version >1.2)
context Number of context switches
Virtual Memory:
swap Amount of swapping
swap-in Amount of swap in
swap-out Amount of swap out
page Amount of paging
page-in Amount of page in
page-out Amount of page out
Hardware:
disk Amount of disk accesses
disk-rd Amount of disk read accesses
disk-wr Amount of disk write accesses
intr Number of interrupts
Memory:
mem-free MB Amount of free memory
mem-used MB Amount of used memory
mem-buff MB Amount of buffer memory
mem-cache MB Amount of disk cache memory (kernel version >2.0)
mem-avail MB Amount of memory free or in disk cache.
mem-swap MB Amount of swap space used
Network:
[ There are three types of network interfaces ]
[ Local - lo and dummy. ]
[ Slow - slip, ppp, plip, flip, isdn, ippp. ]
[ Fast - eth etc., all those not covered by the above. ]
lpkt The number of packets (local)
lbyte The number of bytes (local) (kernel version > 2.1.28)
fpkt The number of packets (fast)
fpkt-rx The number of received packets (fast)
fpkt-tx The number of transmitted packets (fast)
fbyte The number of bytes (fast) (kernel version > 2.1.28)
fbyte-rx The number of received bytes (fast) (kernel version > 2.1.28)
fbyte-tx The number of transmitted bytes (fast) (kernel version > 2.1.28)
fpkt-coll The number of collisions (fast)
spkt The number of packets (slow)
spkt-rx The number of received packets (slow)
spkt-tx The number of transmitted packets (slow)
sbyte The number of bytes (slow) (kernel version > 2.1.28)
sbyte-rx The number of received bytes (slow) (kernel version > 2.1.28)
sbyte-tx The number of transmitted bytes (slow) (kernel version > 2.1.28)
Power Management:
batt-life % Remaining battery life.
batt-lvl Battery level (one of four states: high, low, critical, unknown).
Log Files
---------
The log file that is written out contains the data for the graphs that are
displayed in the window (or specified on the command line if using '-logonly').
The format of the file containts three types of line as follows:
First line: A header comment indicating the machine name and time started.
Second line: A comment indicating which statistics are in the file (in order).
Third line: The current time (UNIX time_t) then the statistics (in order).
The third type of line repeats at the interval specified.
When a new statistic is added or one is removed the second type of line is
repeated with the new information.
A perl script called procmeter-xlog is included in the distribution that allows
a single statistic to be extracted from the log file for using in a graph for
example. There is a single blank line for the periods of time when the named
statistic is not available.
User Defined Statistics
-----------------------
It is now possible to add in your own statistics and get them displayed on
ProcMeter. These are indicated by the -data command line parameter (of which
there can be any number). Each file must be always readable, a named pipe or a
regular file or ProcMeter will lock up waiting. The format of the data in the
data file is one statistic per line, integer valued. A definition file (with
the same name as the datafile with .def appended, or replacing .dat) contains
the information that ProcMeter needs to be able to display the information.
Each line in the definition file that is not a comment ('#' in column zero) must
contain three values, the name of the statistic for the menu, the name of the
units and the interval for the graph.
An example is in the pipedemo program, you can do the following to try it out:
make demo
start-procmeter pipedemo -- cpu sine
The start-procmeter script starts up ProcMeter with any number of other
programs (specified as command line arguments) feeding data to it via temporary
pipes that are created in /tmp. Exiting ProcMeter or interrupting the script
will kill all of the pipe programs and delete the temporary pipes that were used
for the connections.
The contrib directory contains a number of programs / scripts that can be used
with ProcMeter to provide statistics.
Installation
------------
Edit the Makefile to set the paths for installation (INSTDIR), the X Windows
directory (XINCLUDE,XLIB) and the compiler options (CC,CFLAGS). You can also
set the syslog facility (SYSLOG_FACILITY, default=LOG_LOCAL7) and priority
level (SYSLOG_PRIORITY, default=LOG_INFO) used with the '-log syslog' option.
make procmeter
make install
And all should be OK.
When installed, the environment variable XFILESEARCHPATH or XUSERFILESEARCHPATH
should be set to $(INSTDIR)/lib/app-defaults/%N to see the installed X resources.
The manual page gives more details on how to use the program.
If you want to compile a version that does not use X-Windows at all then
make procmeter-no-x
make install-no-x
This will install a version that does not use X Windows which will be called
procmeter-no-x.
But this will install the contrib directory to a different location so it is not
possible to have both procmeter and procmeter-no-x installed at the same time.
Author & Copyright
------------------
Andrew M. Bishop
Procmeter Version 2.x Written July-Aug-Sep 1996/July-Aug 1997/Dec 1997-Jan 1998
/Sept 1998/Feb 1999
Procmeter Version 1.x Written Dec 1994/July 1995/Feb 1996
email: amb@gedanken.demon.co.uk [Please put procmeter in the subject line]
This program is Copyright Andrew M. Bishop 1994,95,96,97,98,99
and distributed under GPL.
Thanks To
---------
Joey Hess for helping beta test version 2.3.
Mark Bakke for the code for the -label option.
Marc Merlin for providing the code for logging to syslog, helping me sort out
the time leap problems and beta testing the apm code.
All those who flooded me with bug reports and suggestions after the release of
previous versions of ProcMeter.
|