Linux Bird's Linux private cuisine basic study finishing (11)

Source: Internet
Author: User

1. Drop the command directly into the background to execute "&" and Add "&" at the end of the command.
Leave your current job in the background and pause: [ctrl]+z

2. Jobs [-lrs]: View the current background work status.
Parameters:
-L: The PID numbers are listed in addition to the job number and command string;
-R: Lists the work being run in the background;
-S: Lists the work that is in the background stop.

3. FG%jobnumber: Take the backstage work to the front desk for execution.
Parameters:
No parameters: Default removal of work with +;
%jobnumber:jobnumber is the work number,% can be omitted.

4. BG%jobnumber: Make the work in the background state become operational.

5. Kill-signal%jobnumber/kill-l: Manage work in the background.
Parameters:
-L: Lists the current signal signals that kill can use;
-signal: Represents what instructions are given to the work behind, and the common code is as follows:
-1: Re-read the configuration file;
-2: Represented with by keyboard input [ctrl]+c the same operation;
-9: Immediately forcibly delete a job;
-15: Grow a job in a normal way (default).

6. Nohup [Commands and parameters]: working at the terminal front desk after going offline
nohup [command and Parameters] &: Works offline after the terminal.

7. PS aux: View all process data of the system
Ps-la: View all system data
PS AXJF: Together with part of the process tree State.
Parameters:
-A: All processes are displayed with the same effect as-e;
-A: All processes not related to terminal;
-U: Effective user-related processes;
x: Commonly used with the A parameter to list more complete information;
Output format planning:
L: A longer, more detailed list of PID information;
J: Working format;
-F: Make a more complete output.

8. Ps-l display the item's logo description:
F: Represents this process flag, which describes the permissions of the process, common numbers are:
4: The permission to represent the process is root;
1: Represents a child process that can be fork and cannot be actually exec.
S: Represents the state of the process, the main states are:
R (Running): The process is in progress;
S (Sleep): The process is sleeping, but can be awakened;
D: Sleep state that cannot be awakened, usually this process may be waiting for I/O;
T: Stop state, which may be in work control (background pause) or in a debug state;
Z (Zombie): "Zombie" state, the process has terminated but cannot be removed from memory.
Uid/pid/ppid: The table that the process is owned by the UID/process PID number/PID number of the parent process;
C: Represents CPU utilization, in percent;
Pri/ni:prioity/nice, which represents the priority of the process being executed by the CPU, the smaller the number represents, the faster the process is executed by the CPU;
Addr/sz/wchan: All memory-related, ADDR is a kernel function that indicates which part of the memory the process is in, and if it is a running process, it will typically display "-". SZ represents how much memory this process uses. Wchan indicates whether the current process is running, if-that is, it is running;
TTY: The terminal location of the lander, using the dynamic Terminal Interface (pts/n) for remote login;
Time: The CPU time that is used, which is how long the process actually spends the CPU running;
CMD: Describes the process command that caused the program to fire.

9. PS aux Display logo description of the project.
User: Which account the process belongs to;
PID: Process identifier of the process;
%CPU: The percentage of CPU resources that are used by the process;
%MEM: The percentage of physical memory occupied by the process;
VSZ: Virtual memory used by the process (KB);
RSS: The amount of fixed memory that the process occupies (KB);
TTY: Which terminal the process is running on;
STAT: The current state of the process;
Start: The start time of the process being triggered;
Time: When the process actually uses the CPU to run;
Command: The actual commands for the process.

Top [-D number] | Top [-BNP]: Dynamically view changes to the process.
Parameters:
-D: The number of seconds can be followed, that is, the entire process interface update seconds, the default is 5 seconds;
-B: Execute top in batches, usually with data flow redirection to output batch results as files;
-N: Paired with-B, several top output results are required;
-P: Specify some PID for viewing detection.
Key commands that can be used during top execution:
?: Displays the key commands that can be entered in top;
P: The use of CPU resources to sort the display;
M: The use of memory resources to sort the display;
N: Sort by PID;
T: The CPU Time accumulated (time+) ordered by the process;
K: Give a signal to a PID;
R: Give a certain PID a nice value again;
Q: Leave top.

Pstree [-a|-u] [-up]: Lists the process tree.
Parameters:
-A: connections between each process tree are connected in ASCII characters;
-U: Connections between each process tree are connected in UTF8 characters, and there may be errors under some terminal interfaces;
-P: Simultaneously lists the PID of each process;
-U: Lists the account name of each process.

Killall [-iie] [command name]: give the signal directly through the process name.
Parameters:
-i:interactive, interactive mode, if need to delete, will appear prompt to the user;
-e:exact, indicating that the command name followed is consistent, but the entire command name cannot exceed 15 characters;
-I: Command name ignores case.

Nice [-N number] command: New nice value given new command.
Parameters:
-N: followed by a number, the range of values is -20~19.

Renice [number] PID: Re-set the nice value of the existing process.

. free [-B|-K|-M|-G] [-t]: view memory usage.
Parameters:
-B|-K|-M|-G: Display memory in B, KB, MB, GB;
-T: Displays the total amount of physical memory and swap in the final result of the output.

uname [-asrmpi]: View system and kernel-related information.
Parameters:
-A: All system-related information, including the following parameters;
-S: System kernel name;
-R: Kernel version;
-M: The hardware name of the system;
The type of-p:cpu;
-I: Hardware platform.

Uptime: Check the system startup time and workload.

netstat [-ATUNLP]: Tracking network.
Parameters:
-A: The current system on all the connection, monitoring, socket data are listed;
-T: Lists data for TCP network packets;
-U: Lists data for UDP network packets;
-N: The service name of the process is not listed and is displayed as a port number;
-L: List the services currently being monitored by the network;
-P: Lists the process PID for the Network service.

Vmstat [A] [latency [total number of detections]]:cpu memory and other resource changes
Vmstat [-fs] [-S unit] [-d] [-P partition]: detects system resource changes.
Parameters:
-A: Use Inactive/active (active or not) to replace buffer/cache memory output information;
-F: Lists the number of processes in the system fork so far;
-S: A description of the list of memory changes caused by some events (booting up to date);
-S: The rear can be connected to units, such as M, K, etc.;
-D: Lists the total read and write statistics of the disk;
-P: The partitions are listed later to show the total read and write statistics for this partition.

fuser [-UMV] [-K [i] [-signal] File/dir: Locate the program that is using the file through the file.
Parameters:
-U: In addition to the PID of the process, the owner of the process is also listed;
-M: The file name next to it will take the initiative to mention the top level of the filesystem;
-V: You can list the full relevance of each file to the program and the command;
-K: Find the PID using the file/directory, and try to give this PID by Sigkill this signal;
-I: Must be combined with-K to ask the user before removing the PID;
-signal: Specifies the type of signal given.

lsof [-auu] [+d]: Lists the file names that were opened by the process.
Parameters:
No parameters: Lists all files or devices on the system that have been opened;
-A: Multiple data needs to be "set up at the same time" to display the results;
-U: Lists only the socket file types of the Unix like system;
-u: followed by username, which lists the files opened by the user-related process;
+d: Follow the directory, and find the file that is already open under a directory.

pidof [-SX] program_name: Find the PID of a process that is executing.
Parameters:
-S: Lists only one PID and not all PID;
-X: Also lists the PID of the program_name possible ppid that process.

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.