Debian: doubt in "top" %CPU and "sar" output

 
Thread Tools Search this Thread
Operating Systems Linux Debian Debian: doubt in "top" %CPU and "sar" output
# 1  
Old 09-12-2007
Debian: doubt in "top" %CPU and "sar" output

Hi All,

I am running my application on a dual cpu debian linux 3.0 (2.4.19 kernel).

For my application:

<sar -U ALL>
CPU %user %nice %system %idle
...
10:58:04 0 153.10 0.00 38.76 0.00
10:58:04 1 3.88 0.00 4.26 0.39
10:58:19 0 143.41 0.00 36.95 5.17
10:58:19 1 2.84 0.00 3.10 9.04
...

<sar>
CPU %user %nice %system %idle
10:58:04 all 78.34 0.00 21.66 0.00
10:58:19 all 73.03 0.00 19.87 7.10

The %CPU output in "top" output shows a different value at those times(more than 90%),

do "top" %CPU and "sar" output should be the same?

Also 153% (more than 100%) is an usual "sar" behaviour?

Please help.

//Jaduks
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 Replies

2. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

3. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

4. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

5. Shell Programming and Scripting

"Join" or "Merge" more than 2 files into single output based on common key (column)

Hi All, I have working (Perl) code to combine 2 input files into a single output file using the join function that works to a point, but has the following limitations: 1. I am restrained to 2 input files only. 2. Only the "matched" fields are written out to the "matched" output file and... (1 Reply)
Discussion started by: Katabatic
1 Replies

6. AIX

AIX 5.3 - Discrepancies between "top" and "vmstat"

Can someone explain the differences I'm seeing below in TOP and VMSTAT commands on my AIX 5.3 server? Thanks! CPUs: 4; load averages: 0.86, 0.97, 0.97 18:09:26 926 processes: 4 stopped, 922 running CPU states: 78.4% idle, 8.5% user, 12.6% kernel, 0.3% wait Memory: 23680M Total.... (1 Reply)
Discussion started by: troym72
1 Replies

7. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

8. UNIX for Advanced & Expert Users

Commands on Digital Unix equivalent to for "top" and "sar" on other Unix flavour

Hi, We have a DEC Alpha 4100 Server with OSF1 Digital Unix 4.0. Can any one tell me, if there are any commands on this Unix which are equivalent to "top" and "sar" on HP-UX or Sun Solaris ? I am particularly interested in knowing the CPU Load, what process is running on which CPU, etc. ... (1 Reply)
Discussion started by: sameerdes
1 Replies
Login or Register to Ask a Question
Sys::Statistics::Linux::CpuStats(3pm)			User Contributed Perl Documentation		     Sys::Statistics::Linux::CpuStats(3pm)

NAME
Sys::Statistics::Linux::CpuStats - Collect linux cpu statistics. SYNOPSIS
use Sys::Statistics::Linux::CpuStats; my $lxs = Sys::Statistics::Linux::CpuStats->new; $lxs->init; sleep 1; my $stats = $lxs->get; Or my $lxs = Sys::Statistics::Linux::CpuStats->new(initfile => $file); $lxs->init; my $stats = $lxs->get; DESCRIPTION
Sys::Statistics::Linux::CpuStats gathers cpu statistics from the virtual /proc filesystem (procfs). For more information read the documentation of the front-end module Sys::Statistics::Linux. CPU STATISTICS
Generated by /proc/stat for each cpu (cpu0, cpu1 ...). cpu without a number is the summary. user - Percentage of CPU utilization at the user level. nice - Percentage of CPU utilization at the user level with nice priority. system - Percentage of CPU utilization at the system level. idle - Percentage of time the CPU is in idle state. total - Total percentage of CPU utilization. Statistics with kernels >= 2.6. iowait - Percentage of time the CPU is in idle state because an I/O operation is waiting to complete. irq - Percentage of time the CPU is servicing interrupts. softirq - Percentage of time the CPU is servicing softirqs. steal - Percentage of stolen CPU time, which is the time spent in other operating systems when running in a virtualized environment (>=2.6.11). METHODS
new() Call "new()" to create a new object. my $lxs = Sys::Statistics::Linux::CpuStats->new; Maybe you want to store/load the initial statistics to/from a file: my $lxs = Sys::Statistics::Linux::CpuStats->new(initfile => '/tmp/cpustats.yml'); If you set "initfile" it's not necessary to call sleep before "get()". It's also possible to set the path to the proc filesystem. Sys::Statistics::Linux::CpuStats->new( files => { # This is the default path => '/proc' stat => 'stat', } ); init() Call "init()" to initialize the statistics. $lxs->init; get() Call "get()" to get the statistics. "get()" returns the statistics as a hash reference. my $stats = $lxs->get; raw() Get raw values. EXPORTS
No exports. SEE ALSO
proc(5) REPORTING BUGS
Please report all bugs to <jschulz.cpan(at)bloonix.de>. AUTHOR
Jonny Schulz <jschulz.cpan(at)bloonix.de>. COPYRIGHT
Copyright (c) 2006, 2007 by Jonny Schulz. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-03-09 Sys::Statistics::Linux::CpuStats(3pm)