[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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.

Patrick

-- 
Patrick Wiseman
pwiseman@mindspring.com
Linux user #17943


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: