1. 程式人生 > 實用技巧 >NO.B.0008——簡單檢查

NO.B.0008——簡單檢查


一、簡單檢查:1、簡單檢查:使用ICMP協議或者TCP協議進行檢查某個服務或者裝置的存活。2、關閉zabbix-agent.service模擬測試,

1、SMTP檢查:安裝postfix 檢查SMTP服務。
[root@localhost ~]# vim /etc/postfix/main.cf                //郵件傳輸代理軟體
inet_interfaces = 192.168.1.60
mydestination = $myhostname, localhost.$mydomain, localhost    // localhost開放

[root@localhost ~]# systemctl restart postfix.service 
[root@localhost ~]# ss -tunlp
users:(("sshd",pid=22755,fd=3))
tcp    LISTEN     0      100           192.168.1.60:25      *:*    

[root@localhost ~]# telnet 192.168.1.60 25    //簡單檢查我們的25埠開啟
Trying 192.168.1.60...
Connected to 192.168.1.60.
Escape character is '^]'.
220 localhost.localdomain ESMTP Postfix
ctrl+]
telnet>quit

SMTP的值是1
2、ICMP檢查:
安裝fping工具:
[root@localhost ~]# yum -y install fping
 [root@localhost ~]# ping 192.168.1.59
PING 192.168.1.59 (192.168.1.59) 56(84) bytes of data.
64 bytes from 192.168.1.59: icmp_seq=1 ttl=64 time=2.53 ms

ICMP顯示的是ping值








Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart ——W.S.Landor



來自為知筆記(Wiz)