每位linux系统管理员必须知道的20条监控工具Fig.01: Linux top commandCommonly Used Hot KeysThe top com
每位linux系统管理员必须知道的20条监控工具
Fig.01: Linux top command
Commonly Used Hot KeysThe top command provides several useful hot keys:Fig.02: General interface statistics: IP traffic statistics by network interface
Fig.03 Network traffic statistics by TCP connection
#14: tcpdump - Detailed Network Traffic AnalysisThe tcpdump is simplecommand that dump traffic on a network.However, you need goodunderstanding of TCP/IP protocol to utilize thistool. For.e.g todisplay traffic info about DNS, enter: # tcpdump -i eth1 'udp port 53' To display all IPv4 HTTP packets to and from port 80, i.e. printonlypackets that contain data, not, for example, SYN and FIN packetsandACK-only packets, enter: # tcpdump 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' To display all FTP session to 202.54.1.5, enter: # tcpdump -i eth1 'dst 202.54.1.5 and (port 21 or 20' To display all HTTP session to 192.168.1.5: # tcpdump -ni eth0 'dst 192.168.1.5 and tcp and port http' Use wireshark to view detailed information about files, enter: # tcpdump -n -i eth1 -s 0 -w output.txt src or dst port 80
#15: strace -??System CallsTrace system calls and signals. This is useful for debugging??Fig.05 KDE System Guard {Image credit: Wikipedia}
See the KSysguard handbook for detailed usage.
#20: Gnome System Monitor - Real-time Systems Reporting and GraphingTheSystem Monitor application enables you to display basicsysteminformation and monitor system processes, usage of systemresources,and file systems. You can also use System Monitor to modifythebehavior of your system. Although not as powerful as the KDESystemGuard, it provides the basic information which may be useful fornewusers: Displays various basic information about the computer's hardware and software. Linux Kernel version Fig.06 The Gnome System Monitor application
Bounce: Additional ToolsA few more tools:nmap - scan your server for open ports.lsof - list open files, network connections and much more.ntopwebbased tool - ntop is the best tool to see network usage in a waysimilarto what top command does for processes i.e. it is networktrafficmonitoring software. You can see network status, protocolwisedistribution of traffic for UDP, TCP, DNS, HTTP and other protocols.Conky-Another good monitoring tool for the X Window System. It ishighlyconfigurable and is able to monitor many system variablesincluding thestatus of the CPU, memory, swap space, disk storage,temperatures,processes, network interfaces, battery power, systemmessages, e-mailinboxes etc.GKrellM-It can be used to monitor the status of CPUs, main memory, harddisks,network interfaces, local and remote mailboxes, and many otherthings.vnstat-vnStat is a console-based network traffic monitor. It keeps a logofhourly, daily and monthly network traffic for the selectedinterface(s).htop - htop is an enhanced version of top, the interactive process viewer, which can display the list of processes in a tree form.mtr -??mtr combines the functionality of the traceroute and ping programs in a single network diagnostic tool.
Did I miss something? Please add your favorite system motoring tool in the comments.