[Vserver] vserver plugin for collectd

From: Sebastian Harl <sh_at_tokkee.org>
Date: Mon 13 Mar 2006 - 00:40:11 GMT
Message-ID: <20060313004011.GI7646@albany.tokkee.org>

Hi folks,

This e-mail also goes to the linux-vserver mailing list.

For those of you who don't know collectd (probably most guys on the
linux-vserver mailing list ;-), please have a look at
http://verplant.org/collectd/. In short, "collectd is a small daemon which
collects system information every 10 seconds and writes the results in an
RRD-file".

Tonight, I've written a plugin that collects the system ressources used by
VServers (http://linux-vserver.org/). So far, the following data is collected:

       VServer socket msg. accounting (vserver-<xid>/socket.rrd)
             DS:unix_in:COUNTER:25:0:9223372036854775807
             DS:unix_out:COUNTER:25:0:9223372036854775807
             DS:inet_in:COUNTER:25:0:9223372036854775807
             DS:inet_out:COUNTER:25:0:9223372036854775807
             DS:inet6_in:COUNTER:25:0:9223372036854775807
             DS:inet6_out:COUNTER:25:0:9223372036854775807
             DS:other_in:COUNTER:25:0:9223372036854775807
             DS:other_out:COUNTER:25:0:9223372036854775807
             DS:unspec_in:COUNTER:25:0:9223372036854775807
             DS:unspec_out:COUNTER:25:0:9223372036854775807

  This is the in- and outgoing traffic for the listed protocols. Should be
  pretty self-explanatory.

       VServer threads (vserver-<xid>/threads.rrd)
             DS:total:GAUGE:25:0:65535
             DS:running:GAUGE:25:0:65535
             DS:uninterruptible:GAUGE:25:0:65535
             DS:onhold:GAUGE:25:0:65535

  Count of threads in the VServers.

       VServer load (vserver-<xid>/load.rrd)
             DS:avg1:GAUGE:25:0:100
             DS:avg5:GAUGE:25:0:100
             DS:avg15:GAUGE:25:0:100

  System load of the VServers.

       VServer processes (vserver-<xid>/processes.rrd)
             DS:total:GAUGE:25:0:65535

  Count of processes running in the VServers.

       VServer memory usage (vserver-<xid>/memory.rrd)
             DS:vm:GAUGE:25:0:9223372036854775807
             DS:vml:GAUGE:25:0:9223372036854775807
             DS:rss:GAUGE:25:0:9223372036854775807
             DS:anon:GAUGE:25:0:9223372036854775807

  Memory usage of the VServers:
    - vm is the virtual memory
    - vml is locked memory
    - rss (resident set size) is the real physical RAM used
    - anon (anonymous memory) is "memory not backed by any file"

All data is read from /proc/virtual. See
http://linux-vserver.org/HowTo+Read+ProcFS for details. Special thanks goes to
the #vserver IRC channel and especially Bertl and daniel_hozac for their help.

This is somewhat to be regarded as a first draft - I guess, there are still
some things that can be improved or fixed. Beta testers and feedback is very
appreciated. The plugin is available from the subversion repository
(https://subversion.verplant.org/collectd/trunk).

Cheers,
Sebastian

-- 
Sebastian "tokkee" Harl
GnuPG-ID: 0x8501C7FC
http://tokkee.org/

_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver

Received on Mon Mar 13 07:26:48 2006
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Mon 13 Mar 2006 - 07:26:58 GMT by hypermail 2.1.8