ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/host/generic/statgrab.pl
(Generate patch)

Comparing projects/cms/source/host/generic/statgrab.pl (file contents):
Revision 1.35 by tdb, Wed Feb 28 12:26:36 2001 UTC vs.
Revision 1.36 by tdb, Sat Mar 3 21:26:55 2001 UTC

# Line 195 | Line 195 | sub include_top() {
195          &print_pair(0, "packet.processes.stopped", $top =~ / ([^\s]+?) stopped/);
196          &print_pair(0, "packet.processes.cpu", $top =~ /([^\s]+?)\s*running/);
197          &print_pair(0, "packet.cpu.idle", $top =~ /([^\s]+?)% idle/);
198        &print_pair(0, "packet.cpu.user", $top =~ /([^\s]+?)% user/);
198          &print_pair(0, "packet.cpu.kernel", $top =~ /([^\s]+?)% system/);
199          &print_pair(0, "packet.cpu.iowait", $top =~ /([^\s]+?)% interrupt/);
200          &print_pair(0, "packet.cpu.swap", $top =~ /([^\s]+?)% swap/);
201 +
202 +        # FreeBSD is a bit different, we need to get user and nice.
203 +        my($user) = 0;
204 +        if($top =~ /([^\s]+?)% user/) { $user += $1; }
205 +        if($top =~ /([^\s]+?)% nice/) { $user += $1; }
206 +        &print_pair(0, "packet.cpu.user", $user);
207          
208          # The following need to be specified in megabytes.
209          # If they are preceeded by a G, then multiply by 1024.  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines