Re: Monitoring CPU usage of a process
On Sun, 2 Jun 2002, Adar Dembo wrote:
> I have some processes whose cpu usage I would like to monitor, and
> pipe into a file. As far as I know, top can't monitor a single process
> and send its cpu usage into a file
Actually, it can:
#top p <pid>
follows a single process; add the 'b' flag for batch mode, and it produces
output suitable for redirecting to a file or piping to a program:
#top bp <pid> > filename
Use '^C' to stop the process, or the 'n' flag to specify how many
iterations to go through.
Do 'man top' for further detail.
Linux user #17943
To UNSUBSCRIBE, email to email@example.com
with a subject of "unsubscribe". Trouble? Contact firstname.lastname@example.org