<div dir="ltr">Nope, Solaris does not put non-process-related info in /proc (no /proc/sys on Solaris).<div><br></div><div>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.</div><div><br></div><div>kstat -p 'unix:0:file_cache:buf_[im]*'<br></div><div><br></div><div>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!).</div><div><br></div><div>Example:</div><div><p style="margin:0px;font-size:18px;font-family:'Andale Mono';color:rgb(234,234,234);background-color:rgb(0,0,0)">$ kstat -p 'unix:0:file_cache:buf_[im]*'</p>
<p style="margin:0px;font-size:18px;font-family:'Andale Mono';color:rgb(234,234,234);background-color:rgb(0,0,0)">unix:0:file_cache:buf_inuse     1248</p>
<p style="margin:0px;font-size:18px;font-family:'Andale Mono';color:rgb(234,234,234);background-color:rgb(0,0,0)">unix:0:file_cache:buf_max       2320</p></div><div><br></div><div>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.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 7, 2015 at 10:40 PM, Deiss, Mark <span dir="ltr"><<a href="mailto:Mark.Deiss@xerox.com" target="_blank">Mark.Deiss@xerox.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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:<br>
<br>
cat /proc/sys/fs/file-nr<br>
<br>
This "should". ahemm.... be OS agnostic.<br>
<span class=""><br>
________________________________________<br>
From: Xymon [<a href="mailto:xymon-bounces@xymon.com">xymon-bounces@xymon.com</a>] on behalf of Galen Johnson [<a href="mailto:Galen.Johnson@sas.com">Galen.Johnson@sas.com</a>]<br>
</span>Sent: Friday, August 07, 2015 1:56 PM<br>
<div class="HOEnZb"><div class="h5">To: Deiss, Mark; <a href="mailto:Nick@pettefar.com">Nick@pettefar.com</a><br>
Cc: xymon<br>
Subject: Re: [Xymon] File Handles<br>
<br>
googling a bit more shows that the /proc filesystem is available on Solaris and there is also the pfiles command.<br>
<br>
=G=<br>
________________________________________<br>
From: Xymon <<a href="mailto:xymon-bounces@xymon.com">xymon-bounces@xymon.com</a>> on behalf of Galen Johnson <<a href="mailto:Galen.Johnson@sas.com">Galen.Johnson@sas.com</a>><br>
Sent: Friday, August 7, 2015 1:35 PM<br>
To: Deiss, Mark; <a href="mailto:Nick@pettefar.com">Nick@pettefar.com</a><br>
Cc: xymon<br>
Subject: Re: [Xymon] File Handles<br>
<br>
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.<br>
<br>
=G=<br>
<br>
________________________________________<br>
From: Deiss, Mark <<a href="mailto:Mark.Deiss@xerox.com">Mark.Deiss@xerox.com</a>><br>
Sent: Friday, August 7, 2015 12:03 PM<br>
To: <a href="mailto:Nick@pettefar.com">Nick@pettefar.com</a>; Galen Johnson<br>
Cc: xymon<br>
Subject: RE: [Xymon] File Handles<br>
<br>
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.<br>
<br>
Basically uses "sar -v 5 2" and processes the last line; 3rd field for linux, 8th field for hpux.<br>
<br>
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.<br>
<br>
-----Original Message-----<br>
From: Xymon [mailto:<a href="mailto:xymon-bounces@xymon.com">xymon-bounces@xymon.com</a>] On Behalf Of Nick Pettefar<br>
Sent: Friday, August 07, 2015 11:28 AM<br>
To: Galen Johnson<br>
Cc: xymon; Nick Pettefar<br>
Subject: Re: [Xymon] File Handles<br>
<br>
Sorry, it will be most likely used under Solaris 10/11.<br>
<br>
Regards,<br>
<br>
Nick<br>
<br>
<br>
On 7 August 2015 at 16:04, Galen Johnson <<a href="mailto:Galen.Johnson@sas.com">Galen.Johnson@sas.com</a>> wrote:<br>
> You'll likely need to write your own test based on this (assuming this is linux):<br>
><br>
> <a href="http://unix.stackexchange.com/questions/66235/how-to-display-open-file" rel="noreferrer" target="_blank">http://unix.stackexchange.com/questions/66235/how-to-display-open-file</a><br>
> -descriptors-but-not-using-lsof-command<br>
><br>
> =G=<br>
><br>
> ________________________________________<br>
> From: Xymon <<a href="mailto:xymon-bounces@xymon.com">xymon-bounces@xymon.com</a>> on behalf of Nick Pettefar<br>
> <<a href="mailto:Nick@pettefar.com">Nick@pettefar.com</a>><br>
> Sent: Friday, August 7, 2015 10:48 AM<br>
> To: xymon<br>
> Subject: [Xymon] File Handles<br>
><br>
> Hi, is there a way to monitor file handle usage - how many open files<br>
> against the maximum allowed, by any chance? - just had a request from<br>
> a user for this and couldn't find a reference in the documentation or<br>
> the Google thing.<br>
><br>
> Regards,<br>
><br>
> Nick<br>
> _______________________________________________<br>
> Xymon mailing list<br>
> <a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
> <a href="http://lists.xymon.com/mailman/listinfo/xymon" rel="noreferrer" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" rel="noreferrer" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" rel="noreferrer" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" rel="noreferrer" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" rel="noreferrer" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
</div></div></blockquote></div><br></div>