代码如下:#!/bin/bashload=`uptime`shijian=`date +%Y-%m-%d-%T`file=cpustatus.txttouch $fileall=`cat $file |wc -l`printf “$load $shijian\n” >> $file if [[ $all > 60 ]] ; thenstarttime=`cat $file |awk ‘{print $13}’|sort -r|tail -1`stoptime=`cat $file |awk ‘{print $13}’|sort -n|tail -1`loadavg=`cat $file |aw