Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Linux command to view the system status     - PostgreSQL procedural language learning (Database)

- Analysis of Java keyword final (Programming)

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

- There is sort of a directed acyclic graph topology (Programming)

- Nginx high concurrency optimization ideas (Server)

- How to test your MongoDB application upgrade? (Database)

- Oracle metadata Reconstruction experiments (Database)

- Features and prevention methods elaborate network security grayware (Linux)

- Oracle Data File Management (Database)

- AngularJS (Programming)

- Ubuntu 14.04 forget solution root password (Linux)

- Firewall types and instructions (Linux)

- Ubuntu Gitolite management Git Server code base permissions (Server)

- Advanced network security tips Linux backdoor Technology and Practice (Linux)

- Linux server dual-card dual-IP and single-card dual-IP configuration method (ReHat / CentOS) (Server)

- How to build Memcached Docker container (Server)

- XtraBackup achieve non-stop use of master-slave synchronization service (Database)

- MySQL5.6.17 compiler installation under CentOS (Database)

- RHEL7.0 log system (Linux)

- Ubuntu Linux Change the PATH (Linux)

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

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.

mpsta

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

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

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

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

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

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

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

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

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.

vmstat

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.

Wireshark

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.

 

System
# 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 #
Resources
# 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
Process
# Ps -ef # view all processes
# Top # display real-time process status
User
# 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
Service
# Chkconfig -list # lists all system services
# Chkconfig -list | grep on # start lists all system services
Program
# Rpm -qa # view all installed packages
     
         
       
         
  More:      
 
- mydumper installation error process (Database)
- Getting Started with Linux: Learn how to install and access CentOS 7 Remote Desktop on a VPS (Server)
- Ora-00439: feature not enabled: managed standby (Database)
- Security: Unix operating system intrusion tracking Strikes Back (Linux)
- Processor in protected mode of protection (Linux)
- Ubuntu 12.04 64bit Install Source Insight 3.5 and create desktop icons (Linux)
- Golang use Oracle database on Ubuntu 14.04 (Linux)
- MySQL Authorized a recovered (Database)
- Linux performance monitoring (Linux)
- Teach you how to ensure password security under the Linux operating system (Linux)
- CentOS 6.4 RPM install MySQL-5.6.22-1 (Database)
- How to modify the Linux NIC eth1 to eth0 (Linux)
- Nine trick to let you speed up the old machine running Ubuntu Linux (Linux)
- CentOS yum configuration under local sources (Linux)
- Git Tutorial Comments (Linux)
- AWR Report (Database)
- Vim simple configuration (Linux)
- MySQL thread cache thread_cache_size parameter optimization (Database)
- The method of CentOS-7.0. The installation and configuration of Tomcat-7 (Server)
- MySQL binlog group to submit XA (two-phase commit) (Database)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.