vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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. |
| |||
| 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 |
| |||
| On Apr 1, 4:31*am, Dennis Handly <dhan...@convex.hp.com> 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. |
| |||
| On Mar 31, 9:46*pm, newa <DavidLL...@gmail.com> 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. |
| |||
| Dennis Handly <dhandly@convex.hp.com> 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)... |
| |||
| Ulrich Windl wrote: > Dennis Handly <dhandly@convex.hp.com> 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 |
| |||
| 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. |
| |||
| Dennis Handly <dhandly@convex.hp.com> 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 |
| ||||
| 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. |