Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Linux command to view the system status     - How a lot of blocking malicious IP address in Linux (Linux)

- The difference between Linux su and sudo commands (Linux)

- Use Swift remove the spaces in the string (Programming)

- You must ask yourself four questions before deploying Docker (Server)

- Executable file format Explanation under Linux (Linux)

- The strings in Python reside (Programming)

- Build and verify MongoDB3.0.7 version (shard + replica) Cluster (Database)

- 64-bit Ubuntu 15.10 How to compile the latest version of the 32 Wine 1.7.53 (Linux)

- MySQL tmpdir parameter modification (Database)

- Hadoop vs spark (Server)

- CentOS 7.1 install NTFS-3G (Linux)

- Getting the Linux shell expr use (Programming)

- How to ensure the Linux SSH login security with one-time password (Linux)

- Depth understanding of JavaScript new mechanism (Programming)

- The temporary operation of the document mkstemp on Linux (Linux)

- Using the Android interface in Parcelable (Programming)

- sqlplus connect to Oracle (Database)

- Let OpenCV face detection score output codes (Programming)

- Under Ubuntu 15.04 installation JDK8 (Linux)

- MongoDB 3.2 to upgrade from 3.0.7 (Database)

  Linux command to view the system status
  Add Date : 2018-11-21      

iostat command detail the aspects of the case of the storage subsystem. You usually use iostat to monitor how the overall health of the storage subsystem, and early detection of input / output problem of slow before users notice that the server is running slowly. Believe me, you should find a user to find these problems before these problems!

meminfo and free

meminfo for you to show in detail the case of the memory area. You can usually use another program, such as cat and grep, access meminfo information. For example, cat / proc / meminfo memory is shown in detail for you at any one time usage of the server.

If you want a quick summary of memory, you can use the free command. In short, free to provide you with a summary of information; meminfo provides you with detailed information.


mpstat command to report the activities of each of the available processors on multiprocessor servers. Now, thanks to multi-core processors, this command applies to almost all servers. mpstat can also report the case of an average processor activity on all servers. It allows you to follow the system or by the processor to display the total processor statistics. Before this user profiles can piss potential application issues to draw your attention.


netstat and ps, just as Linux administrators use Linux tools every day. It shows a large amount of network-related information, such as socket usage, routing, interfaces, protocols, network statistics, and more. Some of the most commonly used options are as follows:

-a displays all the information socket

-r Displays the routing information

-i display statistics about network interfaces

-s to display statistics for network protocols


nmon is short for Nigel's Monitor, this popular open source tools used to monitor the performance of Linux systems. nmon performance information can monitor multiple subsystems, such as processor usage, memory usage, run queues, disk input / output statistics, network I / O statistics, memory, paging activity and process metrics. Then you can curses "graphical" interface to view real-time systems nmon measure results.

Want to run nmon, you can launch the tool from the shell. Once started, simply enter the single-key commands, you can choose to monitor subsystem. For example, to obtain statistics about the processor, memory, disk, and so on, as long as each input c, m, and d. You can also use nmon with the -f flag to save the performance statistics to a CSV file for later analysis.

On the daily server monitoring, I think nmon my Linux System Administration Toolkit most useful program.


pmap command to report the amount of memory used by the process server. You can use this tool to determine which processes are allocated memory on the server, who in these processes use a lot of memory.

ps and pstree

ps and pstree These two commands are two assistant Linux system administrators. They can show all currently running processes in the form of a list. How much memory and processor time ps you can tell the server program in use. Pstree display less information, but which emphatically demonstrates the process is the child of other processes. With this information, you will be able to find runaway processes, and then use Linux "Do not get caught," the kill command to terminate the process.


sar program is like a Swiss Army knife in the field of system monitoring tools. sar command actually consists of three programs: display sar data, sa2 sa1 collect data and save data Once installed, sar can generate detailed profiles, display processor utilization, memory paging activity, network input. statistics / output and transmission aspects of the process to create activities and disk device activity. One big difference sar and nmon is that the former is more suitable for long-term monitoring system, I think it is more suitable for nmon help me quickly view the health status of the server.


strace is often considered to be a programmer's debugging tool, but its function is not only useful for debugging. It can intercept and record the process of calling the system case. Thus, it is a useful diagnostic, teaching and debugging tools. For example, you can use strace to find out if a program at startup which profile actually use.

However, strace does have a flaw. When it is a process to check the performance of the process will plummet. Thus, only if I have a very good reason to believe that the case of a program that caused the problem, only use strace.


tcpdump is a simple and reliable network monitoring utility. The basic protocol analysis feature allows you to view a rough situation on the network. But really want in-depth analysis of networks, you should use Wireshark (below Introduction).


top command displays active processes aspects of the case. By default, it shows the consumption of the processor tasks running on the server, and every five seconds to refresh the list. You can also press a variety of criteria to classify processes, such as PID (process ID); number of years, the most recent listed first; time, according to the cumulative time; and the presence of memory usage and processor has been used since the start of the total time. I think it provides a quick and easy way, easy to see there is no process started coming out of control, cause problems.


uptime can be used to see how long a server running, how many users are logged upswing. It also displays a summary of the information server load average. Is an optimum value of the load or less, which means that each processor can access the process immediately, without loss processor cycles exist.


Generally speaking, you can use vmstat to monitor virtual memory area. Linux continues to use virtual memory to get the best storage performance.

If your application is consuming too much memory, you will encounter frequently swapped out memory (page-out) the case - that the program from the system memory into the swap space on the hard drive. Your server may enter into this stage: the time spent on managing memory paging more than the time spent on running applications - this situation is called jitter (thrashing). When your computer jitter performance plummets. Vmstat can display average or actual sample data that can help you find a lot of memory consumption of procedures and processes, so that they cause the server up and running like a snail Postponed.


Before Wireshark called Ethereal (and often still so called), is similar tools tcpdump, but it is more advanced and has much more advanced protocol analysis and reporting capabilities. Wireshark both GUI interface, another interface shell. If you are engaged in professional-grade network management tasks, only use ethereal. And if you're using Wireshark / ethereal, I strongly recommend reading Chris Sander of the book "Practical Packet Analysis" (Practical Packet Analysis), the book describes in layman's language how to best use this utility.


# Uname -a # View kernel / operating system / CPU Information
# Head -n 1 / etc / issue # check the OS version
# Cat / proc / cpuinfo # View CPU information
Check the computer name # hostname #
# Lspci -tv # List all PCI devices
# Lsusb -tv # lists all USB devices
# Lsmod # listed loaded kernel modules
View the environment variables # env #
# Free -m # See the amount of memory usage and swap
# Df -h # See the district use
# Du -sh # Check the size of the specified directory
# Grep MemTotal / proc / meminfo # Check the amount of memory
# Grep MemFree / proc / meminfo # Check the amount of free memory
# Uptime # Show system uptime, the number of users, load
# Cat / proc / loadavg # View system load
Disk and partition
# Mount | column -t # Show mounted partition status
# Fdisk -l # See all partitions
# Swapon -s # See all swap partitions
# Hdparm -i / dev / hda # View disk parameters (for IDE devices)
# Dmesg | grep IDE # view when you start the IDE device detection status
The internet
# Ifconfig # view the properties of all network interfaces
# Iptables -L # View firewall settings
# Route -n # View the routing table
# Netstat -lntp # See all listening ports
# Netstat -antp # view all established connections
# Netstat -s # View network statistics
# Ps -ef # view all processes
# Top # display real-time process status
# W # Show active users
# Id # Specifies the user information
# Last # Show user login log
# Cut -d: -f1 / etc / passwd # View all system users
# Cut -d: -f1 / etc / group # View all system groups
# Crontab -l # to view the current user's scheduled tasks
# Chkconfig -list # lists all system services
# Chkconfig -list | grep on # start lists all system services
# Rpm -qa # view all installed packages
- Oracle 11g How dataguard master repository to Oracle single instance data recovery (Database)
- Bash common several configuration files (Linux)
- The practical application of Oracle synonyms + dblink (Database)
- Ubuntu 14.04 Enable root and disable the guest (Linux)
- JDK tools jstat (Linux)
- Install Ubuntu open source drawing program MyPaint 1.2.0 (Linux)
- mysql_config_editor encryption and decryption of the new features of MySQL realization (Database)
- How to identify memory leaks in Java (Programming)
- Linear table with a Java implementation of the iterator (Programming)
- Linux software firewall ACL match point optimization (Linux)
- 30 minutes with your Quick Start MySQL Tutorial (Database)
- To use Java arrays implement the order form (Programming)
- To share some very useful Vim command (Linux)
- Java by Spy Memcached to cache data (Programming)
- To install GCC development environment under SUSE11 (Linux)
- WordPress blog installation Redis Cache (Server)
- What have we learn from the front-end application Nodejs (Programming)
- Linux firewall settings instance (Linux)
- Disk partition MBR (Linux)
- Alien Magic: RPM and DEB Mutual Convert (Linux)
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.