Document directory
- 1.1.1 kill
- 1.1.2 PS
- 1.1.3 sleep
- 1.1.4 nice
- 1.1.5 Shutdown
- 1.1.6 halt
- 1.1.7 reboot
1.1.1 kill
[Syntax]:Kill-signal process number
[Description]: Kill transmits a signal to a specified process. The signal meaning is as follows:
1. hangup)
2. Interrupt)
3. Quit (quit)
4. Illegal instruction)
5. Trace trap)
6 abort
7 emulation trap)
Floating Point exception)
9 kill (not negligible)
10-channel error)
11 Invalid Memory segments
12. Incorrect System Call Parameters
13 write an unreadable connection pipe
14 alarm clock
15 software end signal
16 User-Defined signal 1
17 User-Defined Signal 2
[Example]:
% Kill-9 444Kill a process with process no. 444
1.1.2 PS
[Syntax]: PS [-EFL] [-T grouping table] [-u User table] [-G group table]
[Note]: displays the status of related processes.
-E: displays all processes that are running.
-F: Display All Information
-L generate a long list
-T display the specified Terminal Process
-U: displays the process of the specified user.
-G: displays the processes in the specified group.
[Example]:
1. PS-Ef lists all ongoing processes
2. PS-Ef | grep XXX search for processes containing xxx
3. PS-f-u smp1 lists the process details of user smp1
Result field description:
Field |
Description |
F |
Hexadecimal flag, which together indicate the current state of the process. 00 processes are terminated and their space in the table has been released. 01 system process, long resident memory 02 process tracked by parent process 04 The process is tracked by the parent process and has been stopped 08 this process cannot be awakened by semaphores 10 The process is currently in memory and locked until an event is completed. 20 process cannot be swapped out |
S |
The current status of the process, which is displayed by one of the following letters: O running on the processor S sleep; wait for the I/O event to complete R running ends I idle; process created Z is dead. Process terminated T stopped due to parent Process Tracking X wait for more memory |
UID |
User ID of the process owner |
PID |
Process ID |
Ppid |
Parent process ID |
C |
CPU usage of the process (that is, the percentage of CPU time of the process) |
PRI |
Process Priority Scheme. A large number indicates a lower priority. |
Ni |
Nice value of the process, which is associated with the priority scheme. Enabling a process "nicer" means lowering the priority of the process so that it does not use up CPU time |
SZ |
The amount of virtual memory requested by the process. This is a good indicator of the system's memory requirements. |
Tty |
Start the terminal of the process (or parent process; A process without a question mark (usually a system process ). |
Time |
Total CPU time since process startup |
CMD |
Process Generation Command |
1.1.3 sleep
[Syntax]: Sleep Time
[Description]: the number of seconds specified by the suspension parameter.
1.1.4 nice
Command: Nice
Format: Nice [-N] command
Function: run programs or commands with a low priority.
Option:-N is a priority ranging from 0 to 20.
Note:
Example: Nice-5 progame
1.1.5 Shutdown
[Syntax]: shutdown [-y] [-GN] [-In]
[Note]: The UNIX system must be shut down before power off.
-Y answers all the prompted questions
-G n: The time for other users to exit after n seconds. The default value is 60 seconds.
-I n system returns to N in the following way:
0 Shutdown
1 single user mode
2-User Mode
3. Multi-user mode in the Network
6 shut down and restart
1.1.6 halt
[Syntax]: Halt
[Note]: Shut down the system.
1.1.7 reboot
[Syntax]: reboot
[Note]: restart the system.