#用户登陆显示cpu、负载、内存信息 #!/bin/bash # hostip=`ifconfig eth0 |awk -F" +|:" '/Bcast/{print $4}'` date=`date "+%F %T %A"` load=`uptime |awk -F: '{print $NF}'` usage=`df -h / | awk 'NR==2{print $(NF-1)}'` fssize=`df -h / |awk 'NR==2{print $2}'` usernum=`uptime |awk '{print $4}'` memused=`free -k |awk '/Mem/ {print $3/$2*100}'`% echo -e '