|
|
Measuring CPU Idle time
Hi group,
How can I measure the CPU idle time ? Does it make sense to measure it
per process ?
Can anyone tell me how to do it programatically using system calls
(else I need to resort to system and sar).
Thanks.
P.S. - I am on Redhat Linux 7.3
|
|
0
|
|
|
|
Reply
|
km_jr_usenet (66)
|
3/1/2005 9:52:41 AM |
|
Kelvin Moss <km_jr_usenet@yahoo.com> wrote:
>How can I measure the CPU idle time?
The answer is system-specific, and depends a LOT on why you want this
information. Most apps are better off not trying to mess with changing
themselves based on CPU info, but you probably know that.
>Does it make sense to measure it per process ?
Explain what you mean by this. Why would you need to?
>Can anyone tell me how to do it programatically using system calls
>(else I need to resort to system and sar).
>P.S. - I am on Redhat Linux 7.3
Easier than system calls will be to read files in /proc. /proc/stat is likely
the best place to start.
--
Mark Rafn dagon@dagon.net <http://www.dagon.net/>
|
|
0
|
|
|
|
Reply
|
dagon
|
3/1/2005 2:08:00 PM
|
|
Kelvin Moss wrote:
> Hi group,
>
> How can I measure the CPU idle time ? Does it make sense to measure it
> per process ?
I can't think of a per-process measurement that would
make much sense. Suppose Algernon, Basil, and Cuthbert
share a pizza: Algernon eats one slice, Basil eats two,
Cuthbert eats three, and two slices remain uneaten. How
many slices are "uneaten" by each of the three friends?
In a one-minute interval, fifty automobiles drive
across Big Bridge. Traffic engineers calculate that Big
Bridge can handle seventy automobiles per minute. How
much of the unused capacity is your Humvee responsible for?
A 50000-seat arena hosts the Stupor Bowl, but only
49000 fans turn up. The seat just in front of you is one
of the empties; is its emptiness attributable to you, or
to the group of six drunken louts beside you?
--
Eric.Sosman@sun.com
|
|
0
|
|
|
|
Reply
|
Eric
|
3/1/2005 4:26:45 PM
|
|
"Kelvin Moss" <km_jr_usenet@yahoo.com> wrote in message
news:1109670761.691172.39370@o13g2000cwo.googlegroups.com...
> How can I measure the CPU idle time ?
/proc/stat
> Does it make sense to measure it
> per process ?
I don't think so.
> Can anyone tell me how to do it programatically using system calls
> (else I need to resort to system and sar).
Read the man page for 'proc'. The /proc/stat file has the information
you are looking for, I think.
What exactly are you trying to do?
DS
|
|
0
|
|
|
|
Reply
|
David
|
3/1/2005 10:04:55 PM
|
|
David Schwartz wrote:
> What exactly are you trying to do?
For SNMP statistics, we need to report the CPU Idle time after each
process completes its work in our requirements. It did not make sense
to me as to how we could measure it per process. From the replies I
have got, I conclude that it doesn't make sense per process and I can
get overall CPU idle time from /proc/stat file.
Thanks, everyone, for the replies.
|
|
0
|
|
|
|
Reply
|
Kelvin
|
3/2/2005 5:07:08 AM
|
|
Kelvin Moss wrote:
> Hi group,
>
> How can I measure the CPU idle time ? Does it make sense to measure
it
> per process ?
>
You can measure per process CPU idle time :), but you need to write
your own.
Try implementing a watchdog timer (s/w) for all the pid entries in
/proc
by having a data structure with the things you need.
Then finally having a display function to show the processes cpu you
could
display all entries as in /proc at that moment.
- Roopa
> Can anyone tell me how to do it programatically using system calls
> (else I need to resort to system and sar).
>
> Thanks.
>
> P.S. - I am on Redhat Linux 7.3
|
|
0
|
|
|
|
Reply
|
Roopa
|
3/2/2005 6:01:43 AM
|
|
|
5 Replies
410 Views
(page loaded in 0.088 seconds)
Similiar Articles: Measuring CPU Idle time - comp.unix.programmerHi group, How can I measure the CPU idle time ? Does it make sense to measure it per process ? Can anyone tell me how to do it programatically using... Utility to measure time drift - comp.protocols.time.ntpMeasuring CPU Idle time - comp.unix.programmer Utility to measure time drift - comp.protocols.time.ntp Measuring CPU Idle time - comp.unix.programmer Utility to measure ... How does UNIX determine percentage of CPU used by a process - comp ...Measuring CPU Idle time - comp.unix.programmer... the CPU idle time ? Does it make sense to measure it per process ? ... calculate that ... CPU Idle time - comp.unix ... it took about 6 hours for installing Oracle 10g RAC in HP-UX ...CPU Idle time is about 100% in both boxes. Is this problem related to JAVA?Is it ... measurement of performance issues you can download and install glance an measure ... Watchdog timer - comp.arch.embeddedMeasuring CPU Idle time - comp.unix.programmer Try implementing a watchdog timer (s/w) for all the pid entries in /proc by having a data structure with the things you need. Time sync with milliseconds with Windows XP - comp.protocols.time ...They need to be time synced and my question is if the NTP ... Same hardware (motherboard, CPU, disk, memory, etc ... On an idle system W32Time should be able to keep the ... CPU info - comp.unix.solarisMeasuring CPU Idle time - comp.unix.programmer Hi group, How can I measure the CPU idle time ? Does it make sense to measure it per process ? Can anyone tell me how to do ... Controlling CPU utilization of a process - comp.unix.solaris ...Measuring CPU Idle time - comp.unix.programmer Controlling CPU utilization of a process - comp.unix.solaris ... Hello, My objective here is that i have a cpu intensive ... How to analysis high IOWait problem - comp.unix.solarisWhenever your CPU has some idle time, and at least one thread has an outstanding I ... I/O wait is really only a measure of the relative time needed to process the data versus ... High resolution timer. - comp.lang.asm.x86To measure real time you need a timer that measures real time, not a timer that measures CPU ... the count, and does say that the OS is meant to use it to measure idle time ... Is I/O Wait a Measure of CPU Utilization or Idle Time?"I/O Wait" is a measurement of CPU idle time. It's a common misconception that "I/O Wait" cycles are blocked, and can not be used by other processes. Measuring CPU Idle time - comp.unix.programmer | Computer GroupHi group, How can I measure the CPU idle time ? Does it make sense to measure it per process ? Can anyone tell me how to do it programatically using... 7/26/2012 2:11:55 PM
|
|
|
|
|
|
|
|
|