Find open file descriptors

Find open file descriptors

Post by Nish » Thu, 08 Nov 2001 18:46:36



Hi All,

I am running HP-UX 10.20/11.I want to know,is there a UNIX command to find
how many "open file descriptors",I have at a particular time.If its not then
how can we find it?

Please help,
Nishant.

 
 
 

Find open file descriptors

Post by Arnold Hendrik » Thu, 08 Nov 2001 20:33:30



Quote:> I am running HP-UX 10.20/11.I want to know,is there a UNIX command to find
> how many "open file descriptors",I have at a particular time.If its not then
> how can we find it?

Why not prevent the loss of this information in the first place? Wrap your
open() and close() calls, and have them maintain a counter. Or are you
also trying to intercept open files not opened by your code, but by libraries
you invoke? (the resolver library might open files)

--

B-Lex Information Technologies, http://www.b-lex.com/

 
 
 

Find open file descriptors

Post by Carl E. Davids » Fri, 09 Nov 2001 10:52:44


    Nish> Hi All, I am running HP-UX 10.20/11.I want to know,is there
    Nish> a UNIX command to find how many "open file descriptors",I
    Nish> have at a particular time.If its not then how can we find
    Nish> it?

You can get binaries of the open source utility lsof(1) at

   ftp://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof/binaries/hpux

for HP-UX 10.20, 11.00, and 11.ii (i.e., 11i). lsof can do what
you're looking for and a lot more.

Regards,
Carl
--

Hewlett-Packard Company, Cupertino, CA
"Monty Python's Complete Waste of Time. That's the most
 appropriately named computer program I've ever heard of."
                            - Jean Davidson

 
 
 

Find open file descriptors

Post by Nish » Fri, 09 Nov 2001 17:29:01


Thanks a lot !!

Nishant.



>     Nish> Hi All, I am running HP-UX 10.20/11.I want to know,is there
>     Nish> a UNIX command to find how many "open file descriptors",I
>     Nish> have at a particular time.If its not then how can we find
>     Nish> it?

> You can get binaries of the open source utility lsof(1) at

>    ftp://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof/binaries/hpux

> for HP-UX 10.20, 11.00, and 11.ii (i.e., 11i). lsof can do what
> you're looking for and a lot more.

> Regards,
> Carl
> --

> Hewlett-Packard Company, Cupertino, CA
> "Monty Python's Complete Waste of Time. That's the most
>  appropriately named computer program I've ever heard of."
>                             - Jean Davidson

 
 
 

Find open file descriptors

Post by Karl-Jose Fille » Tue, 13 Nov 2001 23:12:23


lsof shows the open file,
you should find it on the hp archives, eg,

http://hpux.connect.org.uk/

jose


> Hi All,

> I am running HP-UX 10.20/11.I want to know,is there a UNIX command to find
> how many "open file descriptors",I have at a particular time.If its not then
> how can we find it?

> Please help,
> Nishant.

  josefiller.vcf
< 1K Download
 
 
 

Find open file descriptors

Post by b.. » Wed, 14 Nov 2001 03:33:11



Quote:> I am running HP-UX 10.20/11.I want to know,is there a UNIX command to find
> how many "open file descriptors",I have at a particular time.If its not then
> how can we find it?

  The easiest starting point is sar -v 1
  which shows all the file descriptors that are in use (including
  stdin/stdout, etc) as well as the maximum allowed under the
  current kernel.

--

             ?
           /'^'\
          ( o o )
*====oOOO===(_)===OOOo======*=====================================*
|   Bill Hassell            |  Hewlett-Packard Response Center    |

*======.oooO===(   )========*=====================================*
       (   )    ) /   "There are two types of computer users in the
        \ (    (_/     world...those that have lost data, and those
         \_)           that are going to."        (blh, circa 1972)

 
 
 

1. Finding Open File Descriptors

Is there a way in C/C++ or shell to find the number of open file
descriptors which a process has or that are open on the whole system?

i think there must be because of some other programs I have seen, but I
can't seem to track any libs down which do it.

any help  is appreciated,

thanks

2. KitKat Clock for X?

3. Finding open file descriptors from within a process

4. changing time zone IPMcC

5. how to find the total number of open file descriptors per application

6. Routing samba traffic

7. How can I find the current number of open file descriptors ?

8. dd cdrom problem

9. Finding No. of open file descriptors in a process

10. how to find all open file descriptors

11. How to find out the open file descriptors

12. Find number of open file descriptors?

13. open files/per-process file descriptor