#!/usr/bin/perl
#
# CPU‰·“x
$cputemp = `/usr/bin/sensors | grep CPU_Temp | awk '\{print \$2\}' | sed -e 's/+//' -e 's/[^0-9+\.].*//'`;
chomp $cputemp;
# HDD‰·“x
$hddtemp = `/usr/sbin/smartctl -i -d ata -a /dev/sda | grep -w "Temperature_Celsius" | awk '\{print \$10\}' `;
$temp = "cputemp:$cputemp hddtemp:$hddtemp";
chomp $temp;
print $temp;