python-diamond / Diamond

Diamond is a python daemon that collects system metrics and publishes them to Graphite (and others). It is capable of collecting cpu, memory, network, i/o, load and disk metrics. Additionally, it features an API for implementing custom collectors for gathering metrics from almost any source.
http://diamond.readthedocs.org/
MIT License
1.74k stars 601 forks source link

Run lsof with sudo, so that the reported numbers are not 0 #644

Closed NotSqrt closed 1 year ago

NotSqrt commented 7 years ago

Hi !

I've discovered that the numbers reported by filestat were always 0, expect for the user running diamond. So typically a problem of permissions.

My solution: add use_sudo option, and the sudoers config to make it work without passwords.

I faced this issue on a ubuntu 12.04 machine.

Thanks !