Re: Monitoring CPU usage of a process
You've probably already thought of this, but would a simple shell script
do the trick...
while [ true ]
ps aux | grep [s]omeprocess >> somelogfile
Note that the using the square brackets around the first letter of the
process name is just a neat trick to stop the grep process itself from
being picked up in the output.
On Sun, Jun 02, 2002 at 07:23:13PM -0700, Adar Dembo wrote:
> Won't gkrellm require X?
> adar@adar:~$ apt-cache show gkrellm
> Package: gkrellm
> Priority: optional
> Section: x11
> Depends: gdk-imlib1, libc6 (>= 2.2.4-4), libglib1.2 (>= 1.2.0),
> libgtk1.2 (>= 1.2.10-4), xlibs (>> 4.1.0)
> Like I said, I have no GUI, this is a completely console-based system.
> No X, no KDE, no GNOME, nothing. Thanks for the suggestion, however.
> -Adar Dembo
> ----- Original Message -----
> From: "David Palmer" <Katipo@WestNet.com.au>
> To: "Adar Dembo" <adar@Stanford.EDU>; <firstname.lastname@example.org>
> Sent: Sunday, June 02, 2002 7:13 PM
> Subject: Re: Monitoring CPU usage of a process
> > Hello,
> > Try gkrellm.
> > Regards,
> > David.
> > On Mon, 3 Jun 2002 09:32, 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, so I'm wondering what
> > > other programs might do this. This is a testing installation, on a
> > > computer without any GUI or anything sophisticated like that. Any
> > > help is greatly appreciated.
> > >
> > > -Adar Dembo
> > --
> > To UNSUBSCRIBE, email to email@example.com
> > with a subject of "unsubscribe". Trouble? Contact
> To UNSUBSCRIBE, email to firstname.lastname@example.org
> with a subject of "unsubscribe". Trouble? Contact email@example.com
To UNSUBSCRIBE, email to firstname.lastname@example.org
with a subject of "unsubscribe". Trouble? Contact email@example.com