Research on Linux Program Management and SELinux (cont.)

Source: Internet
Author: User

1.top [-D digital];top [-BNP]: Dynamic Observer program changes, parameters,

1)-D: The number of seconds after the second, is the entire program screen update of the second number. Preset is 5 seconds

2)-B: Execute top in batches, usually with data flow from the Guide to output the batch result as a file.

3)-N: Paired with-B, meaning that a few top output results are required

4)-P: Specify some PID to observe and detect.

Key commands that can be used during top execution:

? : Displays the command keys that can be entered in the top

P: Use of resources by CPU; sort

M: Sort display using resources in Memery

N: Sort by PID

T: Sorted by CPU time accumulation (time+) used by the process

K: give some PID a signal

R: Re-Customizing a nice value for a PID

Q: Keys to leave the top software

Top interface, top is divided into two interfaces, the above screen for the entire system of resource usage, a total of 6 lines, the content indicated:

In the first line, this line shows the information (each message is separated by a space):

The current time,

The time it takes to boot to the current

Number of people who have logged into the system

The system has an average load of 1, 5, 15 minutes

The second line shows the total amount of the current program, with the individual program in what state (Running,sleeping,stopped,zombie).

The third line shows the overall CPU load, including the percentage of the number of processes the user owns, the percentage of the number of processes that the system is running, and the percentage of the IO waiting process.

The fourth to fifth line indicates the current inability to use memory and virtual memory.

Line six, indicating where the state is displayed when a directive is entered in top

The following sections represent the resource usage of each process, respectively,

PID, Process number

USER, the owner of the process

Pr,priority shorthand, priority, smaller, first execution

Ni,nice shorthand, is the priority of the correction value, but also the smaller the first execution, can refer to, http://www.kuqin.com/linux/20090424/47813.html

%CPU,CPU Utilization

%MEM, Memory utilization

Time+:cpu using the accumulation of events

Top presets are sorted by CPU usage

2.pstree [-a| U][-up]: Displays process state information, parameters, in a tree-shaped structure,

1)-A: Connect between each program tree with ASCII characters

2)-U: The connection between each program tree is UTF-8 encoded characters. There may be errors under certain terminal interfaces,

3)-P: And also list the PID of each process

4)-U: and also list the account name of each process

3.killall-signal [-iie] directive name: kills a process by issuing the name of the instruction, parameter

1)-i:interactive, interactive, will prompt the character to the user

2)-e:exact means that the command name followed by is the same, but the entire complete instruction must not exceed 15 characters

3)-I: Instruction name (may contain parameters) ignoring case

Signal values See previous blog post (http://7613577.blog.51cto.com/7603577/1598771)

4.PRI and Nice's relationship: Nice is the PRI's correction value, it needs to be noted that

1) Nice's adjustable range is -20~19

2) root can adjust the nice value of himself or others program, and the range is -20~19

3) General users can only adjust their own program's nice value, and the range is 0-19 (avoid the general user to seize resources

4) The general user can only adjust the nice value higher,

5.nice [-N number] command: New nice value given by newly executed instruction

-N: followed by a numeric value range -20~19

6.renice [number] PID: Existing program re-adjust Nice

Value.

7.nice values can be passed between the parent program and the Child program.


This article is from "Tiger Brother's Blog" blog, please be sure to keep this source http://7613577.blog.51cto.com/7603577/1598817

Research on Linux Program Management and SELinux (cont.)

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.