自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

12款非常實(shí)用的Linux工具

系統(tǒng) Linux
本文介紹12款 Linux 運(yùn)維比較實(shí)用的工具,希望對(duì) Linux 運(yùn)維人員有所幫助。

本文介紹12款 Linux 運(yùn)維比較實(shí)用的工具,希望對(duì) Linux 運(yùn)維人員有所幫助。

1、查看進(jìn)程占用帶寬情況 - Nethogs

Nethogs 是一個(gè)終端下的網(wǎng)絡(luò)流量監(jiān)控工具可以直觀的顯示每個(gè)進(jìn)程占用的帶寬。

下載:http://sourceforge.net/projects/nethogs/files/nethogs/0.8/nethogs-0.8.0.tar.gz/download 

  1. [root@localhost ~]#yum  -y install libpcap-devel  ncurses-devel  
  2. [root@localhost ~]# tar zxvf nethogs-0.8.0.tar.gz  
  3. [root@localhost ~]# cd nethogs  
  4. [root@localhost nethogs]# make && make install  
  5. [root@localhost nethogs]# nethogs eth0 

Ubuntu下安裝

linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt install nethogs

2. 硬盤(pán)讀取性能測(cè)試 - IOZone

IOZone 是一款 Linux 文件系統(tǒng)性能測(cè)試工具 可以測(cè)試不同的操作系統(tǒng)中文件系統(tǒng)的讀寫(xiě)性能。

下載:http://www.iozone.org/src/current/ 

  1. [root@localhost current]# tar xvf iozone3_420.tar  
  2. [root@localhost ~]# cd iozone3_420/src/current/  
  3. [root@localhost current]# make linux 

Ubuntu

linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt-get install iozone3

-a 使用全自動(dòng)模式

-n 為自動(dòng)模式設(shè)置最小文件大小 (Kbytes)。

-g 設(shè)置自動(dòng)模式可使用的最大文件大小 Kbytes。

-i 用來(lái)指定運(yùn)行哪個(gè)測(cè)試。

-f 指定測(cè)試文件的名字完成后自動(dòng)刪除

-R 產(chǎn)生 Excel 到標(biāo)準(zhǔn)輸出

-b 指定輸出到指定文件上 

3、實(shí)時(shí)監(jiān)控磁盤(pán) IO-IOTop

IOTop 命令是專(zhuān)門(mén)顯示硬盤(pán) IO 的命令, 界面風(fēng)格類(lèi)似 top 命令。   

  1. [root@localhost ~]# yum -y install iotop  
  2.     或者  
  3. linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt install iotop 

4、網(wǎng)絡(luò)流量監(jiān)控 - IFTop

iftop 是類(lèi)似于 Linux 下面 top 的實(shí)時(shí)流量監(jiān)控工具。比 iptraf 直觀些。

下載:http://www.ex-parrot.com/~pdw/iftop/ 

  1. [root@localhost ~]# tar zxvf iftop-0.17.tar.gz  
  2. [root@localhost ~]# cd iftop-0.17   
  3. [root@localhost iftop-0.17]# ./configure  
  4. [root@localhost iftop-0.17]# make && make install  
  5. [root@localhost iftop-0.17]# iftop  
  6. [root@localhost iftop-0.17]# iftop -i eth0  # 指定監(jiān)控網(wǎng)卡接口 

TX:發(fā)送流量

RX:接收流量

TOTAL:總流量

Cumm:運(yùn)行 iftop 到目前時(shí)間的總流量

peak:流量峰值

rates:分別表示過(guò)去 2s 10s 40s 的平均流量

5、進(jìn)程實(shí)時(shí)監(jiān)控 - HTop

HTop 是一個(gè) Linux 下的交互式的進(jìn)程瀏覽器可以用來(lái)替換 Linux 下的 top 命令。

rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm(安裝第三方 YUM 源)   

  1. [root@localhost ~]# yum -y install htop 
  2.    或者 
  3. linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt install htop 

6、系統(tǒng)資源監(jiān)控 - NMON

NMON 是一種在 AIX 與各種 Linux 操作系統(tǒng)上廣泛使用的監(jiān)控與分析工具

下載:http://sourceforge.jp/projects/sfnet_nmon/releases/   

  1. [root@localhost ~]# chmod +x nmon_x86_64_rhel6  
  2.    [root@localhost ~]# mv nmon_x86_64_rhel6 /usr/sbin/nmon  
  3.    [root@localhost ~]# nmon 

7、監(jiān)控多個(gè)日志 - MultiTail

MultiTail 是在控制臺(tái)打開(kāi)多個(gè)窗口用來(lái)實(shí)現(xiàn)同時(shí)監(jiān)控多個(gè)日志文檔、類(lèi)似 tail 命令的功能的軟件。

rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm (安裝第三方 YUM 源)   

  1. [root@localhost ~]# yum -y install  multitail  
  2. [root@localhost ~]# multitail -e "fail" /var/log/secure   #篩選關(guān)鍵字進(jìn)行監(jiān)控  
  3. [root@localhost ~]# multitail -l "ping baidu.com"   #監(jiān)控后面的命令 - l 將要執(zhí)行的命令  
  4. [root@localhost ~]# multitail -i /var/log/messages -i /var/log/secure #-i 指定一個(gè)文件名 

Ubuntu

linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt install multitail

8. SSH 暴力破解防護(hù) - Fail2ban

Fail2ban 可以監(jiān)視你的系統(tǒng)日志然后匹配日志的錯(cuò)誤信息正則式匹配執(zhí)行相應(yīng)的屏蔽動(dòng)作一般情況下是調(diào)用防火墻屏蔽

下載:http://www.fail2ban.org/wiki/index.php/Downloads 

  1. [root@localhost ~]# cd fail2ban-0.8.11   
  2. [root@localhost fail2ban-0.8.11]# python setup.py install  
  3. [root@localhost fail2ban-0.8.11]# cd files/  
  4. [root@localhost files]# cp ./redhat-initd /etc/init.d/fail2ban  
  5. [root@localhost files]# service fail2ban start  
  6. [root@localhost files]# chkconfig --add fail2ban  
  7. [root@localhost files]# chkconfig fail2ban on 

注:需要配置 iptables 實(shí)用,如果重啟 iptables 了也要重啟 fail2ban,因?yàn)?fail2ban 的原理是調(diào)用 iptables 實(shí)時(shí)阻擋外界的攻擊。   

  1. [root@localhost ~]# grep -v "^#" /etc/fail2ban/jail.conf | grep -v "^$"   
  2.    [DEFAULT]  
  3.    ignoreip = 127.0.0.1/8# 忽略本機(jī) IP  
  4.    bantime  = 600   #符合規(guī)則后封鎖時(shí)間  
  5.    findtime  = 600  # 在多長(zhǎng)時(shí)間內(nèi)符合規(guī)則執(zhí)行封鎖如 600 秒達(dá)到 3 次則執(zhí)行  
  6.    maxretry = 3    # 最大嘗試次數(shù)  
  7.    backend = auto   #日志修改檢測(cè)日志 gamin、polling 和 auto 這三種  
  8.    usedns = warn  
  9.    [ssh-iptables]  
  10.    enabled  = true# 默認(rèn)是禁用 false  
  11.    filter   = sshd  
  12.    action   = iptables[name=SSHport=sshprotocol=tcp 
  13.    # sendmail-whois[name=SSH,dest = 收件人郵箱, sender = 發(fā)件人郵箱, sendername="Fail2Ban" 
  14.    logpath  = /var/log/sshd.log  # 響應(yīng)的錯(cuò)誤日志一般在 / var/log/secure  
  15.    maxretry = 5    # 嘗試錯(cuò)誤次數(shù)覆蓋全局中的 maxretry 

注:默認(rèn)所有的應(yīng)用防護(hù)都是關(guān)閉的,需要我們手動(dòng)開(kāi)啟。fail2ban.conf 文件是日志信息,jail.conf 文件是保護(hù)的具體服務(wù)和動(dòng)作配置信息。 

  1. [root@localhost ~]# touch /var/log/sshd.log  
  2. [root@localhost ~]# service fail2ban restart  
  3. [root@localhost ~]# fail2ban-client status    # 查看監(jiān)控已經(jīng)開(kāi)啟  
  4. Status   
  5. |- Number of jail:      1  
  6. `- Jail list:           ssh-iptables  
  7. [root@localhost ~]# iptables -L  #iptables 過(guò)濾表有 fail2ban 一條規(guī)則  
  8. fail2ban-SSH  tcp  --  anywhere             anywhere            tcp dpt:ssh 

9. 連接會(huì)話(huà)終端持續(xù)化 - Tmux

Tmux 是一個(gè)優(yōu)秀的終端復(fù)用軟件類(lèi)似 GNU Screen 比 Screen 更加方面、靈活和高效。為了確保連接 SSH 時(shí)掉線(xiàn)不影響任務(wù)運(yùn)行。

rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm(安裝第三方 YUM 源)

Ubuntu

linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt install tmux

10. 頁(yè)面顯示磁盤(pán)空間使用情況 - Agedu

下載:http://www.chiark.greenend.org.uk/~sgtatham/agedu/   

  1. [root@localhost ~]# tar zxvf agedu-r9723.tar.gz  
  2.    [root@localhost ~]# cd agedu-r9723  
  3.    [root@localhost ~]# ./configure  
  4.    [root@localhost ~]# make && make install  
  5.    [root@localhost ~]# agedu -s /    #-s 掃描  
  6.    [root@localhost ~]# agedu -w --address 192.168.0.10:80  #-w 輸入一個(gè)網(wǎng)頁(yè)鏈接 
  7.    [root@localhost ~]# agedu -w --address 192.168.0.108080 --auth none  #--auth 關(guān)閉認(rèn)證如果不加端口號(hào)會(huì)生成一個(gè)隨機(jī)的用瀏覽器訪問(wèn)  
  8.    --address  

Ubuntu

linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt-get install agedu

 

11、安全掃描工具 - NMap

NMap 是 Linux 下的網(wǎng)絡(luò)連接掃描和嗅探工具包用來(lái)掃描網(wǎng)上電腦開(kāi)放的網(wǎng)絡(luò)連接端。

下載:http://nmap.org/download.html 

  1. [root@localhost ~]# tar jxvf nmap-6.40.tar.bz2  
  2.   [root@localhost nmap-6.40]# ./configure  
  3.   [root@localhost nmap-6.40]# make && make install  
  4.   [root@localhost ~]# nmap 192.168.0.10   #獲取基本信息  
  5.   [root@localhost ~]# nmap -O 192.168.0.10 #獲取系統(tǒng)版本信息 
  6.   [root@localhost ~]# nmap -A 192.168.0.10 #獲取系統(tǒng)綜合信息  
  7.   [root@localhost ~]# nmap 192.168.0.0/24  # 獲取一個(gè)網(wǎng)段工作設(shè)備基本信息 

Ubuntu

linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt install nmap

-sSTCP 掃描

-sV 系統(tǒng)版本檢測(cè)

12、Web 壓力測(cè)試 - Httperf

Httperf 比 ab 更強(qiáng)大,能測(cè)試出 web 服務(wù)能承載的最大服務(wù)量及發(fā)現(xiàn)潛在問(wèn)題;比如:內(nèi)存使用、穩(wěn)定性。最大優(yōu)勢(shì):可以指定規(guī)律進(jìn)行壓力測(cè)試,模擬真實(shí)環(huán)境。

下載:

  1. http://code.google.com/p/httperf/downloads/list  
  1. [root@localhost ~]# tar zxvf httperf-0.9.0.tar.gz  
  2.   [root@localhost ~]# cd httperf-0.9.0   
  3.   [root@localhost httperf-0.9.0]# ./configure  
  4.   [root@localhost httperf-0.9.0]# make && make install  
  5.   [root@localhost ~]# httperf --hog --server=192.168.0.202 --uri=/index.html --num-conns=10000 --wsess=10,10,0.1 

或者

Ubuntu

linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt install httperf

 

 

責(zé)任編輯:龐桂玉 來(lái)源: Linux公社
相關(guān)推薦

2011-01-25 09:26:30

2021-01-26 12:16:00

Python開(kāi)發(fā)工具

2011-08-01 10:36:35

CSS

2016-09-18 23:33:22

實(shí)時(shí)分析網(wǎng)站

2024-02-20 07:32:18

Rsync遠(yuǎn)程同步工具傳輸數(shù)據(jù)

2015-11-02 09:25:07

jQuery代碼片段

2016-05-10 10:16:13

JavaScript技巧

2020-09-21 09:50:07

Linux工具命令

2013-12-06 14:09:22

Linux運(yùn)維工具

2023-01-28 23:23:51

軟件監(jiān)測(cè)工具

2022-12-06 17:18:42

2023-08-03 07:05:28

電腦軟件工具

2021-08-25 10:55:43

Linux命令工具

2017-09-05 08:57:02

Linux命令行技巧

2015-05-25 11:04:25

超實(shí)用開(kāi)發(fā)框架

2014-02-12 13:30:16

Linux命令行終端工具

2011-04-15 17:30:38

前端開(kāi)發(fā)開(kāi)發(fā)工具開(kāi)發(fā)

2016-12-27 09:59:46

GUILinux磁盤(pán)掃描工具

2022-07-10 00:01:43

漏洞工具安全

2022-04-22 10:41:53

HTML標(biāo)簽功能
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)