代码如下:#!/bin/bash#This script is use for describle CPU Hard Memery Utilizationtotal=0idle=0system=0user=0nice=0mem=0vmexec=/usr/bin/vmstatwhich sar > /dev/null 2>&1if [ $? -ne 0 ]then ver=`vmstat -V | awk ‘{printf $3}’` nice=0 temp=`vmstat 1 3 |tail -1` user=`echo $temp |awk ‘{printf(“%s\n”,$13)}
1