Linux monitoring, partitioning

Source: Internet
Author: User

System Monitoring

Top: is a common performance analysis tool under Linux, type WinDOS Task Manager, 5S Refresh once

1, Top (top command), current time, up (current system stable running time), 2 users (desktop and terminal), CPU average load: One minute, 10 minutes, 15 minutes

2, tasks: The total number of tasks running in the System 405 2 running 403 sleep (waiting for CPU execution) 0 stopped 0 zombies (process is tree, a child process has only one parent process, the parent process ends, the child process should end together, if the parent process dies, the child process is not Recycling, which is a dead process that does not work, that is, a zombie process that consumes memory resources)

3,%CPU (s): process accounted for the percentage of CPU, multi-core will show cpu0, 1 and other arranged display; US: User program as a percentage of CPU; SY: The percentage of the CPU that the system program occupies; NI (Nice): the modified program accounts for CPU percentage (good value, higher value, lower priority); id:cpu idle percentage; WA: The percentage of CPU that waits for the program to run; Hi: The percentage of hardware terminals; Si: The percentage of software terminals; Percentage of st:cpu stolen (such as virtual machines running on a real machine)

4, KiB Mem: in kilobytes to view memory, physical memory;

5, KiB Swap: In kilobytes view memory, virtual memory, usage 0, if more than 0 indicates that the physical memory is not enough, the use of virtual memory

Process information

Column Name

Meaning

Pid

Process ID

PPID

Parent Process ID

Ruser

Real User Name

Uid

User ID of the process owner

USER

User name of the process owner

GROUP

Group Name of Process owner

Tty

The terminal name of the startup process. Processes that are not started from the terminal are displayed as?

PR

Priority level

NI

Nice value. Negative values indicate high priority, positive values indicate low priority

P

Last CPU used, only meaningful in multi-CPU environment

%cpu

CPU time consumption percentage last updated to current

Time

Total CPU time used by the process, in seconds

time+

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

%MEM

Percentage of physical memory used by the process

VIRT

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

SWAP

The size, in kilobytes, of the virtual memory that the process is using, swapped out.

Res

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

CODE

The amount of physical memory the executable code occupies, in kilobytes

DATA

The amount of physical memory that is used by parts other than executable code (data segment + stack), in kilobytes

Shr

Shared memory size, in kilobytes

Nflt

Number of page faults

Ndrt

The number of pages that were modified the last time it was written to.

S

Process state.
d= non-disruptive sleep state
R= Run
S= Sleep
t= Tracking/Stopping
z= Zombie Process

COMMAND

Command name/command line

Wchan

If the process is sleeping, the system function name in sleep is displayed

Flags

Task Flag, reference sched.h

CPU load <=1: can handle normally

CPU Load >1: overload operation

PU utilization and CPU load is too high, are bad phenomenon, but there may be, low utilization, high load situation:

For a yard distribution of 100 projects, there is no doubt that the yard load is very high, but the code farmers in the specific to do a project, may encounter the need to buy machines, or query data, such as time-consuming problems, the real code of the time may be very short, and this time is the real time the yard to work for the company, If every project has a similar problem, then the 100 items added together, the code farmer really does not have too much time to work, which results in low utilization.

In both cases, a process cannot logically run,

1. Process hangs is its own cause, encountering I/O blocking, it will let the CPU to allow other processes to execute, so that the CPU has been working

2. Regardless of the process, it is the operating system level that may invoke other processes to use the CPU because one process takes up too much time, or a priority, and so on.

Explanation of buffer and cache:

      • A buffer is something that have yet to being "written" to disk.
      • A cache is something that have been "read" from the disk and stored for later use.

This means that buffer is used to store the data to be output to disk (block device), and the cache is the data that is read from disk. Both are designed to improve IO performance and are managed by the OS.

Release:

Echo 3 >/proc/sys/vm/drop_caches

The "3" here means releasing all the parts of buffers and cached that can be released.

The free command displays memory usage status

When using the free command to view the Linux memory used by the system, used an item will cache also add the current size, which will cause free this column to display very little memory:

In fact, cache depending on the needs of the application, it can be recycled, so free This column does not really show how much "can be used" memory. The actual system available memory should be available data-based.

Use -w command-line options buff to get and cache use the respective quantity:

free represents memory that is not currently being used by the program at all cache , and can be freed up for use by other processes if necessary (not all will be freed)

Partition:

Operation

Then:

To format:

Linux monitoring, partitioning

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.