Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

file descriptors question

  • 13-01-2006 07:14PM
    #1
    Registered Users, Registered Users 2 Posts: 4,228 ✭✭✭


    Ok on linux and unix you can see the number of file descriptors open by a process and whether they are sockets or pipes by doing a ls -l in /proc/<pid>/fd

    Does anyone know how to get the equivalent info in HP-UX???
    There is no /proc ....


Comments

  • Registered Users, Registered Users 2 Posts: 4,228 ✭✭✭Scruff


    *bump*
    or at the least how to find the total number of file descriptors open on a hp-ux machine?


  • Registered Users, Registered Users 2 Posts: 354 ✭✭AndrewMc


    Try "lsof", which lists all open files on a system. The man page says it works with (among many others) HP-UX 11.00, 11.11 and 11.23.


  • Registered Users, Registered Users 2 Posts: 4,228 ✭✭✭Scruff


    Yup, just after finding that myself. Thanks for replying anyway!
    Its just a matter of parsing the output to get what i need now.
    /edit one problem with the difference between the linux and hp-ux lsof is that the linux one tells you in the NAME if it is a pipe or socket, HP-UX doenst tell you at all.

    next question is how to list all the child processes\threads belonging to a process???
    On linux i was using
    /bin/ps h -emwwo pid,ppid | grep <pid of process>
    

    this doesnt work on hp-ux, even when setting the UNIX98=true or UNIX95=true.

    The best i've managed is to jus get the pid of the process i want to monitor and its ppid but not any child processes of the one i want to monitor. Used the following command:
    UNIX95=true /bin/ps -A -o pid,ppid | grep <pid>
    


Advertisement