[collectd] Plugin for monitoring number of open files

wondra wondra at volny.cz
Sun Mar 25 15:55:36 CEST 2012


Greetings.
What's your opinion on the attached script? I calls lsof and extracts the
number of open file descriptors, TCP and UDP sockets. It was inspired by the
systemgraph package and exec wiki page, but uses unixsock through netcat,
because of the need to run lsof as root. Runs on Debian and Gentoo with
netcat6 or openbsd-netcat.
Any ideas on how to do this more efficiently? We have a server with 360000
open files and lsof runs for over 10 seconds there...
Someone add it to the wiki if you find it useful.
Tomas Vondra, member of CTU FEE, not a member of the list :-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lsofscript.sh
Type: application/octet-stream
Size: 748 bytes
Desc: not available
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20120325/2f076576/attachment.obj>


More information about the collectd mailing list