In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail about the 12 very practical Linux tools which are specific, the content of the article is of high quality, so the editor will share it with you for reference. I hope you will have some understanding of the relevant knowledge after reading this article.
This paper introduces 12 practical tools for Linux operation and maintenance, hoping to be helpful to Linux operation and maintenance personnel.
1. Check the bandwidth consumed by the process-Nethogs
Nethogs is a terminal network traffic monitoring tool that can visually display the bandwidth occupied by each process.
Download: http://sourceforge.net/projects/nethogs/files/nethogs/0.8/nethogs-0.8.0.tar.gz/download
[root@localhost ~] # yum-y install libpcap-devel ncurses-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
Install under Ubuntu
Linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt install nethogs
two。 Hard disk read performance Test-IOZone
IOZone is a Linux file system performance testing tool that can test the read and write performance of file systems in different operating systems.
Download: http://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
Ubuntu
Linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt-get install iozone3
-a use full automatic mode
-n sets the minimum file size (Kbytes) for automatic mode.
-g sets the maximum file size Kbytes that can be used in automatic mode.
-I is used to specify which test to run.
-f specifies that the name of the test file is automatically deleted after completion
-R generates Excel to standard output
-b specifies the output to the specified file
3. Real-time monitor disk IO-IOTop
The IOTop command is a command that specifically displays the hard disk IO, and the interface style is similar to the top command.
[root@localhost] # yum-y install iotop or linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt install iotop
4. Network traffic monitoring-IFTop
Iftop is a real-time traffic monitoring tool similar to top under Linux. More intuitive than iptraf.
Download: http://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 monitoring Nic interface
TX: sending traffic
RX: receive traffic
TOTAL: total traffic
Cumm: total traffic from running iftop to the current time
Peak: peak traffic
Rates: indicates the average traffic in the past 2s, 10s, 40s respectively
5. Real-time process monitoring-HTop
HTop is an interactive process browser under Linux that can be used to replace top commands under Linux.
Rpm-ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm (install a third-party YUM source)
[root@localhost] # yum-y install htop or linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt install htop
6. System resource monitoring-NMON
NMON is a monitoring and analysis tool widely used in 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
7. Monitor multiple logs-MultiTail
MultiTail is a software that opens multiple windows in the console to monitor multiple log documents at the same time, similar to tail commands.
Rpm-ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm (install a third-party YUM source)
[root@localhost ~] # yum-y install multitail [root@localhost ~] # multitail-e "fail" / var/log/secure # filter keywords for monitoring [root@localhost ~] # multitail-l "ping baidu.com" # Monitor commands to be executed [root@localhost ~] # multitail-I / var/log/messages-I / var/log/secure #-I specify a file name
Ubuntu
Linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt install multitail
8. SSH brute force cracking protection-Fail2ban
Fail2ban can monitor your system log and match the error messages in the log. Regular matching performs corresponding masking actions. In general, it invokes firewall masking.
Download: http://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 utility, and restart fail2ban if you restart iptables, 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 findtime ignore native IP bantime = 600 # blockade time after compliance with the rules findtime = 600 # within how long if the blockade reaches 3 times in 600 seconds, maxretry = 3 # maximum number of attempts Backend = auto # log modification detection log gamin, Polling and auto: usedns = warn [ssh-iptables] enabled = true# is disabled by default: 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 # the error log of the response is generally / var/log/secure maxretry = 5 # maxretry in the global number of attempts and errors
Note: all application protection is turned off by default and needs to be turned on manually. The fail2ban.conf file is the log information, and the jail.conf file is the specific service and action configuration information protected.
[root@localhost ~] # touch / var/log/sshd.log [root@localhost ~] # service fail2ban restart [root@localhost ~] # fail2ban-client status # View that monitoring has been enabled Status |-Number of jail: 1 `- Jail list: ssh-iptables [root@localhost ~] # iptables-L # iptables filter table has a fail2ban rule fail2ban-SSH tcp-anywhere anywhere tcp dpt:ssh
9. Connection session terminal persistence-Tmux
Tmux is an excellent terminal reuse software. Similar to GNU Screen, it is more flexible and efficient than Screen. To ensure that the disconnection to the SSH does not affect the running of the task.
Rpm-ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm (install a third-party YUM source)
Ubuntu
Linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt install tmux
10. The page shows disk space usage-Agedu
Download: http://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 root@localhost 80 #-w enter a web link [root@localhost ~ ] # agedu-w-- address 192.168.0.108080-- auth none #-- auth turns off authentication if no port number is added, it will generate a random browser access-- address
Ubuntu
Linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt-get install agedu
11. Security scanning tool-NMap
NMap is the network connection scanning and sniffing tool kit under Linux that is used to scan the open network connection end of the computer on the Internet.
Download: http://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 the comprehensive information of the system [root@localhost ~] # nmap 192.168.0.0 Universe 24 # get the basic information of the working equipment of a network segment
Ubuntu
Linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt install nmap
-sSTCP scan
-sV system version detection
12. Web stress Test-Httperf
Httperf is more powerful than ab and can test the maximum amount of services that web services can carry and identify potential problems, such as memory usage and stability. Greatest advantage: you can specify rules for stress testing to simulate the real environment.
Download:
Http://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
Or
Ubuntu
Linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt install httperf
About 12 very useful Linux tools which are specific to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
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.