Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Practical top command     - Nginx Load Balancing (standby) + Keepalived (Server)

- Ubuntu: HDF5 error: HDF5 header version does not match with the HDF5 library (Linux)

- Linux environment variable settings methods and differences (Linux)

- Install FFmpeg compiling from source in Mac OS X environment (Linux)

- Qt shared memory interprocess communication (Programming)

- Nginx configuration support f4v video format player (Server)

- Installation of network monitoring ntopng under CentOS 6.4 (Linux)

- Linux server security settings to close unused ports (Linux)

- MBR partitions under Linux (Linux)

- Ubuntu 14.04 compile, install, configure, the latest development version GoldenDict (Linux)

- Install Java 8 on Ubuntu using PPA (Linux)

- Installation Elementary OS Freya 20 things to do (Linux)

- Use IP address spoofing Intrusion Prevention Firewall (Linux)

- Locale files under Ubuntu (Linux)

- Ubuntu 14.04 LTS 64-bit install GNS3 1.3.7 (Linux)

- Gentoo: existing preserved libs problem solving (Linux)

- Git build a team development environment operating drills (Linux)

- Android use canvas board painting (Programming)

- Zabbix API and PHP configuration (Server)

- The most concise Systemd tutorial, just ten minutes (Linux)

 
         
  Practical top command
     
  Add Date : 2017-04-13      
         
         
         
  For system-level monitoring for, top command is a practical and efficient Swiss Army knife. Compared vmstat, sar, it provides real-time process information to monitor performance, troubleshoot problems, is very efficient. And it provides an interactive command mode, flexible combination of the output results.

If the database exists in the system cpu or excessive use of memory, or high IO wait, you can quickly locate a command to the system through the top process information, and then a mapping from system-level and database-level process to obtain database-level process to locate possible problems.

top command is a command personally preferences, generally summed up under some of the more useful features.

First briefly explain some of the content under the top command.

The first row shows the system load level, load average has three outputs, representing in the last 1 minute, 5 minutes, 15 minutes load average, you can see the current system there is no pressure. Uptime command output and this part is the same.

Line 2 shows some information about the process in general, the total number of the current process, which processes are running, what sleep, waiting status. 27758 is the process can be seen running state, because subscript bright process list if "S" corresponds to a value R represents a running, if S was sleeping.

Line 3 shows some of the cpu load information, this feature is also a more practical top command. Especially% id and% wa these two indicators is particularly important, many performance problems, if the% id too low,% wa very low, indicating cpu usage is high, there may be some sql statements consume a lot of cpu resources If% wa very high, it is likely to be a problem with the system IO. In the conventional system upgrade, if the 10% found% wa too, it shows very high IO wait, dd, etc. can do a simple test.

Row 4 shows the number of memory usage. If memory usage obvious exception, you can find% MEM process by consuming a relatively high standard in light of process information.

Line 5 shows some cases swap, if enough memory or system load is not high, no major changes in the data section.

-B Options

Enter the top, then directly enter B in the screen, it will turn on or off the table important figures in bold, if you are careful comparison will find that there are indeed some data is made bold display, so the problem is also more convenient for you investigation.

-C Option

Top -c or direct input (input top, then directly enter the screen c) the name of the command will switch the display to complete the process or command line input.

28751 process you can see the process corresponding to the command line input

-o options

If you want to customize the display output order top command, such as the default in the order pid, user to display process information, if you want based on user, pid to display, you can use the c option

Enter the top, and then enter o on the display screen will pop up an interactive interface. I would like to show the column USER, then enter E, and then press Enter, the results have been rearranged.

Order of the columns displayed on the corresponding adjusted modified.

- Options

Output or more of the top command can be used to make flexible flip, after all, a lot of the number of processes, some processes information in one screen also displays less, you can flip around to see.

Enter the top, and then enter directly on the screen can show the tab of the information process.

-F Or O options

As needed on a column to sort, the default sort is% CPU

Enter the top, and then enter the F or O on the output screen, select the appropriate column to sort, such as our sort of PPID.

The output results are as follows, for some may be called by the recursive problem can use this method to troubleshoot.

-i option

This option for some troubleshooting performance issues is even more powerful, for example, we just look at what processes are running the state, which does not need to see a sleep state, you can use the -i option.

Enter the top -i or enter the top, then i entered directly on the screen, it will show those who are running the process.

-z option

If you want to display the results can be more clear, you can use the -z option to switch the color mode or monochrome mode

Then enter the top of the screen will show the total input i relatively clear process information, according to their own needs to decide whether to enable.

-u option

If you just want to view a user's process information, you can use the u option.

The output is more clear, just show ora11g process.

-d option or s

Because the output of the top command is dynamic, it will be an average of once every 3 seconds to refresh, if you want to adjust the refresh frequency, you can use the d or s option.

Enter the top, and then enter d or s, you can set your own refresh rate.
     
         
         
         
  More:      
 
- Ubuntu 32 compile Android 4.0.4 Problems (Linux)
- Preview function to confirm the stop resource Oracle 12c new feature crsctl (Database)
- Linux with Windows Explorer as a security system (Linux)
- Linux 10 useful examples of command-line completion (Linux)
- Linux how to view your JDK installation (Linux)
- MySQL Installation Troubleshooting (Database)
- Python system default encoding (Programming)
- How to enable curl command HTTP2 support (Linux)
- Why not use the ifconfig command under RedHat Linux 5 (Linux)
- C language to view various types of data size (Programming)
- How to set the default Fedora from the command line (Linux)
- Windows 8.1 hard drive to install Ubuntu 14.04 dual system reference tutorials and multi-drive Precautions (Linux)
- CentOS 6.6 command-line automatic completion (Linux)
- How to install and use the Snort in Ubuntu 15.04 (Linux)
- Installation under Linux Mint system guidelines for Gtk (Linux)
- awk variables (Linux)
- KUbuntu / Ubuntu 14.04 (downgrade) installed SVN 1.7 (Linux)
- Configuring LIDS build Linux kernel security intrusion detection system (Linux)
- Fedora 22 Server how to upgrade to Fedora 23 Beta Server (Linux)
- Implicit conversion from Java type conversion compare MySQL and Oracle (Database)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.