Monitoring CPU Process Usage
Scott Bowling
sbowling at bowlingkyler.com
Mon Nov 11 13:26:29 CST 2002
Hmm, actually I had a brain fart too early in the morning. I DON¹T work
with VMS, I work with MVS in my day job (OS 390). I may be mucking up terms
here as I'm just one of those boring COBOL Programmers at DST :) (that's
why I program on Linux at home to keep my sanity :)).
I thought about just letting it pass by but just couldn't...
On 11/11/02 6:34 AM, "Scott Bowling" <sbowling at bowlingkyler.com> wrote:
> Yeah, in a way you caught me. I work with VMS for my day job and would like
> to be able to monitor my personal projects on linux.
>
>
> On 11/11/02 5:01 AM, "Duane Attaway" <dattaway at attaway.net> wrote:
>
>> On Sun, 10 Nov 2002, Scott Bowling wrote:
>>
>>> Would it be possible to write some sort of process monitoring system
>>> that is capable of retrieving this information after the process ends
>>> (or maybe right before the process ends)?
>>
>> There is a nifty little utility called time. It calculates resources used
>> by the following program. For example, if I wanted to know how much time
>> it took to check my disk usage:
>>
>> dattaway at satellite portage $ time df
>> Filesystem 1K-blocks Used Available Use% Mounted on
>> /dev/hda2 28241692 21261976 5545112 80% /
>> tmpfs 1024 196 828 20% /mnt/.init.d
>> attaway.net:/ 157076808 128794768 20302960 87% /t
>>
>> real 0m0.078s
>> user 0m0.000s
>> sys 0m0.000s
>>
>> It took 78 milliseconds of time between invocation and termination. CPU
>> and SYS time were insignificant in this case. You can even format time's
>> output any way you wish for scripting. More about this from the man page.
>>
>> I often build the kernel followed by the time command to see how long it
>> takes:
>>
>> cd /usr/src/linux
>> time make bzImage
>>
>> If I remember right, VMS did this sort of stuff when you submitted jobs.
>> Pretty cool.
>>
>
>
>
>
More information about the Kclug
mailing list