【找一找青春】Linux 性能監控之CPU&內存&IO監控Shell腳本1[轉]

#!/bin/bash # 獲取要監控的本地服務器IP地址 IP=`ifconfig eth0 | grep "inet addr" | cut -f 2 -d ":" | cut -f 1 -d " "` echo "IP地址:"$IP # 獲取cpu總核數 cpu_num=`grep -c "model name" /proc/cpuinfo` echo "cpu總核數:"$cpu_num
相關文章
相關標籤/搜索