Linux系统管理员应该知道的20个系统监控命令
时间:2010-04-15 来源:ckone9087
详见:http://www.cyberciti.biz/tips/top-linux-monitoring-tools.html
20 Linux System Monitoring Tools Every SysAdmin Should Know
by Vivek Gite · 112 comments
Need to monitor Linux server performance? Try these built-in command and a few add-on tools. Most Linux distributions are equipped with tons of monitoring. These tools provide metrics which can be used to get information about system activities. You can use these tools to find the possible causes of a performance problem. The commands discussed below are some of the most basic commands when it comes to system analysis and debugging server issues such as:
- Finding out bottlenecks.
- Disk (storage) bottlenecks.
- CPU and memory bottlenecks.
- Network bottlenecks.
Fig.01: Linux top command
Commonly Used Hot Keys
The top command provides several useful hot keys:
Hot Key | Usage |
---|---|
t | Displays summary information off and on. |
m | Displays memory information off and on. |
A | Sorts the display by top consumers of various system resources. Useful for quick identification of performance-hungry tasks on a system. |
f | Enters an interactive configuration screen for top. Helpful for setting up top for a specific task. |
o | Enables you to interactively select the ordering within top. |
r | Issues renice command. |
k | Issues kill command. |
z | Turn on or off color/mono |
=> Related: How do I Find Out Linux CPU Utilization?
How do I find out Linux Resource utilization to detect system bottlenecks?
Linux Find Out Virtual Memory PAGESIZE
-
How much RAM does my Ubuntu / Fedora Linux desktop PC have?
Linux Track NFS Directory / Disk I/O Stats
How to collect Linux system utilization data into a file
Linux display each multiple SMP CPU processors utilization individually.
Linux find the memory used by a program / process using pmap command
-
Get Detailed Information About Particular IP address Connections Using netstat Command
Fig.02: General interface statistics: IP traffic statistics by network interface
Fig.03 Network traffic statistics by TCP connection
wireshark to view detailed information about files, enter:
# tcpdump -n -i eth1 -s 0 -w output.txt src or dst port 80
trace the process and see What it is doing.
Linux kernel /proc documentations for further details. Common /proc examples:
# cat /proc/cpuinfo
# cat /proc/meminfo
# cat /proc/zoneinfo
# cat /proc/mounts
Nagios is a popular open source computer system and network monitoring application software. You can easily monitor all your hosts, network equipment and services. It can send alert when things go wrong and again when they get better. FAN is "Fully Automated Nagios". FAN goals are to provide a Nagios installation including most tools provided by the Nagios Community. FAN provides a CDRom image in the standard ISO format, making it easy to easilly install a Nagios server. Added to this, a wide bunch of tools are including to the distribution, in order to improve the user experience around Nagios.
to install and configure Cacti network graphing tool under CentOS / RHEL.
Fig.05 KDE System Guard {Image credit: Wikipedia}
See the KSysguard handbook for detailed usage.
Fig.06 The Gnome System Monitor application