In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces what are the more practical tools for Linux operation and maintenance, which have certain reference value. Interested friends can refer to it. I hope you will gain a lot after reading this article. Let Xiaobian take you to understand it together.
1. View bandwidth usage of processes-Nethogs
Nethogs is a terminal network traffic monitoring tool that visually displays the bandwidth consumed by each process.
Download: sourceforge.net/projects/nethogs/files/nethogs/0.8/nethogs-0.8.0.tar.gz/download
[root@localhost ~]#yum-y install libpcap-develncurses-devel [root@localhost ~]# tar zxvf nethogs-0.8.0.tar.gz [root@localhost ~]# cd nethogs [root@localhost nethogs]# make && make install [root@localhost nethogs]# nethogs eth0
2. Hard disk read performance test-IOZone
IOZone is a Linux file system performance testing tool that tests the read and write performance of file systems on different operating systems.
Download: www.iozone.org/src/current/
[root@localhost current]# tar xvf iozone3_420.tar [root@localhost ~]# cd iozone3_420/src/current/ [root@localhost current]# make linux [root@localhost current]# ./ iozone -a -n 512m -g 16g -i 0 -i 1 -i 5 -f /mnt/iozone -Rb ./ iozone.xls
-a Use fully automatic mode
-n Sets the minimum file size (Kbytes) for automatic mode.
-g Sets the maximum file size that can be used in automatic mode in Kbytes.
-i is used to specify which test to run.
-f Specify the name of the test file and delete it automatically after completion
-R generates Excel to standard output
-b specifies output to specified file
3, Real-time monitoring disk IO-IOTop
IOTop command is a special command to display hard disk IO, interface style similar to the top command.
[root@localhost ~]# yum -y install iotop
IPtraf IPtraf is a simple network analysis tool running under Linux.
[root@localhost ~]# yum -y install iptraf
5. Network traffic monitoring-IFTop
iftop is a real-time traffic monitoring tool similar to top under linux. More intuitive than iptraf.
Download: www.ex-parrot.com/~pdw/iftop/
[root@localhost ~]# tar zxvf iftop-0.17.tar.gz [root@localhost ~]# cd iftop-0.17 [root@localhost iftop-0.17]# ./ configure [root@localhost iftop-0.17]# make && make install [root@localhost iftop-0.17]# iftop [root@localhost iftop-0.17]# iftop -i eth0#Specify the monitor NIC interface
TX: transmit traffic
RX: Receive Traffic
TOTAL: Total flow
Cumm: Total traffic from running iftop to the present time
peak: peak flow
rates: average flow rates for the past 2s, 10s, 40s, respectively
6, Process real-time monitoring-HTop
HTop is an interactive process browser for Linux that replaces the Linux top command.
rpm -ivh http://pkgs.repoforce.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm (install 3rd party YUM source)[root@localhost ~]# yum -y install htop
7. System Resource Monitoring-NMON
NMON is a widely used monitoring and analysis tool on AIX and various Linux operating systems
Download:
http://sourceforge.jp/projects/sfnet_nmon/releases/[root@localhost ~]# chmod +x nmon_x86_64_rhel6 [root@localhost ~]# mv nmon_x86_64_rhel6 /usr/sbin/nmon [root@localhost ~]# nmon
Monitoring multiple logs-MultiTail
MultiTail is a software that opens multiple windows in the console to monitor multiple log files simultaneously, similar to tail commands.
rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm (install third-party YUM source)[root@localhost ~]# yum -y installmultitail [root@localhost ~]# multitail -e "fail" /var/log/secure #filter keywords to monitor [root@localhost ~]# multitail -l "ping baidu.com" #monitor commands that follow-l commands to be executed [root@localhost ~]# multitail -i /var/log/messages -i /var/log/secure #-i Specify a file name
SSH Brute Force Protection-Fail2ban
Fail2ban can monitor your system log and match the error information in the log. Regular formula matching performs the corresponding shielding action. In general, it calls firewall shielding.
Download: www.fail2ban.org/wiki/index.php/Downloads
[root@localhost ~]# cd fail2ban-0.8.11 [root@localhost fail2ban-0.8.11]# python setup.py install [root@localhost fail2ban-0.8.11]# cd files/ [root@localhost files]# cp ./ redhat-initd /etc/init.d/fail2ban [root@localhost files]# service fail2ban start [root@localhost files]# chkconfig --add fail2ban [root@localhost files]# chkconfig fail2ban on
Note: You need to configure iptables to be practical. If you restart iptables, you should also restart fail2ban, because the principle of fail2ban is to call iptables to block external attacks in real time.
[root@localhost ~]# grep -v "^#" /etc/fail2ban/jail.conf | grep -v "^$" [DEFAULT] ignoreip = 127.0.0.1/8 #ignore native IP bantime= 600 #lockdown time after rule compliance findtime= 600 #lockdown time after rule compliance maxretry = #Maximum number of attempts backend = auto #Log modification detection logs gamin, polling and auto usedns = warn [ssh-iptables] enabled= true #Default is disabled false filter = sshd action = iptables[name=SSH, port=ssh, protocol=tcp] # sendmail-whois[name=SSH,dest= recipient mailbox, sender= sender mailbox, sendername="Fail2Ban"] logpath= /var/log/sshd.log #Error log for response is typically at/var/log/secure maxretry = 5 #Number of error attempts overrides maxretry in global
Note: By default, all application protection is off, and we need to manually turn it on. The fail2ban.conf file is log information, and the jail.conf file is protection specific service and action configuration information.
[root@localhost ~]#touch/var/log/sshd.log [root@localhost ~]# service fail2ban restart [root@localhost ~]# fail2ban-client status#View Monitoring is on Status|- Number of jail:1 `- Jail list: ssh-iptables [root@localhost ~]# iptables -L iptables filter table has fail2ban a rule fail2ban-SSHtcp--anywhere anywheretcp dpt:ssh
10. Connection session termination persistence-Tmux
Tmux is an excellent terminal reuse software like GNU Screen that is more versatile, flexible and efficient than Screen. To make sure that dropping SSH connections doesn't affect the task.
rpm -ivh http://pkgs.repoforce.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm (install 3rd party YUM source)
Pages showing disk space usage-Agedu
Download: www.chiark.greenend.org.uk/~sgtatham/agedu/
[root@localhost ~]# tar zxvf agedu-r9723.tar.gz [root@localhost ~]# cd agedu-r9723 [root@localhost ~]# ./ configure [root@localhost ~]# make && make install [root@localhost ~]# agedu -s /#-s scan [root@localhost ~]# agedu -w --address 192.168.0.10:80#-w Enter a web link [root@localhost ~]# agedu -w -address 192.168.0.108080 --auth none#--auth turn off authentication If you don't add a port number, it generates a random browser access
12. Security scanning tool-NMap
NMap is a network connection scanning and sniffing toolkit for Linux used to scan open network connections on computers on the Internet.
Download: nmap.org/download.html
[root@localhost ~]# tar jxvf nmap-6.40.tar.bz2 [root@localhost nmap-6.40]# ./ configure [root@localhost nmap-6.40]# make && make install [root@localhost ~]# nmap 192.168.0.10 #Get basic information [root@localhost ~]# nmap -O 192.168.0.10 #Get system version information [root@localhost ~]# nmap -A 192.168.0.10 #Get comprehensive system information [root@localhost ~]# nmap 192.168.0.0/24#Get basic information of working devices of a network segment-sSTCP scanning-sV system version detection
Web stress test-Httperf
Httperf is more powerful than ab and can test the maximum amount of service a web service can carry and identify potential problems such as memory usage and stability. The biggest advantage: you can specify the rules for pressure testing, simulating the real environment.
Download: code.google.com/p/httperf/downloads/list
[root@localhost ~]# tar zxvf httperf-0.9.0.tar.gz [root@localhost ~]# cd httperf-0.9.0 [root@localhost httperf-0.9.0]# ./ configure [root@localhost httperf-0.9.0]# make && make install [root@localhost ~]# httperf --hog --server=192.168.0.202 --uri=/index.html --num-conns= 10000 --wsess=10,10,0.1 Thank you for reading this article carefully. I hope that the article "What are the more practical tools for Linux operation and maintenance" shared by Xiaobian will be helpful to everyone. At the same time, I hope everyone will support me more, pay attention to the industry information channel, and more relevant knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.