Solved

How to monitor CPU Usage

Posted on 2004-04-02
12
71,235 Views
Last Modified: 2013-12-15
I would like to ask if there is any command that I can monitor CPU Usage in Redhat 7.1 .
0
Comment
Question by:mikekwok
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
12 Comments
 
LVL 45

Accepted Solution

by:
sunnycoder earned 20 total points
ID: 10739089
Hi mikekwok,

top

Sunnycoder
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 10739251
Sunnycoder is correct 'top' is the command you need

top - display top CPU processes

and the result will be something like this

 17:09:21  up 1 day,  3:17,  1 user,  load average: 0.00, 0.00, 0.00
62 processes: 60 sleeping, 2 running, 0 zombie, 0 stopped
CPU states:   1.1% user   0.0% system   0.0% nice   0.0% iowait  98.8% idle
Mem:   126044k av,  122612k used,    3432k free,       0k shrd,   50008k buff
                     92240k actv,       0k in_d,    1244k in_c
Swap: 1044144k av,    3560k used, 1040584k free                   25484k cached

  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME CPU COMMAND

so it's not only for CPU, it's also for RAM usage and swap space and which application using how many CPU and RAM/SWAP.

man top to get more detal :)
0
 
LVL 5

Expert Comment

by:willy134
ID: 10775776
do you have xload installed

xload is a classic unix tool that graphs the cpu usage so you can see trends.
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

Author Comment

by:mikekwok
ID: 10780188
how can i check if i have installed xload?
how to use it ?
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 10780957
mikekwok,

Did you try top ?

On your command line prompt, type "top" and hit enter...

xload, I guess, is used in the same way ... on your command promt in an xterminal (not on console) type xload and hit enter
0
 

Author Comment

by:mikekwok
ID: 10781176
i have tried top. Thanks. will top generate log file for me to monitor the cpu usage ?
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 10781199
Top will not generate a log file .. it will give you current statistics every five minutes or so ...

read the man page for detailed information

man top
0
 

Expert Comment

by:mariocarbone
ID: 11367042
you can install sar command then you write "sar 10 1080 -o sarlog.bin" 1080 times every 10 seconds= 3 hours it will give you a binary log file called sarlog.bin after that to transform the binary log to a text format log you must write "sar -f sarlog.bin > sarlog.log"

I hope this right for you!
0
 

Expert Comment

by:drubarth
ID: 11373950
You should use mrtg for monitoring CPU, Memory, Load Average, and more over time.  It shows graphs for daily, weekly, monthly, and yearly monitoring. You can find more info here:

http://people.ee.ethz.ch/~oetiker/webtools/mrtg/

Good luck!
0
 

Author Comment

by:mikekwok
ID: 11375410
i know that MRTG is good .
do u have any website teaching me hwo to install MRTG?
Thanks.
I would like to monitor my linksys router using mrtg but i dunno how to set . Would you please help me ? Thanks.
0
 
LVL 1

Expert Comment

by:Lawkie
ID: 22579225
Above is all pretty old, go for http://www.cacti.net/
It's easy and pretty powerful, let me know if you need further assistance.

Kind regards,

Rense
0
 
LVL 1

Expert Comment

by:unvanquishableAbhay
ID: 24817204
Top should just solve the purpose.
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question