Skip Menu |

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

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

People
Owner: jschulz.cpan [...] bloonix.de
Requestors: christian.boitel [...] gmail.com
Cc:
AdminCc:

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



Subject: bug in Sys::Statistics::Processes for newly discovered processes
Date: Wed, 2 Sep 2009 14:17:17 +0200
To: bug-Sys-Statistics-Linux [...] rt.cpan.org
From: Christian BOITEL <christian.boitel [...] gmail.com>
Hi, When a process is created, information about that new process isn't made available: I would except only delta computed information (cpu usage...) about the process would be missing. Bug is tracked in Sys/Statistics/Linux/Processes.pm --- Sys/Statistics/Linux/Processes.pm.original 2009-08-20 08:43:28.000000000 +0200 +++ Sys/Statistics/Linux/Processes.pm 2009-09-02 14:10:43.000000000 +0200 @@ -396,7 +396,7 @@ # if the start time is not equal then it seems to be a new process for my $k (qw(minflt cminflt mayflt cmayflt utime stime cutime cstime sttime)) { $istat->{$pid}->{$k} = $lpid->{$k}; - delete $lstat->{$pid}; + delete $lstat->{$pid}->{$k}; } } }
Subject: Sys::Statistics::Processes for newly discovered processes
This is not a bug, it's a feature request! The primary target of Sys::Statistics::Linux::Processes is to provide statistics (cpu, mem) and not common informations.
I will think about it...
Version 0.55_01 is uploaded. Please test it and give me a feedback.
Any feedback???
Subject: Re: [rt.cpan.org #49363] bug in Sys::Statistics::Processes for newly discovered processes
Date: Mon, 14 Sep 2009 15:02:43 +0200
To: bug-Sys-Statistics-Linux [...] rt.cpan.org
From: Christian BOITEL <christian.boitel [...] gmail.com>
Sorry, was busy on some other topic: i will deploy and should give a feedback tomorrow. I was wondering if we could improve things for delta values for newly discovered processes: => currently, you set to 0 all delta values (cpu ...) whenever you find a new process => we could instead leave the values as is since the values collected from kernel correctly reflects the consumption of the new process within the collection interval This should lead to something like: sub _deltas { .... # yeah, what happends if the start time is different... it seems that a new # process with the same process-id were created... for this reason I have to # check if the start time is equal! if ($ipid && $ipid->{sttime} == $lpid->{sttime}) { for my $k (qw(minflt cminflt mayflt cmayflt utime stime cutime cstime)) { if (!defined $ipid->{$k}) { croak "$class: not defined key found '$k'"; } if ($ipid->{$k} !~ NUMBER || $lpid->{$k} !~ NUMBER) { croak "$class: invalid value for key '$k'"; } # $tmp is used for the next init stat my $tmp = $lpid->{$k}; $lpid->{$k} -= $ipid->{$k}; if ($lpid->{$k} > 0 && $time > 0) { $lpid->{$k} = sprintf('%.2f', $lpid->{$k} / $time); } else { $lpid->{$k} = sprintf('%.2f', $lpid->{$k}); } $ipid->{$k} = $tmp; } # total workload $lpid->{ttime} = sprintf('%.2f', $lpid->{stime} + $lpid->{utime}); } else { # if the start time is not equal then it seems to be a new process #for my $k (qw(minflt cminflt mayflt cmayflt utime stime cutime cstime sttime)) { for my $k (qw(minflt cminflt mayflt cmayflt utime stime cutime cstime)) { $istat->{$pid}->{$k} = $lpid->{$k}; - $lpid->{$k} = '0.00'; #delete $lstat->{$pid}; } } .... } 2009/9/10 Jonny Schulz via RT <bug-Sys-Statistics-Linux@rt.cpan.org> Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=49363 > > > Any feedback??? >
On Mo. 14. Sep. 2009, 09:03:05, christian.boitel@gmail.com wrote: Show quoted text
> - $lpid->{$k} = '0.00';
That is not possible for some reasons. Either all stats exists or not. Let me think about something like SHOW_ALL_PROCESSES=1
Subject: Re: [rt.cpan.org #49363] bug in Sys::Statistics::Processes for newly discovered processes
Date: Mon, 14 Sep 2009 19:03:34 +0200
To: bug-Sys-Statistics-Linux [...] rt.cpan.org
From: Christian BOITEL <christian.boitel [...] gmail.com>
???? What i propose finally leads to have all stats, no ? 2009/9/14 Jonny Schulz via RT <bug-Sys-Statistics-Linux@rt.cpan.org> Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=49363 > > > On Mo. 14. Sep. 2009, 09:03:05, christian.boitel@gmail.com wrote:
> > - $lpid->{$k} = '0.00';
> > That is not possible for some reasons. > > Either all stats exists or not. > > Let me think about something like SHOW_ALL_PROCESSES=1 >
Version 0.55_02 uploaded. Please test it and give me a feedback.
Version 0.56 uploaded.
Subject: Re: [rt.cpan.org #49363] bug in Sys::Statistics::Processes for newly discovered processes
Date: Mon, 12 Oct 2009 08:43:30 +0200
To: bug-Sys-Statistics-Linux [...] rt.cpan.org
From: Christian BOITEL <christian.boitel [...] gmail.com>
Tested and working: thanks. 2009/10/7 Jonny Schulz via RT <bug-Sys-Statistics-Linux@rt.cpan.org> Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=49363 > > > Version 0.56 uploaded. >