View CPU, Memory, I/O and NetFlow

Source: Internet
Author: User

View disk I/O with iostat
 
[Root @ localhost ~] # Iostat-d-x 2
Extended device statistics
Device mgr/s mgw/s r/s w/s kr/s kw/s size queue wait svc_t % B
Hda 0 0 0.0 0.9 0.1 5.4 6.3 0.0 4.7 0.9 0
Extended device statistics
Device mgr/s mgw/s r/s w/s kr/s kw/s size queue wait svc_t % B
Hda 0 3 0.0 2.0 0.0 20.0 10.0 0.0 0.8 0.5 0
......
 
Command Description: view disk I/0, and refresh every two seconds
 
[Root @ localhost ~] # Vmstat 5
Procs ----------- memory ---------- --- swap -- ----- io ---- system -- ----- cpu ------
R B swpd free buff cache si so bi bo in cs us sy id wa st
0 0 284 68700 165876 0 0 0 5 1 1 0 0 416748 0
......
 
Command Description: Command Used to view CPU usage, which is refreshed every 5 seconds. the rightmost column is the CPU usage data.
Top view process shares
 
[Root @ localhost ~] # Top
 
Then, Enter shift + p or P in the command bar of the top command.
 
Top-13:38:52 up 102 days, 1 user, load average: 0.00, 0.00, 0.00
Tasks: 81 total, 2 running, 79 sleeping, 0 stopped, 0 zombie
Cpu (s): 0.0% us, 0.0% sy, 0.0% ni, 100.0% id, 0.0% wa, 0.0% hi, 0.0% si, 0.0% st
Mem: 1035292 k total, 966592 k used, 68700 k free, 165876 k buffers
Swap: 2096472 k total, 284 k used, 2096188 k free, 416760 k cached
 
Pid user pr ni virt res shr s % CPU % mem time + COMMAND
4875 root 15 0 2192 1000 R 800 0.3. 15 top
1 root 15 0 2060 620 S 532 0.0. 65 init
2 root RT-5 0 0 S 0.0 0.0. 00 migration/0
.......
 
Command Description: View and sort the CPU usage of a process.
Free view memory usage
 
[Root @ localhost ~] # Free
Total used free shared buffers cached
Mem: 1035292 966592 68700 0 165876 416768
-/+ Buffers/cache: 383948 651344
Swap: 2096472 284 2096188
 
Command Description: view memory usage
Top view process memory usage
 
[Root @ localhost ~] # Top
 
Then, Enter shift + m or M in the top command bar.
 
Top-13:48:52 up 102 days, 1 user, load average: 0.00, 0.01, 0.00
Tasks: 81 total, 2 running, 79 sleeping, 0 stopped, 0 zombie
Cpu (s): 0.0% us, 0.3% sy, 0.0% ni, 99.7% id, 0.0% wa, 0.0% hi, 0.0% si, 0.0% st
Mem: 1035292 k total, 966592 k used, 68700 k free, 165876 k buffers
Swap: 2096472 k total, 284 k used, 2096188 k free, 416784 k cached
 
Pid user pr ni virt res shr s % CPU % mem time + COMMAND
4128 root 34 19 280 m 266 m 2112 S 0.0. 40 yum-updatesd
8314 www 18 0 171 m 34 m 34 m S 0.0 0: 06. 03 memcacheq
8280 www 15 0 88084 34 m 588 S 0.0 0: 01. 23 memcached
10907 mysql 15 0 122 m 16 m 3892 S 0.0 0: 25. 29 mysqld
......
 
Command Description: view the memory usage of the process and sort it.
Obtain network traffic for an Interface
 
[Root @ localhost ~] # Date; ifconfig eth0
Sun Mar 13 13:51:29 CST 2011
Eth0 Link encap: Ethernet HWaddr 00: 50: 56: A4: 0D: 89
Inet addr: 172.10.7.215 Bcast: 172.10.7.255 Mask: 255.255.248.0
Inet6 addr: fe80 :: 250: 56ff: fea4: d89/64 Scope: Link
Up broadcast running multicast mtu: 1500 Metric: 1
RX packets: 72113071 errors: 12213 dropped: 30790 overruns: 0 frame: 0
TX packets: 1062902 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 FIG: 1000
RX bytes: 3311165612 (3.0 GiB) TX bytes: 101244262 (96.5 MiB)
Interrupt: 59 Base address: 0x2000
 
[Root @ localhost ~] # Date; ifconfig eth0
Sun Mar 13 13:53:13 CST 2011
Eth0 Link encap: Ethernet HWaddr 00: 50: 56: A4: 0D: 89
Inet addr: 172.10.7.215 Bcast: 172.10.7.255 Mask: 255.255.248.0
Inet6 addr: fe80 :: 250: 56ff: fea4: d89/64 Scope: Link
Up broadcast running multicast mtu: 1500 Metric: 1
RX packets: 72113528 errors: 12213 dropped: 30790 overruns: 0 frame: 0
TX packets: 1062968 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 FIG: 1000
RX bytes: 3311204659 (3.0 GiB) TX bytes: 101285190 (96.5 MiB)
Interrupt: 59 Base address: 0x2000
 
Command Description: Obtain the network traffic for an Interface by comparing the RX and TX data of two time network interfaces.

Author: ERDP Technical Architecture"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.