pcp
[Top] [All Lists]

new metrics

To: <pcp@xxxxxxxxxxx>
Subject: new metrics
From: Alan Bailey <abailey@xxxxxxxxxxxxx>
Date: Fri, 11 May 2001 15:36:37 -0500 (CDT)
Sender: owner-pcp@xxxxxxxxxxx
I've made two metrics, and am releasing them to the general public.  I
haven't tested these since last year, so I can't be sure they still
compile and run. :)

One is mounts, which grabs information from /proc/mounts.  Example:

lanner|abailey % pminfo -f mounts

mounts.device
    inst [0 or "/"] value "/dev/root"
    inst [1 or "/boot"] value "/dev/sda2"
    inst [2 or "/afs"] value "AFS"
    inst [3 or "/not-here"] value "none"

mounts.type
    inst [0 or "/"] value "ext2"
    inst [1 or "/boot"] value "ext2"
    inst [2 or "/afs"] value "afs"
    inst [3 or "/not-here"] value "none"

mounts.options
    inst [0 or "/"] value "rw"
    inst [1 or "/boot"] value "rw"
    inst [2 or "/afs"] value "rw"
    inst [3 or "/not-here"] value "none"

mounts.up
    inst [0 or "/"] value 1
    inst [1 or "/boot"] value 1
    inst [2 or "/afs"] value 1
    inst [3 or "/not-here"] value 0

The other is process.running, which takes a config file of root processes,
and returns the number of instances of them:

lanner|abailey % pminfo -f process

process.running
    inst [0 or "sshd"] value 1
    inst [1 or "crond"] value 1
    inst [2 or "inetd"] value 1
    inst [3 or "nfsd"] value 0
    inst [4 or "afsd"] value 9
    inst [5 or "test"] value 0

These are available at:

http://www.ncsa.uiuc.edu/~abailey/pcp/process.tar.gz and
http://www.ncsa.uiuc.edu/~abailey/pcp/mounts.tar.gz

Feel free to check them out.  Give me credit in the code and/or
documentation if you use them.  Although I hope that if people want to use
them, they would get in the PCP distribution and not spread out
haphazardly on people's machines.

Also, feel free to change how they operate if you wish.  They both take a
config file, but some people might not want to depend on a config file.  I
take no ownership of the code, but only a plea that you give credit where
credit is due.

Thanks,
Alan

-- 
 Alan Bailey


<Prev in Thread] Current Thread [Next in Thread>