Kategorien
Uncategorized

Monitoring of max open files in a vserver

Running services on a virtual server sometimes causes problems. I often faced such porblems by reaching the maximum amount of open files. In that case applications like Apache or Postfix fill up their logs with lines like this:

"Too many open files in system"

I wanted to be able to monitor the amount of open files on my server (OpenVZ/ Virtuozzo) to easily see when there were and also when there might be problems. I decided to give Munin a try. Installation and basic Configuration was really simple and what I like very much is that custom plugins can be written very quickly with basic knowlegde of bash or perl.

Attached is my munin plugin. Just copy it to /etc/munin/plugins (in the default installation of munin) and rename it to vserver_open_files. Also add following lines to the file /etc/munin/plugin-conf.d/munin-node, because this plugin needs to run with root privileges.

https://www.schmalenegger.com/files/vserver_open_files.sh

 

[vserver_open_files] user root

 
 
[img_assist|nid=79|title=vserver open files|desc=|link=none|align=center|width=496|height=276] 

 

Running services on a virtual server sometimes causes problems. I often faced such porblems by reaching the maximum amount of open files. In that case applications like Apache or Postfix fill up their logs with lines like this:

„Too many open files in system“

I wanted to be able to monitor the amount of open files on my server (OpenVZ/ Virtuozzo) to easily see when there were and also when there might be problems. I decided to give Munin a try. Installation and basic Configuration was really simple and what I like very much is that custom plugins can be written very quickly with basic knowlegde of bash or perl.

Attached is my munin plugin. Just copy it to /etc/munin/plugins (in the default installation of munin) and rename it to vserver_open_files. Also add following lines to the file /etc/munin/plugin-conf.d/munin-node, because this plugin needs to run with root privileges.

[vserver_open_files] user root

vserver_open_files-day

Here is the link: http://www.schmalenegger.com/files/vserver_open_files.sh

6 Antworten auf „Monitoring of max open files in a vserver“

Better try Zero RRD instead

As you already have some experience with Zero RRD you’d better switch from munin to this one.

You’d be surprised about the latest SVN version. We really made some progress there…

I’ve updated the post with

I’ve updated the post with the download link.

Don’t you think that zero-RRD is a bit overkill to a single server!? Also the development seems to be a bit stucked currently….

this link to your plugin does not work. any chance you can fix?

we are having this same problem and we’d like to take a peek at what you did.

thank you.

Awesome! Thanks for the small plugin. It’s exactly what I need.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.