linux--system Monitoring of Day7:python learning notes

Source: Internet
Author: User

The 1,2,3,4 represents the first row, the second row, the third row, and the fourth line, respectively.

Top

The top command is a common performance analysis tool under Linux that shows the resource usage of individual processes in the system in real time, similar to the Task Manager for Windows.

    1. The current time, system run time, the number of currently logged on users, three values are 1 minutes, 5 minutes, 15 minutes of the average load.

    2. Total number of processes, number of processes running, number of processes to sleep, number of processes halted, number of zombie processes

    3. User space consumes CPU percentage, System program consumes CPU percentage, CPU percentage changed priority, percentage of idle CPU, percentage of CPU time waiting for input and output, 0.0%wa 0.0% hi hard Interrupt (Hardware IRQ)% of CPU occupied, 0.3 % si soft interrupt (software interrupts) takes up CPU percentage, 0.0%st virtual machine steal time

    4. Physical Memory: Total 1001332k, idle 81472, use 521480,buffers to occupy 398380

    5. Virtual memory: Total, idle, used, cache occupied

    6. Process ID, process user, Privilege value (priority), nice value (good value), program takes up virtual memory value, program takes up physical memory value, account for shared memory value, process run state (S sleep r run), CPU percentage, percentage of memory, process run time, generate process command

CPU utilization: Working time/Total time

Average CPU Load: The number of tasks that the CPU is assigned/CPU the maximum number of tasks that can be performed simultaneously

Free : Monitor memory status

    1. Total memory, memory usage, free memory, shared memory, buff and cache count, available memory

    2. Memory consumption of the above data

    3. Virtual memory usage for the above data

Buffer: In order to alleviate the memory of the hard disk to write data when the speed difference

Cache: To reduce the speed of the hard drive to write data to memory (storing data from frequently used hard drives)

Echo 3 >/proc/sys/vm/drop_caches: (Incoming 3,3 in drop_caches to clear) clean memory cache

Free-m: View memory status in M

DF (disk file): View hard disk status

Df-h: Visually view the state of the file system on the hard disk

Df-i: Indicates the use of a hard disk by the number of files

DF-T: Indicates hard disk usage by file type

Mount: View hard disk conditions in more detail

DD If=/dev/zero of=/a.txt bs=200mb count=1:input file write to zero,output file write-out to a.txt size 200MB, quantity is one, used to test hard disk write speed

PS aux view process Management

PS aux: View all Processes

PS aux |head-3: view top three processes

Ps-elf |head-3: View the top three processes, which contain the parent process (PPID)

PS aux |grep ' top ': View the process containing top content

Kill-9 1234: Kill the PID 1234 process

Pkill-9 process_name: Kills a process named Process_name

Yum-y Install Psmisc: Installation view process tree command

Pstree 123: View the process tree with PID 123

    1. Process name, process ID, percentage of CPU, process% of memory, process accounted for virtual memory, process accounted for physical memory, whether run at terminal (say hello No), current status, start time, run time, run instruction

Kill Process
    1. First Use ps aux |grep ' Firefox ' to get information about the running Firefox process and get the process ID

    2. Execute kill-9 1234 kill process with process ID 1234

?

linux--system Monitoring of Day7:python learning notes

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.