Xymon Mailing List Archive search

File Handles

8 messages in this thread

list Nick Pettefar · Fri, 7 Aug 2015 15:48:57 +0100 ·
Hi, is there a way to monitor file handle usage - how many open files
against the maximum allowed, by any chance? - just had a request from
a user for this and couldn't find a reference in the documentation or
the Google thing.

Regards,

Nick
list Galen Johnson · Fri, 7 Aug 2015 15:04:01 +0000 ·
You'll likely need to write your own test based on this (assuming this is linux):

http://unix.stackexchange.com/questions/66235/how-to-display-open-file-descriptors-but-not-using-lsof-command

=G=
quoted from Nick Pettefar

From: Xymon <xymon-bounces at xymon.com> on behalf of Nick Pettefar <user-2027539dd102@xymon.invalid>
Sent: Friday, August 7, 2015 10:48 AM
To: xymon
Subject: [Xymon] File Handles

Hi, is there a way to monitor file handle usage - how many open files
against the maximum allowed, by any chance? - just had a request from
a user for this and couldn't find a reference in the documentation or
the Google thing.

Regards,

Nick
list Nick Pettefar · Fri, 7 Aug 2015 16:27:59 +0100 ·
Sorry, it will be most likely used under Solaris 10/11.

Regards,

Nick
quoted from Galen Johnson


On 7 August 2015 at 16:04, Galen Johnson <user-87f955643e3d@xymon.invalid> wrote:
You'll likely need to write your own test based on this (assuming this is linux):

http://unix.stackexchange.com/questions/66235/how-to-display-open-file-descriptors-but-not-using-lsof-command

=G=

From: Xymon <xymon-bounces at xymon.com> on behalf of Nick Pettefar <user-2027539dd102@xymon.invalid>
Sent: Friday, August 7, 2015 10:48 AM
To: xymon
Subject: [Xymon] File Handles

Hi, is there a way to monitor file handle usage - how many open files
against the maximum allowed, by any chance? - just had a request from
a user for this and couldn't find a reference in the documentation or
the Google thing.

Regards,

Nick
list Mark Deiss · Fri, 7 Aug 2015 16:03:21 +0000 ·
Have an external that uses "sar" to figure out the number of open file handles. It has stanzas for Linux and HPUX; if your Solaris box has sar then should be able to add a Solaris stanza.

Basically uses "sar -v 5 2" and processes the last line; 3rd field for linux, 8th field for hpux.

If you want the external, can send it to you off list. It may be malingering as a Big-Brother module on the Dell/Quest/Big-Brother/defunct-deadcat repository. You may also find other modules there that can be modified for your requirements.
quoted from Nick Pettefar

-----Original Message-----
From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Nick Pettefar
Sent: Friday, August 07, 2015 11:28 AM
To: Galen Johnson
Cc: xymon; Nick Pettefar
Subject: Re: [Xymon] File Handles

Sorry, it will be most likely used under Solaris 10/11.

Regards,

Nick


On 7 August 2015 at 16:04, Galen Johnson <user-87f955643e3d@xymon.invalid> wrote:
You'll likely need to write your own test based on this (assuming this is linux):

http://unix.stackexchange.com/questions/66235/how-to-display-open-file
-descriptors-but-not-using-lsof-command
quoted from Nick Pettefar

=G=

From: Xymon <xymon-bounces at xymon.com> on behalf of Nick Pettefar <user-2027539dd102@xymon.invalid>
Sent: Friday, August 7, 2015 10:48 AM
To: xymon
Subject: [Xymon] File Handles

Hi, is there a way to monitor file handle usage - how many open files against the maximum allowed, by any chance? - just had a request from a user for this and couldn't find a reference in the documentation or the Google thing.

Regards,

Nick
list Galen Johnson · Fri, 7 Aug 2015 17:35:35 +0000 ·
It's been a long time since I worked on Solaris but there might even be a way to do it with dtrace.  There was a link for doing something similar using lsof but that required a bit more work.

=G=
quoted from Mark Deiss

From: Deiss, Mark <user-aa18037b3fdc@xymon.invalid>
Sent: Friday, August 7, 2015 12:03 PM
To: user-2027539dd102@xymon.invalid; Galen Johnson
Cc: xymon
Subject: RE: [Xymon] File Handles

Have an external that uses "sar" to figure out the number of open file handles. It has stanzas for Linux and HPUX; if your Solaris box has sar then should be able to add a Solaris stanza.

Basically uses "sar -v 5 2" and processes the last line; 3rd field for linux, 8th field for hpux.

If you want the external, can send it to you off list. It may be malingering as a Big-Brother module on the Dell/Quest/Big-Brother/defunct-deadcat repository. You may also find other modules there that can be modified for your requirements.

-----Original Message-----
From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Nick Pettefar
Sent: Friday, August 07, 2015 11:28 AM
To: Galen Johnson
Cc: xymon; Nick Pettefar
Subject: Re: [Xymon] File Handles

Sorry, it will be most likely used under Solaris 10/11.

Regards,

Nick


On 7 August 2015 at 16:04, Galen Johnson <user-87f955643e3d@xymon.invalid> wrote:
You'll likely need to write your own test based on this (assuming this is linux):

http://unix.stackexchange.com/questions/66235/how-to-display-open-file
-descriptors-but-not-using-lsof-command

=G=

From: Xymon <xymon-bounces at xymon.com> on behalf of Nick Pettefar
<user-2027539dd102@xymon.invalid>
Sent: Friday, August 7, 2015 10:48 AM
To: xymon
Subject: [Xymon] File Handles

Hi, is there a way to monitor file handle usage - how many open files
against the maximum allowed, by any chance? - just had a request from
a user for this and couldn't find a reference in the documentation or
the Google thing.

Regards,

Nick
list Galen Johnson · Fri, 7 Aug 2015 17:56:06 +0000 ·
googling a bit more shows that the /proc filesystem is available on Solaris and there is also the pfiles command.
quoted from Galen Johnson

=G=
From: Xymon <xymon-bounces at xymon.com> on behalf of Galen Johnson <user-87f955643e3d@xymon.invalid>
Sent: Friday, August 7, 2015 1:35 PM
To: Deiss, Mark; user-2027539dd102@xymon.invalid
Cc: xymon
Subject: Re: [Xymon] File Handles

It's been a long time since I worked on Solaris but there might even be a way to do it with dtrace.  There was a link for doing something similar using lsof but that required a bit more work.

=G=

From: Deiss, Mark <user-aa18037b3fdc@xymon.invalid>
Sent: Friday, August 7, 2015 12:03 PM
To: user-2027539dd102@xymon.invalid; Galen Johnson
Cc: xymon
Subject: RE: [Xymon] File Handles

Have an external that uses "sar" to figure out the number of open file handles. It has stanzas for Linux and HPUX; if your Solaris box has sar then should be able to add a Solaris stanza.

Basically uses "sar -v 5 2" and processes the last line; 3rd field for linux, 8th field for hpux.

If you want the external, can send it to you off list. It may be malingering as a Big-Brother module on the Dell/Quest/Big-Brother/defunct-deadcat repository. You may also find other modules there that can be modified for your requirements.

-----Original Message-----
From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Nick Pettefar
Sent: Friday, August 07, 2015 11:28 AM
To: Galen Johnson
Cc: xymon; Nick Pettefar
Subject: Re: [Xymon] File Handles

Sorry, it will be most likely used under Solaris 10/11.

Regards,

Nick


On 7 August 2015 at 16:04, Galen Johnson <user-87f955643e3d@xymon.invalid> wrote:
You'll likely need to write your own test based on this (assuming this is linux):

http://unix.stackexchange.com/questions/66235/how-to-display-open-file
-descriptors-but-not-using-lsof-command

=G=

From: Xymon <xymon-bounces at xymon.com> on behalf of Nick Pettefar
<user-2027539dd102@xymon.invalid>
Sent: Friday, August 7, 2015 10:48 AM
To: xymon
Subject: [Xymon] File Handles

Hi, is there a way to monitor file handle usage - how many open files
against the maximum allowed, by any chance? - just had a request from
a user for this and couldn't find a reference in the documentation or
the Google thing.

Regards,

Nick
list Mark Deiss · Sat, 8 Aug 2015 02:40:37 +0000 ·
If you have /proc available, then check if you have /proc/sys/fs/file-nr. If you do then should be able to get the value using:

cat /proc/sys/fs/file-nr

This "should". ahemm.... be OS agnostic. 
quoted from Galen Johnson

From: Xymon [xymon-bounces at xymon.com] on behalf of Galen Johnson [user-87f955643e3d@xymon.invalid]
Sent: Friday, August 07, 2015 1:56 PM
To: Deiss, Mark; user-2027539dd102@xymon.invalid
Cc: xymon
Subject: Re: [Xymon] File Handles

googling a bit more shows that the /proc filesystem is available on Solaris and there is also the pfiles command.

=G=
From: Xymon <xymon-bounces at xymon.com> on behalf of Galen Johnson <user-87f955643e3d@xymon.invalid>
Sent: Friday, August 7, 2015 1:35 PM
To: Deiss, Mark; user-2027539dd102@xymon.invalid
Cc: xymon
Subject: Re: [Xymon] File Handles

It's been a long time since I worked on Solaris but there might even be a way to do it with dtrace.  There was a link for doing something similar using lsof but that required a bit more work.

=G=

From: Deiss, Mark <user-aa18037b3fdc@xymon.invalid>
Sent: Friday, August 7, 2015 12:03 PM
To: user-2027539dd102@xymon.invalid; Galen Johnson
Cc: xymon
Subject: RE: [Xymon] File Handles

Have an external that uses "sar" to figure out the number of open file handles. It has stanzas for Linux and HPUX; if your Solaris box has sar then should be able to add a Solaris stanza.

Basically uses "sar -v 5 2" and processes the last line; 3rd field for linux, 8th field for hpux.

If you want the external, can send it to you off list. It may be malingering as a Big-Brother module on the Dell/Quest/Big-Brother/defunct-deadcat repository. You may also find other modules there that can be modified for your requirements.

-----Original Message-----
From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Nick Pettefar
Sent: Friday, August 07, 2015 11:28 AM
To: Galen Johnson
Cc: xymon; Nick Pettefar
Subject: Re: [Xymon] File Handles

Sorry, it will be most likely used under Solaris 10/11.

Regards,

Nick


On 7 August 2015 at 16:04, Galen Johnson <user-87f955643e3d@xymon.invalid> wrote:
You'll likely need to write your own test based on this (assuming this is linux):

http://unix.stackexchange.com/questions/66235/how-to-display-open-file
-descriptors-but-not-using-lsof-command

=G=

From: Xymon <xymon-bounces at xymon.com> on behalf of Nick Pettefar
<user-2027539dd102@xymon.invalid>
Sent: Friday, August 7, 2015 10:48 AM
To: xymon
Subject: [Xymon] File Handles

Hi, is there a way to monitor file handle usage - how many open files
against the maximum allowed, by any chance? - just had a request from
a user for this and couldn't find a reference in the documentation or
the Google thing.

Regards,

Nick
list Richard Hamilton · Sat, 8 Aug 2015 07:45:27 -0400 ·
Nope, Solaris does not put non-process-related info in /proc (no /proc/sys
on Solaris).

The following _might_ be what's wanted, but keep in mind that the maximum
isn't necessarily a hard limit; it could grow as needed.

kstat -p 'unix:0:file_cache:buf_[im]*'

No special privileges needed (kstats are readable by anyone), and it will
even work in a zone; but the info will apply to the entire OS, and not be
specific to the zone (no sane way to do that, AFAIK!).

Example:

$ kstat -p 'unix:0:file_cache:buf_[im]*'

unix:0:file_cache:buf_inuse     1248

unix:0:file_cache:buf_max       2320

That was run on Solaris 10 / SPARC; but it works similarly on 9 and 11; I
don't have anything available older than Solaris 9 to try it on.
quoted from Mark Deiss


On Fri, Aug 7, 2015 at 10:40 PM, Deiss, Mark <user-aa18037b3fdc@xymon.invalid> wrote:
If you have /proc available, then check if you have /proc/sys/fs/file-nr.
If you do then should be able to get the value using:

cat /proc/sys/fs/file-nr

This "should". ahemm.... be OS agnostic.

From: Xymon [xymon-bounces at xymon.com] on behalf of Galen Johnson [
user-87f955643e3d@xymon.invalid]
Sent: Friday, August 07, 2015 1:56 PM
To: Deiss, Mark; user-2027539dd102@xymon.invalid
Cc: xymon
Subject: Re: [Xymon] File Handles

googling a bit more shows that the /proc filesystem is available on
Solaris and there is also the pfiles command.

=G=
From: Xymon <xymon-bounces at xymon.com> on behalf of Galen Johnson <
user-87f955643e3d@xymon.invalid>
Sent: Friday, August 7, 2015 1:35 PM
To: Deiss, Mark; user-2027539dd102@xymon.invalid
Cc: xymon
Subject: Re: [Xymon] File Handles

It's been a long time since I worked on Solaris but there might even be a
way to do it with dtrace.  There was a link for doing something similar
using lsof but that required a bit more work.

=G=

From: Deiss, Mark <user-aa18037b3fdc@xymon.invalid>
Sent: Friday, August 7, 2015 12:03 PM
To: user-2027539dd102@xymon.invalid; Galen Johnson
Cc: xymon
Subject: RE: [Xymon] File Handles

Have an external that uses "sar" to figure out the number of open file
handles. It has stanzas for Linux and HPUX; if your Solaris box has sar
then should be able to add a Solaris stanza.

Basically uses "sar -v 5 2" and processes the last line; 3rd field for
linux, 8th field for hpux.

If you want the external, can send it to you off list. It may be
malingering as a Big-Brother module on the
Dell/Quest/Big-Brother/defunct-deadcat repository. You may also find other
modules there that can be modified for your requirements.

-----Original Message-----
From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Nick Pettefar
Sent: Friday, August 07, 2015 11:28 AM
To: Galen Johnson
Cc: xymon; Nick Pettefar
Subject: Re: [Xymon] File Handles

Sorry, it will be most likely used under Solaris 10/11.

Regards,

Nick


On 7 August 2015 at 16:04, Galen Johnson <user-87f955643e3d@xymon.invalid> wrote:
You'll likely need to write your own test based on this (assuming this
is linux):

http://unix.stackexchange.com/questions/66235/how-to-display-open-file
-descriptors-but-not-using-lsof-command

=G=

From: Xymon <xymon-bounces at xymon.com> on behalf of Nick Pettefar
<user-2027539dd102@xymon.invalid>
Sent: Friday, August 7, 2015 10:48 AM
To: xymon
Subject: [Xymon] File Handles

Hi, is there a way to monitor file handle usage - how many open files
against the maximum allowed, by any chance? - just had a request from
a user for this and couldn't find a reference in the documentation or
the Google thing.

Regards,

Nick