Linux process Commands

Source: Internet
Author: User

Linux View sub-processes under a process

 

PS grep Master process ID


Pstree-p <PID>

Linux Memory Viewing mode:

 free-M
             Total       used       free     shared    buffers     Cached
Mem: 1002 769 232 0 421
-/+ Buffers/cache: 286 715
Swap: 1153 0 1153

The first part of the MEM line:
Total Memory: 1002M
Used number of memory used: 769M
Free amount of Memory: 232M
GKFX is currently obsolete. No, always 0.
Buffers Buffer Cache Memory: 62M
Cached Page Cache Memory: 421M

Relationship: Total (1002M) = Used (769M) + Free (232M)
Part II (-/+ Buffers/cache):
(-buffers/cache) Used memory: 286M (refers to the first part of the Mem line in the used-buffers-cached)
(+buffers/cache) Free memory: 715M (refers to the first part of the Mem line of Free + buffers + cached)

The visible-buffers/cache reflects the memory that is actually eaten by the program, and +buffers/cache reflects the total amount of memory that can be appropriated.

I think we looked at it, still very faint. The results of Part One (MEM) and Part Two (-/+ Buffers/cache) about used and free are so strange.
In fact, we can explain it from two aspects.
It is a mem parameter for the operating system. Buffers/cached are all part of being used, so it thinks free is only 232.
For the application It is (-/+ Buffers/cach). buffers/cached is equivalent, because buffer/cached is designed to improve the performance of the program execution, and when the program uses memory, buffer/cached is quickly used.


In addition to caching the Dentry (for VFS, which accelerates the conversion of file path names to Inode), there are two main cache modes: Buffer cache and Page cache. The former is for the disk block read and write, the latter for the file inode read and write. These caches can effectively shorten the time for I/O system calls (such as read,write,getdents).

Remember that the memory is for use, not to take a look. Unlike Windows, no matter how much of your real physical memory, he will have to take the hard disk swap files to read. This is why Windows often prompts for a lack of virtual space. Think about it.

Swap is a lot, and you might want to consider adding physical memory. This is the standard for Linux to see if the memory is adequate.

Linux View memory Consumption sort

Top Rear input m

Linux process Commands

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.