Research on Linux Program Management and SELinux (continued)

Source: Internet
Author: User
Tags cpu usage

1.DMESG: Analyzing the information generated by the core, the system detects the hardware of the system when it is turned on, and this information is recorded in a protection section in memory that is taken out.

2.vmstat [-a][delay [total number of detections]],cpu memory, etc information; Vmstat[-fs], memory-related, Vmstat [-S units], set display units, Vmstat [-d], disk-related; vmstat [-P divider], Disk-Related: Detects changes in system resources, can detect CPU, memory, disk input and output status, and so on. Parameters

1)-A: Replace Buffer/cache memory output information with inactive/active (active or not)

2)-F: The number of System replication (fork) programs that will be powered up so far

3)-S: A list of memory changes caused by some events (booting to date) description

4)-S: the rear can be connected to units, so that the displayed data have units, such as k/m to replace bytes capacity

5)-D: Lists the total read and write statistics of the disk

6)-P: The divider is listed below to show the total reading and writing statistics of the partition slot.

Interpretation of results:

R: Number of programs awaiting operation; b: Number of programs that cannot be awakened; the more two projects, the busier the system.

SWPD: The capacity of virtual memory used; free: unused memory capacity; Buff: used for buffer memory; cache: for Cache

Si: The amount of the program removed from the disk; so: the capacity of the swap to be written to the disk due to insufficient memory. If the value of the si/so is too large, the data that represents the memory often has to be worn between the disk and the main memory, and the system performance will be poor.

BI: Number of chunks written to disk, Bo: Number of chunks written to disk, and if this part is higher, the I/O on behalf of the system is very busy

In: Number of programs interrupted per second; CS: number of times per second; the larger the two values, the more frequently the system communicates with the interface device, which of course includes the disk, network card, time clock, etc.

US: Non-core CPU usage status; SY: CPU state used by core layer; ID: idle state; WA: CPU state waiting for I/O; ST: CPU usage state stolen by virtual machine

3.fuser [-UMV] [-K [i] [-signal]] File/dir: See how many files were opened by the program during startup. Parameters:

1)-U: In addition to the PID of the program, also list the owner of the program

2)-M: The file next to the filename is actively mentioned on the top level of the filesystem, which is very effective for umount unsuccessful

3)-V: You can list the full relevance of each file and program and instructions

4)-K: Find the PID using this file/directory and try to give the PID change by Sigkill this signal

5)-I: Must be in conjunction with-K and will ask the user before removing the PID

6)-signal: For example-1-15 and so on, if not added, the preset is Sigkill (-9)

This directive can only be executed by root, and when with parameter-V, the meaning of the access option is:

C: This program is in the current directory (not the secondary directory)

E: Pathetic trigger for execution state

F: Represents the top level directory

F: The file is open, but waiting for a response

M: a library of dynamic functions that may be shared

4.lsof [-auu] [+d]: Query A program opening number,

1)-A: Multiple data needs to be established at the same time to show results

2)-U: Enter a list of socket file types for UNIX like systems

3)-U: Follow username, list the files opened by the user related program

4) +d: Follow the directory, that is, to find the file under a directory that has been opened.

5.pidof [-SX] program_name: Find out the PID of an executing program, can be followed by multiple program names, parameters:

1)-S: List only one PID instead of all PID

2)-X: Also list the program name as much as possible ppid the PID of that application.


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

Research on Linux Program Management and SELinux (continued)

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.