Ubuntu monitoring tool 1) cindy @ cindy-ThinkPad-X200 :~ $ Gedit & [1] 5951 www.2cto.com in this example, gedit loads in the background, and shell returns a job number 1 and a process number PID 5951. 2) run the ps command to obtain the list of current processes. Ps has some parameters. See man help documentation. For example, the ps-e command is used to list all processes currently running in the system. The ps-aux command provides a more detailed list. The operating principle of ps is not a memory voting (polling memory ), you can use Linux/proc or the process File System to query. You can use the ps and grep commands to view information about a specific process. For example, ps-aux | grep bash can also use PID to view process information. ps 2640 can also be used with kill and PID to terminate a running process. kill 2640 www.2cto.com 3) the general form of the kill command is: kill option PIDkill-9 PID force stop process kill-1 PID suspension and clear all related processes 4) the nice and renice commands are usually used in combination with the-n option for Process Priority Scheduling. A number in the range of [-20, 19] indicates the priority. ("-20" indicates the highest priority, and "19" indicates the lowest priority)
Run the nice-n 12 Conky & renice command on the conky client with a lower priority to reset the priority of processes running or schedule all processes owned by a user. A common user can only increase the priority value, which makes the task even less important. Only Super Users or sudo commands can use the full range of priority scheduling [-20, 19]. 5) The time command can view the time required by a command and the ratio of system resources. The time Command usually uses other commands or scripts as parameters.
Sudo time-p find/-name conky6) THE top Command provides a console-based continuously updated output that shows the processes currently running that consume the most cpu. The top command provides some interactive commands: h displays the help document, k prompts to enter the process to be killed, n prompts to enter the process to change the priority, r re-schedules the running process, q: Exit top. 7) The free command shows the number of used and idle memories. The Unit is kilobytes. You can use the-m option to specify the display unit as megabytes. 8) watch command. By default, a command is re-run every two seconds. For example, the watch free command can call the free command every 2 seconds to display the system memory usage. Ctrl + C to exit. 9) The vmstat (virtual memory statistics) command displays the average usage of system resources from the last startup to the present. (Including process, memory, I/O, CPU, etc.) www.2cto.com
You can also use the options to specify the average calculation interval (in seconds) and the number of computations. For example: vmstat 5 10 this command runs vmstat every 5 seconds and runs 10 times. 10) the uptime command returns the time and average load from the last start to the present. 11) df command shows hard disk usage df-h displays hard disk usage in common units (G, K. In addition, Ubuntu provides some graphical clients for system monitoring. Common GUI tools include Dash-> System-> Administration-> System Monitor, Conky, vncviewer, gnome-nettool, ethereal, kdf, ksysguard, Landscape, Zenoss, and Nagios.