Skip Menu |

This queue is for tickets about the Linux-Statistics CPAN distribution.

Report information
The Basics
Id: 21970
Status: resolved
Priority: 0/
Queue: Linux-Statistics

People
Owner: Nobody in particular
Requestors: morten.bjornsvik [...] experian-scorex.no
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: individual cpu logging missing
Date: Mon, 9 Oct 2006 10:55:58 +0200
To: <bug-Linux-Statistics [...] rt.cpan.org>
From: Morten Bjørnsvik <morten.bjornsvik [...] experian-scorex.no>
I see ProcStats only include the cpu summary, it should have a device-list cpu0, cpu1 etc. If you have a uniprocessor machine, or not hyperthreaded this does not show up. 'ProcStats' => { 'Total' => 100, 'New' => 1, 'System' => 0, 'IOWait' => 0, 'User' => '100.00', 'Idle' => 0, 'Nice' => 0 } %cat /proc/stat cpu 40510 2740 12904 1538920 6878 455 235 0 cpu0 19587 1652 8209 766350 4897 455 186 0 cpu1 20923 1088 4694 772569 1980 0 49 0 intr 2602130 2003180 11725 0 5 4 0 9 0 2 1 0 0 282345 0 44704 70744 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 53339 0 0 0 0 0 0 0 136071 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ctxt 6045869 btime 1160375333 processes 8914 procs_running 2 procs_blocked 0 Thanks -- Morten Bjørnsvik
Hi Morton, Show quoted text
> I see ProcStats only include the cpu summary, it should have a device- > list cpu0, cpu1 etc.
sorry, but your favor is a feature request and not a bug report! :-) As I developed Statistics.pm I thought about this feature but castaway it fast. Of course, there could be a lot of reasons to need this values, but is it really needed or just nice to have? :-) I write it on my TODO list for the next release. Thanks a lot, Jonny
Subject: RE: [rt.cpan.org #21970] individual cpu logging missing
Date: Wed, 11 Oct 2006 10:31:43 +0200
To: <bug-Linux-Statistics [...] rt.cpan.org>
From: Morten Bjørnsvik <morten.bjornsvik [...] experian-scorex.no>
|Hi Morton, | |> I see ProcStats only include the cpu summary, it should have |a device- |> list cpu0, cpu1 etc. | |sorry, but your favor is a feature request and not a bug report! :-) | |As I developed Statistics.pm I thought about this feature but |castaway it fast. Of course, there could be a lot of reasons |to need this values, but is it really needed or just nice to have? :-) | |I write it on my TODO list for the next release. | Thanks Johnny. You are correct, It is just nice to have. I tried patching it myself, but it was not just as simple as adding to the ProcStats returned hash :-) -- MortenB
From: BLOONIX [...] cpan.org
Hi Morton, Show quoted text
> I tried patching it myself, but it was not just as simple as adding
to the ProcStats returned hash :-) that is not so easy Morton. Think about the new-key in ProcStats()... I could push the statistics total, system, user, idle and iowait in new hashrefs for each cpu like cpu0, cpu1 and so on... but where I have to place the "new" key? Only into the cpu-summary or maybe into LoadAVG()? If in LoadAVG() then I have to push LoadAVG() into initStats()... And the people have to change their scripts that use Statistics.pm if I plan to change the data structure! That wouldn't be nice. But I will think about it! Cheers, Jonny
On Mi. 11. Okt. 2006, 06:48:51, BLOONIX wrote: Hi again Morton, try this here and give me a feedback! http://www.bloonix.de/downloads/Linux-Statistics-1.15.1.tar.gz
Subject: RE: [rt.cpan.org #21970] individual cpu logging missing
Date: Wed, 11 Oct 2006 13:58:07 +0200
To: <bug-Linux-Statistics [...] rt.cpan.org>
From: Morten Bjørnsvik <morten.bjornsvik [...] experian-scorex.no>
|On Mi. 11. Okt. 2006, 06:48:51, BLOONIX wrote: |Hi again Morton, | |try this here and give me a feedback! | |http://www.bloonix.de/downloads/Linux-Statistics-1.15.1.tar.gz | Hi Jonny Thanks it works great!!!! Extremely fast response!!!! 'ProcStats' => { 'cpu1' => { 'Total' => 1, 'System' => 0, 'Nice' => 0, 'IOWait' => 0, 'User' => 1, 'Idle' => 99 }, 'cpu' => { 'Total' => 5, 'New' => 1, 'System' => 2, 'IOWait' => 0, 'User' => 3, 'Idle' => 196, 'Nice' => 0 }, 'cpu0' => { 'Total' => 4, 'System' => 2, 'Nice' => 0, 'IOWait' => 0, 'User' => 2, 'Idle' => 97 } } }; cpu:IOWait:0 Idle:196 New:1 Nice:0 System:2 Total:5 User:3 cpu0:IOWait:0 Idle:97 Nice:0 System:2 Total:4 User:2 cpu1:IOWait:0 Idle:99 Nice:0 System:0 Total:1 User:1
Hi, Show quoted text
> Hi Jonny > Thanks it works great!!!! > Extremely fast response!!!!
no problem! Show quoted text
> 'cpu' => { > 'New' => 1,
But that isn't nice really! Maybe I split the data into ProcStats() and ProcStatsSum() or I push the new-key into LoadAVG(). Dunno... I will think about it... Cheers!
done