#!/bin/bash
a0=uptime | awk '{print $8}'
#a1=ifconfig eth0 | awk '/RX pac/{print $6,$7}'
a2=virsh nodeinfo
a3=ifconfig eth0 | awk '/RX pac/{print $6,$7}'
a4=ifconfig eth0 | awk '/TX pac/{print $6,$7}'
a5=free | awk '/[0-9]/{print $1,$4}'
a6=who | awk '{print $1}' | wc -l
a7=df | awk '/\/$/{print $4}'
a8=wc -l /etc/passwd | awk '{print $1}'
a9=ps aux | wc -l
a10=rpm -qa | wc -l
echo "当前安装的软件数为
$a10"
echo "当前开启的进程数为
$a9"
echo "当前登陆的人数为
$a8"
echo "当前计算机的用户数量为
$a7"
echo "当前根分区的剩余容量为为
$a6"
echo "当前内存剩余为
$a5"
echo "当前网卡的接受流量为
$a3"
echo "当前网卡的发送流量为
$a4"
echo "当前的CPU占用为
$a0"