Program Management-ps, top, pstree, kill, killall 1. Program observation-ps commonly used: one is to view only the 'ps-l' Of Your bash program ', one is to check the programs running in all systems 'ps auxf '. Www.2cto.com [root @ www ~] # Ps-lF s uid pid ppid c pri ni addr sz wchan tty time limit 4 S 0 13639 13637 0 75 0-1287 wait pts/1 00:00:00 bash4 R 0 13700 13639 0 77 0- 1101-pts/1 00:00:00 ps description: f: process flags indicates the summary permission of the program. Common numbers include: If it is 4, the permission of the program is root; if the value is 1, this subroutine is only copied (fork), but not actually executed (exec ). Www.2cto.com S: represents the state of the Program (STAT), the main state is: R (Running): The program is Running; S (Sleep ): the program is currently in sleep status (idle), but can be awakened (signal ). D: sleep state that cannot be awakened. Generally, this program may be waiting for I/O (ex> printing) T: stop ), it may be in the work control (background pause) or traced state; Z (Zombie): Zombie state, where the program has been terminated but cannot be removed from the memory. C: indicates the CPU usage, in percentage; PRI/NI: Priority/Nice stands for the Priority of CPU execution of this program, the smaller the value, the faster the program is executed by the CPU. ADDR/SZ/WCHAN: all of them are related to memory. ADDR is the kernel function, which specifies the part of the program in memory. If it is a running program, generally, '-'/SZ indicates the amount of memory used by the program./WCHAN indicates whether the program is currently running. Similarly, if '-' indicates that the program is running. TIME: the cpu time used. Note that it is the actual cpu time consumed by the program, rather than the system TIME. The ps aux columns are somewhat different. VSZ: the virtual memory used by the process (Kbytes), RSS: The fixed memory used by the process (Kbytes) 2. Dynamic Observation of program changes-top [root @ www ~] # Top [-d number] | top [-bnp Paribas] Option and parameter:-d: the number of seconds that can be followed, that is, the number of seconds that the entire program screen is updated. The default value is 5 seconds.-B: top is executed in batches. More parameters can be used! Usually, the batch results are output as files in combination with data stream redirection. -N: used with-B. It indicates that the output result of the top number is required. -P: specify some PIDs for observation and monitoring. Key commands that can be used during top execution :?: Key commands that can be entered in top, commonly used-P: sorted by CPU usage resources, M: sorted by Memory usage resources, and N: sort by PID! T: The cpu time accumulation (TIME +) used by the Process is sorted. K: Give a PID a signal (signal) r: Give a PID a new nice value. Q: The button to exit the top software. 3. Show the program tree-pstree [root @ www ~] # Pstree [-A | U] [-up] Option and parameter:-A: the connections between the program trees are connected using ASCII characters;-U: the connections between different program trees are connected by the characters of the universal code. Errors may occur in some terminal interfaces. Commonly Used:-p: And the PID of each process is listed at the same time. Commonly Used:-u: And the account name of each process is listed at the same time. 4. kill-signal PID or % work number signal mainly includes 1-restart, 9-force off, 15-normal off 5, killall-signal command name [root @ www ~] # Killall [-iIe] [command name] Options and parameters:-I: interactive meaning, interactive, if you need to delete, a prompt character will appear to the user;-e: exact indicates that 'COMMAND names followed by them must be consistent ', but the entire command cannot exceed 15 characters. -I: The command name (which may contain parameters) is case-insensitive.