| #!/bin/sh |
| |
| |
| |
| |
| if (t_GetPkgRel basesystem | grep -q el6) |
| then |
| t_Log "Running $0 - rrdtool: create rrd, write values and retrieve values test." |
| |
| |
| |
| FILE="/var/tmp/temperature.rrd" |
| |
| rrdtool create $FILE --step 1 DS:temp:GAUGE:600:-273:5000 RRA:AVERAGE:0.5:1:1200 |
| |
| |
| rrdtool update $FILE N:30 |
| |
| |
| WORKING=$(rrdtool fetch $FILE AVERAGE -s -80 |grep -c '3.0000000000e+01') |
| |
| |
| if [ $WORKING > 0 ]; then ret_val=0; |
| fi |
| |
| |
| /bin/rm $FILE |
| |
| t_CheckExitStatus $ret_val |
| else |
| echo "Skipped on CentOS 5" |
| fi |