VMware Cloud Community
mewzak
Contributor
Contributor

Open File Descriptors

Sorry for the newb question here, but I am trying to monitor my open file descriptors on a series of Linux boxes. I don't see this metric available? Can someone help me out?
Reply
0 Kudos
2 Replies
dougm_hyperic
VMware Employee
VMware Employee

We have this metric for the Process service:

http://support.hyperic.com/confluence/display/DOCSHQ27/Process+service

The metric isn't enabled by default, see the following and follow the
"Show All Metrics" steps:
http://support.hyperic.com/confluence/display/DOCSHQ27/ui-2.5.2.1.2

We don't currently have an Open File Descriptors metric for the
entire system, but I just opened an enhancement to add one:
http://jira.hyperic.com/browse/SIGAR-30

In the meantime, you could implement a script plugin:
http://support.hyperic.com/confluence/display/DOCSHQ27/Script+Plugin

Here's an example script to get the metric on Linux:

#!/usr/bin/perl

open FH, "/proc/sys/fs/file-nr" or die $!;
my($alloc, $free, $max) = split /\s+/, <FH>;
close FH;
my $used = $alloc - $free;

print "Allocated=$alloc\n";
print "Free=$free\n";
print "Max=$max\n";
print "Used=$used\n";

On Jan 16, 2007, at 10:02 AM, mewzak wrote:

> Sorry for the newb question here, but I am trying to monitor my
> open file descriptors on a series of Linux boxes. I don't see this
> metric available? Can someone help me out?
>



Reply
0 Kudos
mewzak
Contributor
Contributor

Thanks very much. This is helpful.
Reply
0 Kudos