Linux SSH实用技巧几则(4)
3.804767 185.216.140.36 -> 157.119.69.59 TCP 60 51426 > 52622 [SYN] Seq=0 Win=1024 Len=0 3.806149 Cisco_d3:c7:bf -> Broadcast ARP 60 Who has 103.248.220.121? Tell 103.248.220.1 3.807153 Cisco_d3:c7:bf -> Broadcast ARP 60 Who has 103.248.221.171? Tell 103.248.221.1 3.809116 fe80::a563:2c5c:97df:13ca -> ff02::1:2 DHCPv6 148 Solicit XID: 0x5c67c7 CID: 000100011dd4af3b00155d6d3404 3.811726 Cisco_d3:c7:bf -> Broadcast ARP 60 Who has 202.74.232.203? Tell 202.74.232.1 3.812418 Cisco_d3:c7:bf -> Broadcast ARP 60 Who has 157.119.71.127? Tell 157.119.71.1 3.819393 fe80::910c:1871:e52f:9b82 -> ff02::1:2 DHCPv6 152 Solicit XID: 0x8a263a CID: 00010001205a760c00155df47d05 3.838355 Cisco_d3:c7:bf -> Broadcast ARP 60 Who has 202.74.234.147? Tell 202.74.234.1 3.840331 45.249.181.172 -> 239.255.255.250 SSDP 216 M-SEARCH * HTTP/1.1 3.840570 58.215.162.105 -> 142.252.251.70 TCP 66 outlaws > 65522 [ACK] Seq=49 Ack=95665 Win=117 Len=0 TSval=2402288220 TSecr=2506305625 3.840608 142.252.251.70 -> 58.215.162.105 TCP 1434 65522 > outlaws [ACK] Seq=97033 Ack=49 Win=309 Len=1368 TSval=2506305664 TSecr=2402288220 … 执行脚本 我们先写一个简单脚本获取远程主机一些信息,包括主机名、uptime,内存,磁盘和内核信息: #!/bin/bash
echo "---------主机名--------------------------------------------" hostnamectl echo -e "\n" echo "---------系统信息------------------------------------------" uptime echo -e "\n" echo "---------可用内存------------------------------------------" free -m echo -e "\n" echo "---------磁盘信息------------------------------------------" df -h echo -e "\n" echo "---------内核版本-------------------------------------------" uname -a echo -e "\n" (编辑:ASP站长网) |