Professional Web Applications Themes

Displaying Open File Descriptors for a Process - Linux / Unix Administration

Is there a system command a user can execute to display the current number of file descriptors a process is using? Thanks, Peter...

Sponsored Links
  1. #1

    Default Displaying Open File Descriptors for a Process

    Is there a system command a user can execute to display the current
    number of file descriptors a process is using?

    Thanks,

    Peter
    Sponsored Links
    Peter von Zirpolo Guest

  2. #2

    Default Re: Displaying Open File Descriptors for a Process

    [email]pvzworld.std.com[/email] (Peter von Zirpolo) writes:
    > Is there a system command a user can execute to display the current
    > number of file descriptors a process is using?
    >
    pfiles(1) on Solaris (it is a part of OS) or more general, lsof(1) will
    show you the fd open. Pipe to wc to get the number.

    Bye, Dragan

    --
    Dragan Cvetkovic,

    To be or not to be is true. G. Boole No it isn't. L. E. J. Brouwer

    !!! Sender/From address is bogus. Use reply-to one !!!
    Dragan Cvetkovic Guest

  3. #3

    Default Re: Displaying Open File Descriptors for a Process

    Hi,

    On linux systems you can go to /proc/<pid>/fd directory. <pid> is the
    process number

    example

    /proc/12345/fd

    Johan

    "Peter von Zirpolo" <pvzworld.std.com> schreef in bericht
    news:437a48ce.0401230711.6a4a4002posting.google.c om...
    > Is there a system command a user can execute to display the current
    > number of file descriptors a process is using?
    >
    > Thanks,
    >
    > Peter

    Johan Guest

  4. #4

    Default Re: Displaying Open File Descriptors for a Process

    Dragan Cvetkovic <meprivacy.net> wrote in message news:<lmad4e1ypt.fsfprivacy.net>...
    > [email]pvzworld.std.com[/email] (Peter von Zirpolo) writes:
    >
    > > Is there a system command a user can execute to display the current
    > > number of file descriptors a process is using?
    > >
    >
    > pfiles(1) on Solaris (it is a part of OS) or more general, lsof(1) will
    > show you the fd open. Pipe to wc to get the number.
    >
    > Bye, Dragan
    Please read the A to Q 3.19 in the lsof FAQ to learn why
    piping lsof output to wc is a temptation to be avoided.

    Vic Abell, lsof author
    Vic Abell Guest

  5. #5

    Default Re: Displaying Open File Descriptors for a Process

    "Johan" <meknoware.nl> wrote in message news:<1012fndr31eve2dcorp.supernews.com>...
    > Hi,
    >
    > On linux systems you can go to /proc/<pid>/fd directory. <pid> is the
    > process number
    >
    > example
    >
    > /proc/12345/fd
    This also works on Solaris.

    - jonathan
    Jonathan Adams Guest

  6. #6

    Default Re: Displaying Open File Descriptors for a Process

    [email]abepurdue.edu[/email] (Vic Abell) writes:
    > Dragan Cvetkovic <meprivacy.net> wrote in message news:<lmad4e1ypt.fsfprivacy.net>...
    >> pfiles(1) on Solaris (it is a part of OS) or more general, lsof(1) will
    >> show you the fd open. Pipe to wc to get the number.
    >>
    >> Bye, Dragan
    >
    > Please read the A to Q 3.19 in the lsof FAQ to learn why
    > piping lsof output to wc is a temptation to be avoided.
    >
    > Vic Abell, lsof author
    Hm, now that you have mentioned it, I don't even have to read the FAQ to
    understand the problem.

    Bye, Dragan

    --
    Dragan Cvetkovic,

    To be or not to be is true. G. Boole No it isn't. L. E. J. Brouwer

    !!! Sender/From address is bogus. Use reply-to one !!!
    Dragan Cvetkovic Guest

Similar Threads

  1. File Descriptors
    By Jim Bo in forum Linux / Unix Administration
    Replies: 1
    Last Post: August 18th, 04:16 PM
  2. Open file, make changes, save file, close, re-open, file contents not changed
    By brock@bergdesign.com in forum Adobe Illustrator Macintosh
    Replies: 7
    Last Post: March 7th, 07:29 PM
  3. select() max number of file descriptors
    By Charles Wilkins in forum UNIX Programming
    Replies: 5
    Last Post: August 8th, 06:39 PM
  4. Saving file descriptors
    By Peteris Krumins in forum UNIX Programming
    Replies: 4
    Last Post: July 24th, 12:51 PM
  5. increasing file descriptors (Solaris 8) on the fly
    By Oscar del Rio in forum Sun Solaris
    Replies: 0
    Last Post: June 24th, 04:44 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139