1. How to view processes in a drawing
Gnome-system-monitor
2. How to view processes with commands
PS Process Viewing tool
-a process running in shell
-X does not process the shell re-run
-U View Process user
-L Display Process details
-F Full info abbreviation
-E Display process dependencies
-O%cpu,%mem,user,pid,comm
Ps-aux |grep Process keyword PS ax-o%cpu,%mem,user,pid,comm # #查看进程某项信息 PS aux--sort +|-%cpu|%mem ... # #进程按指定方 -Sort Pstree
[Email protected]:~# ps-l F S UID PID PPID C PRI NI ADDR SZ
Wchan TTY Time CMD
Look at what the above options mean.
PID: Process number PPLD: Process number of the parent process TTY: process-initiated terminal STAT: Process Current state (s hibernation, d non-interruptible sleep state, R run State, Z Zombie state, T stop) NI: Process priority time: The total duration of the CPU that the process has been enabled since startup command/cmd: the command name of the process USER: User name%CPU: percent of CPU time and total time%MEM: Percentage of total memory and system memory consumed
3. How to control the front and back calls of the shell heavy process
Command & # #进程在shell后台运行ctrl +z # #把占用shell的进程打入后台运行暂停工作jobs # #查看被打入后台的进程信息fg Job number # #把指定进程调回前台bg job number # #运行起来后台停止的进程ctrl +c # #关闭占用shell进程
4. How to control processes with commands1) SignalSignal 1 # #reload进程 (not in process case reread profile) Signal 2 # #ctrl +C Delete process in memory information Signal 3 # #内存中的鼠标信息清除 (ctrl+\) Signal 9 # #强行关 Closed process (closed single process) signal # #正常关闭进程 (sub process closed after main process) signal # #开启停止的进程 (BG Job) Signal # #停止正在运行的进程 Signal 20 # #ctrl +z2) Signal InitiationKill signal Pidkillall Signal process name (batch processing) pkill-u Username # #结束某个用户的所有进程
5. User Login MonitoringW # #查看当前使用系统的用户w -f # #查看当前使用系统的用户并显示使用地点 last &N bsp;# #查看登陆过系统的用户lastb # #查看试图登陆但没有成功的用户 [[email protected] cron]# w & nbsp 14:48:39 up 2:46, 1 user, load average:0.00, 0.01, 0.00 user TTY from [email protected] IDLE JCPU PCPU What root PTS/1 192.168.203.1 12:27 0. 00s 0.17s 0.02s w w displays the meaning of the message:  JCPU: is distinguished by the terminal designator, when the process of the terminal all related processes executes, the CPU is consumed when The room will be displayed here  PCPU: Time consumed by CPU execution what: users under Action load average: Display the system separately The average load level in the last 1, 5, 15 minutes. from: shows the user from where to log on to the system, ": 0" of the display on behalf of the user when x Windows, open Text mode window login idle: User idle time, this is a timer, Once the userAny action, the timer will be reset View individual user information: w [user name]
6.top command System process monitoringU Usernamek Signal pidh help s how much wonderful dynamic monitoring once M memory sort C CPU Sort
Summary of Process management commands:
Top, free, PS, Pstree, (p) Kill, Nohup, Jobs, FG, BG, CTRL + Z, (re) nice.
TOP: A performance analysis tool that enables real-time display of resource usage for each process in the system, similar to
Task Manager for Windows. Free: Displays details of memory and swap, including buffers, cached, shared, free. Ps: Shows the status of the instantaneous process, not dynamic. Common format: ps-ef, PS aux.
The f parameter is output in long format. Pstree: Displays all the trips in a tree view, with the tree view as PID (if specified) or init
This basic stroke is root (root), and you can specify the process that shows a user. Kill: Terminates the process. Sending a system operation signal to the kernel of a Linux system and a process for a program
Identification number, and the system kernel can then manipulate the process as specified by the process identification number. Common lattice
Type: Kill pid or Kill-9 PID. Nohup: Run the command without hanging up (let the program run in the background). Daemons can be directly behind the command
With the & symbol, the program will be closed even if the terminal is closed using the & end. (Some people use Nohup to run the program directly by pressing the Close button to turn off the connected window, this is not standardized, the program will be closed with the session to terminate.) The correct steps are: Press any key first to return to the shell terminal and enter exit to exit. Jobs: View the programs that are currently running in the background. Fg: The command in the background is transferred to the foreground to continue running. Format: FG%jobid, this is not the PID of the process
, Jobid, which was found in jobs. Bg: A command that pauses in the background changes to continue execution. Format: BG%jobid. CTRL + Z: This is a key combination that puts a command that is executing in the foreground into the background and pauses. Nice: The kernel determines how much processor time the process needs based on the nice value of the process, ranging from 20 to 20
, the lower the value priority, the higher the Ps Axl can view the NI value. Lower priority can be used directly
"Nice-nicenum command" this format; promotion priority with "nice--nicenum command"
In the format, if a negative number requires root privileges.
This article from the "Technology life, Simple not simple" blog, please be sure to keep this source http://willis.blog.51cto.com/11907152/1846821
System process management and user login monitoring