[Xymon] File Handles

Richard Hamilton rlhamil2 at gmail.com
Sat Aug 8 13:45:27 CEST 2015


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.


On Fri, Aug 7, 2015 at 10:40 PM, Deiss, Mark <Mark.Deiss at xerox.com> 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 [
> Galen.Johnson at sas.com]
> Sent: Friday, August 07, 2015 1:56 PM
> To: Deiss, Mark; Nick at pettefar.com
> 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 <
> Galen.Johnson at sas.com>
> Sent: Friday, August 7, 2015 1:35 PM
> To: Deiss, Mark; Nick at pettefar.com
> 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 <Mark.Deiss at xerox.com>
> Sent: Friday, August 7, 2015 12:03 PM
> To: Nick at pettefar.com; 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 <Galen.Johnson at sas.com> 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
> > <Nick at pettefar.com>
> > 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
> > _______________________________________________
> > Xymon mailing list
> > Xymon at xymon.com
> > http://lists.xymon.com/mailman/listinfo/xymon
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20150808/93c9639f/attachment.html>


More information about the Xymon mailing list