[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [hobbit] rrdtool from private scripts



On 10/18/06, Ralph Mitchell <ralphmitchell (at) gmail.com> wrote:
On 10/18/06, Rob Munsch <rmunsch (at) solutionsforprogress.com> wrote:
>
>
> ipmitool sensor | grep Temp | awk -F\| '{print $1,$2,$3,$4}' >
> $BBTMP/cputemp.$host
>
> cpu_temp=`tail -n 4 $BBTMP/cputemp.$host |head -n 1 | awk '{print $2}'
> |sed 's/\..*//g'`

Is there a compelling reason not to fold the above into one line:

temp=`ipmitool sensor | tail -n 4 | head -n 1 | awk '{ print $3 }'`

Wups, my bad... Make that:

    cpu_temp=`ipmitool sensor | tail -n 4 | head -n 1 | awk '{ print
$3 }' | sed -e 's/\..*//'`

Ralph