LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-04-2005, 08:16 AM   #1
Volcano
Member
 
Registered: Sep 2005
Posts: 172

Rep: Reputation: 15
iostat


iostat AND mpstat command not woeking in my machine.

RAD HAT 9

#iostat ===>command not found
#mpstat==>command not found
 
Old 10-04-2005, 08:28 AM   #2
cardy
Member
 
Registered: Jan 2005
Location: Shropshire, England, UK
Distribution: RedHat, Fedora, CentOS..........
Posts: 121

Rep: Reputation: 19
The reason for this is most likely that you don't have the package sysstat installed.

check this by doing
Code:
rpm -q sysstat
The above command should return something like

sysstat-4.0.7-4.rhl9.1

If it does not then you need to install the RPM package sysstat which can be downloaded from the updates section of any of the mirror sites or by using the command below.

Code:
rpm -Uvh ftp://updates.redhat.com/9/en/os/i386/sysstat-4.0.7-4.rhl9.1.i386.rpm

Last edited by cardy; 10-04-2005 at 08:30 AM.
 
Old 10-04-2005, 08:59 AM   #3
Volcano
Member
 
Registered: Sep 2005
Posts: 172

Original Poster
Rep: Reputation: 15
it works.

can you tell

# cat /proc/stat
cpu 340465 1397 326489 540360
cpu0 340465 1397 326489 540360
page 624282 398572
swap 6368 31892
intr 1998753 1208711 9141 0 0 3 0 0 0 1 0 0 31415 685495 0 63987 0
disk_io: (3,0)64082,42839,1247940,21243,797124)
ctxt 7881082
btime 1128416208
processes 6024

how do i get the CPU usage in percent from this data ?
 
Old 10-04-2005, 10:28 AM   #4
cardy
Member
 
Registered: Jan 2005
Location: Shropshire, England, UK
Distribution: RedHat, Fedora, CentOS..........
Posts: 121

Rep: Reputation: 19
If you just wish to see the CPU usage as a percentage then you can use a number of tools.

For an interactive view of your systems processes try

Code:
top
another good tool is called vmstat which will show you lots of information including the CPU usage (split into user, system and idle)
The command below shows the output with 5 second intervals

Code:
vmstat 5
It should produce something like below

Code:
   procs                      memory      swap          io     system      cpu
 r  b  w   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id
 0  0  0 105564  28076 499324 387160    0    1    13    21    1     9 11  1 13
 1  0  0 105564  28076 499340 387152    0    0     0    12  119   198  0  0 100
Details of what the numbers and different headings mean can be found via the man page
Code:
man vmstat
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
iostat help.no disk stats droberts Linux - Newbie 0 11-09-2005 04:36 PM
iostat command on SLES 9 rajesht SUSE / openSUSE 1 09-09-2005 02:28 PM
iostat cmd not found karthic Linux - Enterprise 2 03-22-2005 06:04 AM
iostat FragInHell Solaris / OpenSolaris 2 07-02-2004 06:02 AM
iostat closer to Solaris marist89 Linux - Software 0 11-20-2003 03:18 PM


All times are GMT -5. The time now is 06:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration