Linux Technology learning, Linux Center textbook decryption

Source: Internet
Author: User
Tags cpu usage

As we all know, the teaching materials of the major institutions are often secret, but xxx this time to benefit everyone! This is the Linux environment of the top command related content, I hope to be able to help you learn Linux.

Top

[email protected] java_demos]# Top

Top-14:36:14 up 2 days, 4:43, 1 user, load average:0.00, 0.01, 0.05

tasks:110 Total, 2 running, 108 sleeping, 0 stopped, 0 zombie

%CPU (s): 0.3 us, 0.2 sy, 0.0 ni, 99.3 ID, 0.2 wa, 0.0 hi, 0.0 si, 0.0th

KiB mem:1849336 Total, 963348 free, 542372 used, 343616 Buff/cache

KiB swap:2097148 Total, 2011496 free, 85652 used. 1126908 Avail Mem

PID USER PR NI VIRT RES SHR S%cpu%MEM time+ COMMAND

1858 MySQL 0 1465504 200800 6212 S 1.0 10.9 34:56.46 mysqld

1 root      20   0   56636   4308   2808 S   0.0  0.2   0:02.05 systemd2 root      20   0       0      0      0 S   0.0  0.0   0:00.04 kthreadd3 root      20   0       0      0      0 S   0.0  0.0   0:01.53 ksoftirqd/05 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/0:0H7 root      rt   0       0      0      0 S   0.0  0.0   0:00.07 migration/08 root      20   0       0      0      0 S   0.0  0.0   0:00.00 rcu_bh9 root      20   0       0      0      0 S   0.0  0.0   0:00.00 rcuob/0

Root 0 0 0 0 S 0.0 0.0 0:00.00 RCUOB/1

Root 0 0 0 0 S 0.0 0.0 0:00.00 RCUOB/2

Root 0 0 0 0 S 0.0 0.0 0:00.00 RCUOB/3

Root 0 0 0 0 S 0.0 0.0 0:14.63 rcu_sched

Root 0 0 0 0 S 0.0 0.0 0:10.43 rcuos/0

Root 0 0 0 0 S 0.0 0.0 0:04.67 RCUOS/1

which

First line:

· 14:36:14 Current system time

· Days, 4:43 the system has been running for 2 day, 4 hours, 43 minutes (not restarted during this period)

· 1 users currently have 1 user login systems

· Load average:0.00, 0.01, 0.05, followed by three numbers are 1-minute, 5-minute, and 15-minute loads. The load average data is the number of active processes that are checked every 5 seconds and then calculated by a particular algorithm. If this number is divided by the number of logical CPUs, the result above 5 indicates that the system is overloaded.

Second Line: Tasks task (process),

· The system now has 10 processes, of which there are 2 running, 108 in hibernation (sleep), 0 in the stoped state, and 0 in the zombie State (zombie).

Third line: CPU status

· Percent of CPU occupied by US user space

· SY kernel space% CPU occupied

· NI has changed the priority of the process to occupy the percentage of CPU

· ID Idle CPU percent

· WA io waits a percentage of CPU usage

· Hi Hard Interrupt (Hardware IRQ)% of CPU occupied

· Si soft interrupt (software interrupts)% of CPU occupied

Line four: Memory status

· Total Physical Memory

· Total Free Memory

· Used amount of memory in use

· Buff/cache The amount of memory cached

Line five: Swap swap partition

· Total Swap Area

· Total Free Swap Area

· Total swap area used by used

· Avail Mem buffer Swap area total

? line sixth: Status monitoring of each process (Task)

· PID Process ID

· USER Process Owner

· PR Process Priority

· NI nice value. Negative values indicate high priority, positive values indicate low priority

· The total amount of virtual memory used by the VIRT process, in kilobytes. Virt=swap+res

· The size, in kilobytes, of the physical memory used by the RES process and not swapped out. Res=code+data

· SHR shared memory size, in kilobytes

· S process state. d= non-disruptive sleep status r= run s= sleep t= track/stop z= zombie Process

· %cpu percentage of CPU time that was last updated to current

· Percentage of physical memory used by the%MEM process

· Total CPU time used by the time+ process, Unit 1/100 sec

· Command process name (commands name/command line)

To monitor the number of Java threads:

Ps-elf grep java wc-l

Monitor network client connections:

netstat-n grep tcp grep listening port wc-l

Linux Technology learning, Linux Center textbook decryption

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.