Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Linux command to view the system status     - How to use GRUB2 files directly from the hard disk to run ISO (Linux)

- Use JMS listener Oracle AQ, trigger the execution of Java programs in the database changes (Database)

- Restore Oracle Database Cold backup and database reconstruction emca (Database)

- Linux supports serial output method (Linux)

- Lazarus IDE Start Basics Tutorial (Linux)

- Compiling source code Nginx module installation subs_filter (Server)

- CentOS 6.5 install VNC-Server (Linux)

- OpenWRT environment to build (Linux)

- Oracle Bug caused by the collection of AWR Snapshot fault (Database)

- MySQL5.7 JSON type using presentation (Database)

- How open source code libraries hosted on Github (Linux)

- 10 tips daily Docker (Server)

- Reported too many open files Linux solutions (Server)

- Linux (CentOS) directory file management and file system file compression packing (Linux)

- Mind mapping software installed in CentOS 7 in XMind (Linux)

- Let Mac OS X dedicated high-speed mobile hard disk can also be read in Linux (Linux)

- Several back door and log tool under Linux (Linux)

- Node.js form --formidable (Programming)

- Linux Shell Scripting Interview Question (Linux)

- MongoDB study notes - polymerization (Database)

 
         
  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:      
 
- Use top to monitor the remote server (Server)
- Analytical Ceph: handle network layer (Server)
- Developing a Web server yourself (Server)
- Lua non-blocking write log (Programming)
- Linux VMware virtual machine after the cloning of the card can not start to solve (Linux)
- Redis performance test (Database)
- Docker + OpenvSwitch build experimental environment VxLAN (Server)
- Nginx request processing (Server)
- Linux to achieve a simple cp command (Linux)
- Oracle 11gr2 new APPEND_VALUES tips (Database)
- Deploy Apache Spark cluster environment in Ubuntu (Server)
- RPM package fabrication method (Linux)
- Linux system last command usage (Linux)
- To read the Linux ext3 / ext4 format partitions under Windows system software (Linux)
- Chromium Install Flash Official Guide (Linux)
- A brief description of Java 8 new features introduced syntax (Programming)
- RedHat yum configuration and the prompt (Linux)
- Using PPA to install the lightweight theme software HotShots 2.1.0 under Ubuntu (Linux)
- Sublime Text 3 (Linux)
- Install Web-based monitoring tool: Linux-Dash (Server)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.