Summary : Number of open files on Solaris 8

From: Bigadmin <bigadmin_at_unixplanet.biz>
Date: Sat Dec 20 2008 - 22:40:08 EST
Thanks every one for responding.

Every one answered 'pfiles' and here is some of the tips that I found
interesting.

First and most important part that is mentioned by Gerhard from pfiles man
page:
These proc tools stop their target processes while  inspecting  them  and
reporting  the  results:
A process can do nothing while it is stopped which might cause running
processes freeze
Especially if you are dealing with production data base, or even it might
freeze 
An active xwindows or ssh session.


Note: I personally ran ptree on java applications and never had any problem,

      but I ran it only on one process and not on all processes in system.
      

Thanks to Eric for providing this one line script to calculate the number of
open files on system.
ps -e | awk '{ print $1 }' | xargs -i pfiles {} | grep S_IFREG | wc -l

I didn't ran it on our production server and don't see any dead process a
test server that I ran it on
But the number was different to lsof output. 
If anyone knows what S_IFREG stands for , please let me know.

And finally casper mentionded that:
We don't keep a count (Solaris has no limit on the number of open files)

In truss output, error was happening right after getrlimit64
So  I was thinking the problem is related to number of open files
And still I am not sure about it as our problem is not resolved yet
But Casper suggested as follow :

Which error? The application tries to close some file descriptors but they
are not open.  Not an error, really.


Once again thanks every one for quick reply
 


-----Original Message-----
From: bigadmin@unixplanet.biz [mailto:bigadmin@unixplanet.biz] 
Sent: Wednesday, December 17, 2008 3:40 PM
To: sunmanagers@sunmanagers.org
Cc: bigadmin@unixplanet.biz
Subject: Number of open files on Solaris 8

We have not installed lsof on one of our servers
and I am trying to find number of open files

I tried following command, but got no result:

ls -la /proc/0/fd
total 3
dr-x------   2 root     root          48 Dec  7 01:17 .
dr-x--x--x   5 root     root         736 Dec  7 01:17 ..

is there any other way to find the number of open files ?
I am having problem starting a software and truss output shows
following error message:

sysconfig(_CONFIG_CLK_TCK)                      = 100
times(0xFFBEF938)                               = 89958319
         utim=0      stim=2      cutim=0      cstim=0      (HZ=100)
getuid()                                        = 0 [0]
getpid()                                        = 29692 [29691]
getrlimit64(RLIMIT_NOFILE, 0xFFBEF9D8)          = 0
         cur = 1024  max = 4096
brk(0x00056000)                                 = 0
close(3)                                        Err#9 EBADF
close(4)                                        Err#9 EBADF
close(5)                                        Err#9 EBADF
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Sat Dec 20 22:40:27 2008

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:44:13 EST