how to find the process that uses the most memory on hp-ux (top doesnot do it) - HP UX

This is a discussion on how to find the process that uses the most memory on hp-ux (top doesnot do it) - HP UX ; Hi, I know on Linux and Solaris you can use top (by default, top lists the processes based on CPU usage) and let it sort the proc list by memory usage. But hp-ux top does not do that. So what ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: how to find the process that uses the most memory on hp-ux (top doesnot do it)

  1. how to find the process that uses the most memory on hp-ux (top doesnot do it)

    Hi,

    I know on Linux and Solaris you can use top (by default, top lists the
    processes based on CPU usage) and let it sort the proc list by memory
    usage. But hp-ux top does not do that. So what can you do on hp-ux to
    find the process that uses the most memory?

    Thanks a lot in advance.

  2. Re: how to find the process that uses the most memory on hp-ux (topdoes not do it)

    newa wrote:
    > But hp-ux top does not do that. So what can you do on hp-ux to
    > find the process that uses the most memory?


    You can send the output to a file and then sort it. You would have
    problems with the M and K suffix though.

    $ top -f top.out -n 10000 -d 1
    $ sort -n -k7,7 top.out

  3. Re: how to find the process that uses the most memory on hp-ux (topdoes not do it)

    On Apr 1, 4:31*am, Dennis Handly wrote:
    > newa wrote:
    > > But hp-ux top does not do that. So what can you do on hp-ux to
    > > find the process that uses the most memory?

    >
    > You can send the output to a file and then sort it. *You would have
    > problems with the M and K suffix though.
    >
    > $ top -f top.out -n 10000 -d 1
    > $ sort -n -k7,7 top.out


    Thanks, Dennis. That really helps.

  4. Re: how to find the process that uses the most memory on hp-ux (topdoes not do it)

    newa a écrit :
    > find the process that uses the most memory?

    With gpm

  5. Re: how to find the process that uses the most memory on hp-ux (topdoes not do it)

    On Mar 31, 9:46*pm, newa wrote:
    > Hi,
    >
    > I know on Linux and Solaris you can use top (by default, top lists the
    > processes based on CPU usage) and let it sort the proc list by memory
    > usage. But hp-ux top does not do that. So what can you do on hp-ux to
    > find the process that uses the most memory?
    >
    > Thanks a lot in advance.



    export Unix95=1
    ps -eo ruser,pcpu,sz,vsz,pid

    You can now sort it by either Vsz or sz as you see fit.

  6. Re: how to find the process that uses the most memory on hp-ux (top does not do it)

    Dennis Handly writes:

    > newa wrote:
    >> But hp-ux top does not do that. So what can you do on hp-ux to
    >> find the process that uses the most memory?

    >
    > You can send the output to a file and then sort it. You would have problems
    > with the M and K suffix though.
    >
    > $ top -f top.out -n 10000 -d 1
    > $ sort -n -k7,7 top.out


    Maybe someday HP ports the Linux version to HP-UX (where you can select the
    sort field interactively)...

  7. Re: how to find the process that uses the most memory on hp-ux (topdoes not do it)

    Ulrich Windl wrote:
    > Dennis Handly writes:
    >
    >> newa wrote:
    >>> But hp-ux top does not do that. So what can you do on hp-ux to
    >>> find the process that uses the most memory?

    >> You can send the output to a file and then sort it. You would have problems
    >> with the M and K suffix though.
    >>
    >> $ top -f top.out -n 10000 -d 1
    >> $ sort -n -k7,7 top.out

    >
    > Maybe someday HP ports the Linux version to HP-UX (where you can select the
    > sort field interactively)...


    This works on all SysV-compatible systems:

    ps -elf | sort -n -k 10,10

    And for HP-UX you should bookmark

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

    Search for Package name top,
    download the top-3.6.1 package for your platform,
    and its dependent packages,
    gunzip and
    swinstall -s /absolute/path/to/package.depot \*

    and start
    /usr/local/bin/top -o size

    provided it installs in /usr/local/bin.

    --
    Michael Tosch @ hp : com

  8. Re: how to find the process that uses the most memory on hp-ux (topdoes not do it)

    Michael Tosch wrote:

    > Search for Package name top,
    > download the top-3.6.1 package for your platform,


    The last time I heard of some that wanted to run the non-HP-UX version
    of top, it wanted to open /dev/kmem. It had to have root but it still
    didn't work.

  9. Re: how to find the process that uses the most memory on hp-ux (top does not do it)

    Dennis Handly writes:

    > Michael Tosch wrote:
    >
    >> Search for Package name top,
    >> download the top-3.6.1 package for your platform,

    >
    > The last time I heard of some that wanted to run the non-HP-UX version of top,
    > it wanted to open /dev/kmem. It had to have root but it still didn't work.


    With ACLs, you could also give selective read permission to /dev/kmem, without
    being "root". THe next OS-Core Update may destroy your permission settings,
    however. As there was a working top program for SunOS decades agao, I see no
    reason why there shouldn't be one for HP-UX...

    Regards,
    Ulrich

  10. Re: how to find the process that uses the most memory on hp-ux (topdoes not do it)

    Ulrich Windl wrote:
    >> It had to have root but it still didn't work.

    >
    > With ACLs, you could also give selective read permission to /dev/kmem, without
    > being "root".


    I said I was root and it still didn't work.

+ Reply to Thread