#!/bin/sh if [ -z "$1" ]; then url="https://cdn.pmylund.com/files/tools/" else url=$1 fi echo $url #yum安装 yum install lm_sensors ipmitool -y sh -c "yes|sensors-detect" #下载cpuburn cd /srv/ curl -LO ${url}cpuburn-1.0-amd64.tar.gz echo '#!/bin/sh date +%Y%m%d_%H%M%S >> /srv/cpuburn.out sensors >> /srv/cpuburn.out ipmitool sdr >> /srv/cpuburn.out' > /srv/sensors.sh echo "*/5 * * * * sh /srv/sensors.sh" >> /var/spool/cron/root tar -xvf cpuburn-1.0-amd64.tar.gz #运行cpuburn cd /srv/cpuburn date +%Y%m%d_%H%M%S > /srv/cpuburn.out ./cpuburn -u 600 >> /srv/cpuburn.out & echo "-------------run cpuburn------------------" && tail -f /srv/cpuburn.out