Operating System - HP-UX
1832649 Members
2955 Online
110043 Solutions
New Discussion

What is the command for getting the details of all the processes using the top command?

 
PrasannaKumari
Contributor

What is the command for getting the details of all the processes using the top command?

I want the top command format with options that gives the details of all the processes running on the system and be directed to a file.
5 REPLIES 5
DeafFrog
Valued Contributor

Re: What is the command for getting the details of all the processes using the top command?

hi Prasanna ,

Put this is cron :
testing:/#more /opt/topscript
echo ====================================== >>/tmp/topout
top -f /tmp/topout
you will get the o/p colleected in /tmp/topout , or which ever u specify

FrogIsDeaf
Suraj K Sankari
Honored Contributor

Re: What is the command for getting the details of all the processes using the top command?

Hi,

Take all output into a file using

top -f top.out

Suraj
Steven E. Protter
Exalted Contributor

Re: What is the command for getting the details of all the processes using the top command?

Shalom,

You might want to look at the ps command

Example script. Look at the ps section for HP-UX

http://www.hpux.ws/?p=8

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com

Re: What is the command for getting the details of all the processes using the top command?

of course top doesn't show you *all* processes.

One might appeare something broadly similar to the top output with ps. Try the following for example:

UNIX95= ps -eo tty,pid,user,pri,nice,vsz,sz,state,time,pcpu,comm | sed 1d | sort -nr -k 10,10

redirect to a file as appropriate... see the man page for ps to understand all the columns

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Jitesh purohit_1
Regular Advisor

Re: What is the command for getting the details of all the processes using the top command?

You can use lsof tool also to know the processes .

http://www.cmve.net/merijn/downloads.html

Thanks
Jitesh