Updated gentasktime script to handle weeks in relative output
This will have the nice effect of compressing old datamaster
parent
d5dc7c76d8
commit
1f83630527
|
@ -25,12 +25,15 @@ domake \
|
||||||
last=""
|
last=""
|
||||||
}
|
}
|
||||||
|
|
||||||
/days ago|^(1[5-9]|2[0-9]) hours ago/{
|
/(days|weeks) ago|^(1[5-9]|2[0-9]) hours ago/{
|
||||||
if ( $0 ~ /hours/ ) {
|
if ( $0 ~ /hours/ ) {
|
||||||
$1 = 1
|
$1 = 1
|
||||||
}
|
}
|
||||||
|
if ( $0 ~ /weeks/ ) {
|
||||||
|
$1 = $1*7
|
||||||
|
}
|
||||||
if ( $1 == last ) next;
|
if ( $1 == last ) next;
|
||||||
if ( $1 < last ) nextfile;
|
if ( $1 < last ) next;
|
||||||
last = $1;
|
last = $1;
|
||||||
print $1, $NF;
|
print $1, $NF;
|
||||||
}
|
}
|
||||||
|
@ -41,6 +44,6 @@ domake \
|
||||||
&& echo -n "-$n " \
|
&& echo -n "-$n " \
|
||||||
&& gendate \
|
&& gendate \
|
||||||
&& tail -n1 taskstats.dat \
|
&& tail -n1 taskstats.dat \
|
||||||
|| exit 1
|
|| { echo "Aborting data gathering."; exit 1; }
|
||||||
done
|
done
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue