Linux Beginner Notes---about process management, etc.

Source: Internet
Author: User

Novice Beginner:

1. View the commands used by the process:

Ps

Specific usage

Ps-a ro ps-e Show All Processes

Ps-u root Displays the root user's process

Ps-u root-n Show process for non-root users

PS-EJH using PS to list process trees

Ps-elf displaying thread information

Pgrep Docker Lookup Process

Pstree

Displays the tree-like relationship of the process.

Dynamic view of top display system

2. Install htop and atop to better monitor performance

Installation method, say first install Epel library:

Yum Install Epel-release

Reprint: Introduction of Epel in http://blog.csdn.net/yasi_xi/article/details/11746255

Rhel and his derivative distributions such as CentOS, Scientific Linux in order to stabilize, the official RPM repository provided RPM package is often very lag, of course, this is understandable, after all, this is the server version, security and stability is the focus, The official RPM repository provided by the RPM package is not rich enough, many times need to compile themselves that too hard, and epel just can solve both aspects of the problem.

What is Epel?

the full name of Epel is called Extra Packages for Enterprise Linux . Epel is a project built by the Fedora community to deliver high-quality software packages for RHEL and derivative distributions such as CentOS, scientific Linux, and more. After the Epel is loaded, it is equivalent to adding a third-party source.

If you know rpmfusion.org, it is appropriate to compare rpmfusion, rpmfusion mainly for the desktop distribution to provide a large number of RPM packages, and Epel for the server version provides a large number of RPM packages, and most of the RPM package in the official It is not found in the repository .

Another feature is that most RPM packages are newer than the official repository rpm package , such as the Php,rhel I installed on CentOS in the previous days for stability 5.1.6 version, I remember this is the first half of last year's version, and PHP The latest version has reached 5.3.2, if the phpMyAdmin is installed on the basis of php5.1.6, it will prompt PHP version is too low, this time, the newer PHP rpm provided in Epel can be handy.

And then

Yum Install Htop-y

Yum Intall atop-y

With htop atop, you can simply monitor the

3. Export system Information using Nmon monitoring:

Install: Download files from official website:

http://nmon.sourceforge.net/pmwiki.php

For the sake of simplicity, use precompiled files, download the appropriate questions according to the operating system here to choose RH72

Copy the file to the/usr/bin directory and change the name to Nmon

chmod +x Nmon

Run Nmon to display the appropriate graphical interface:

Can be tracked directly using Nmon

-C CPU

-M memory, etc.

can also be used directly

Nmon-f-S 1-c 60

Create Nmon files directly in the current directory and analyze them

Where-f means there is time in the name

-S indicates the time interval unit is wonderful

-C indicates the number of samples

Then download Nmon's analysis software on IBM's website Nmon_analyser

Https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/Power+Systems/page/nmon_analyser

The suffix of using xlsm after decompression is not seen analysis

Select the Nmon file that you just generated to show the results of the analysis.

------------------------------------

Previous encounter with colleague a cache consumes very much memory issues

When using free-m, cached memory is found to be very high available memory almost no

Processing method Reference:

http://blog.csdn.net/tengdazhang770960436/article/details/51776781

First use the sync command to write ginger dirty content to disk

Sync

Modify the Drop_caches of the proc system to clean up the free cache

Echo 3 >/proc/sys/vn/drop_caches

modifying parameters within a Sysctl

VM. dirty_ratio = 1

VMS. dirty_background_ratio=1

VMS. dirty_writeback_centisecs=2

VMS. dirty_expire_centisecs=3

VMS. drop_caches=3

VM. swappiness =

< Span class= "Hljs-number" >vm.vfs_cache_pressure=163

< Span class= "Hljs-number" > VM .overcommit_memory=2

< Span class= "Hljs-number" > Vm.lowmem_reserve_ Ratio=32 32 8

Kern. maxvnodes=3

However, this approach directly shuts down the cache, resulting in more physical toxicity and reduced performance

Suggest to change back again.

Linux Beginner Notes---about process management, etc.

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.