Ubuntu System Monitoring Tool

Source: Internet
Author: User
1) www.linuxidc.com @ linuxidc :~ $ Gedit & amp; [1] 5951 in this example, gedit loads in the background, and shell returns a jobnumber1 and a process number PID5951. 2) run the ps command to obtain the list of current processes. Ps has some parameters. See man help documentation. For example, ps-e lists all processes currently running in the system. ps-aux provides a more detailed list of ps

1) www.linuxidc.com @ linuxidc :~ $ Gedit &

[1] 5951

In this example, gedit loads data 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:

Ps-e lists all processes currently running in the system

Ps-aux provides a more detailed list

The working principle of ps is not the memory voting (polling memory), but it is queried through the Linux/proc or process file system. You can use the ps and grep commands to view information about a specific process. For example:

Ps-aux | grep bash

You can also use PID to view process information.

Ps 2640

You can also use kill and PID to terminate a running process.

Killed 2640

3) the general form of the kill command is: the kill option PID.

Kill-9 force process shutdown by PID

Kill-1 PID hangs and clears all related processes

4) nice and renice commands for Process Priority Scheduling

The nice command is usually used in combination with the-n option, followed by a number in the range of [-20, 19] to indicate the priority. ("-20" indicates the highest priority, and "19" indicates the lowest priority)

Run the following command to run the Conky client with a lower priority:

Nice-n 12 conky &

The renice command is used to reset the priority of processes running, or to schedule the priority of 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 conky

6) The top Command provides a console-based constantly updated output that displays 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)

You can also use the options to specify the average calculation interval (in seconds) and the number of computations. For example:

Vmstat 5 10

Run vmstat every five seconds and run it 10 times.

10) the uptime command returns the time and average load from the last start to the present.

11) df command to display hard disk usage

Df-h shows 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.

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.