One linux Command every day (September)

Source: Internet
Author: User

One linux Command every day (September)

2014-09-02

Top displays the resource usage of each process in the system in real time, similar to the Windows Task Manager command parameters: -Batch B-c display complete governance command-I ignore invalidation process-s confidentiality mode-S accumulation mode-I <time> set interval-u <User Name> specify user name- p <process no.> specified process-n <times> Number of times an instance is displayed cyclically: 1.top 2.top-p 574 displays the specified process information 3.top-d 3 sets the Information Update Time 4.top-n 2 sets the number of information updates, description: 5.top-c is automatically terminated after the upgrade. the first line of the complete command top is displayed. The task queue information is the same as the execution result of the uptime command. The specific parameters are described as follows: 14:06:23-the current system time is up 70 days,-the system has been running for 70 days, 16 hours, and 44 minutes (during this period, the system has not restarted yet !) 2 users-currently there are two users logging on to the system load average: 1.15, 1.42, 1.44-load average. The three numbers after the average are 1 minute, 5 minutes, and 15 minutes respectively. The load average data checks the number of active processes every five seconds and then calculates the value based on a specific algorithm. If this number is divided by the number of logical CPUs, the system is overloaded when the result is higher than 5. The second line is Tasks-task (process). The details are described as follows: the system currently has 206 processes, of which 1 is running and 205 are sleep ), there are 0 stoped states and 0 zombie states (botnets. The third line shows the cpu status information. The specific attributes are described as follows: 5.9% us-Percentage of CPU occupied by user space. 3.4% sy-Percentage of CPU occupied by kernel space. 0.0% ni-Percentage of CPU used by processes that have changed their priorities 90.4% id-Percentage of idle CPU 0.0% wa-IO percentage of CPU occupied 0.0% hi-hard interrupt (Hardware IRQ) CPU usage 0.2% si-Soft Interrupt (Software Interrupts) CPU usage percentage remarks: here the CPU usage rate is different from the windows concept, understanding about linux user space and kernel space! Row 4: memory status. Details: 32949016 k total-total physical memory (32 GB) 14411180 k used-total memory in use (14 GB) 18537836 k free-total idle memory (18 GB) 169884 k buffers-cache memory (169 MB) the fifth line, swap partition information, details are described as follows: 32764556 k total-total swap areas (32 GB) 0 k used-total number of swap areas used (0 K) 32764556 k free-total number of idle swap areas (32 GB) 3612636 k cached-buffer swap zone total (3.6 GB) Remarks: The total memory used in row 4 refers to the number of memories currently controlled by the system kernel, the total idle memory (free) is the number of cores not included in the control scope. The memory included in the kernel management is not always in use, but also the memory that can be reused in the past, the kernel does not return the reusable memory to free. Therefore, free memory will become fewer and fewer on linux, but you don't have to worry about it. If you calculate the number of available memory out of habit, there is an approximate formula: free in the fourth row + buffers in the fourth row + cached in the fifth row, according to this formula, the available memory of this server is about 18537836 k + 169884 k + 3612636 k = 22 GB. For memory monitoring, we need to monitor the used of the fifth-line swap partition in top. If this value is constantly changing, it means that the kernel is constantly exchanging data between memory and swap, this is the real insufficient memory. The sixth line is empty. The seventh line is the status monitoring of each process (task). The project column information is described as follows: PID-process id USER-process owner PR-process priority NI-nice value. A negative value indicates a high priority. A positive value indicates a low priority VIRT-Total virtual memory used by the process, in kb. VIRT = SWAP + RES-physical memory used by the process, not swapped out, in kb. RES = CODE + data shr-shared memory size, in kb S-Process status. D = non-disruptive sleep state R = running S = sleep T = tracking/stopping Z = zombie process % CPU-Percentage of CPU time occupied since the last update % MEM-Process Used physical memory percentage TIME +-total cpu time used by the process, the Unit is 1/100 seconds. COMMAND-process name (COMMAND name/COMMAND line)

2014-09-01

Watch periodic execution program, and full screen display of execution completion (execute a program periodically, showing output fullscreen) parameter:-n or -- interval watch runs the program every 2 seconds by default, you can use-n or-interval to specify the interval. -D or -- differences use-d or -- differences option watch to highlight the changed area. The "-d = cumulative" option will highlight the changed area (no matter whether there is a recent change. I instance: 1. watch-n 1-d date highlight time change per second 2. watch-n 1-d 'LS-al' highlight directory file changes per second

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.