On Mon, 1 Dec 2008 22:11:58 +0200 "Daniel Iliev" <[EMAIL PROTECTED]> wrote:
[snip-]
> for (( i=0 ; i<=400 ; i++ ))
> do
>
> sync
> echo 3 > /proc/sys/vm/drop_caches
>
> echo -n "try_no=$i "
>
> /usr/bin/time -f "\
> command=%C|\
> real_t=%e|\
> kernel_t=%S|\
[-snip-]
The results are ready. I'm just sending them w/o any analysis, because
I've got no time right now. I just took a bare look for any obvious
mistakes and found that I have left "space" instead of "pipe" for
separator between the first two fields (see the quote above). To
fix this, one can issue:
IFS="|";bzcat results.txt.bz2 | \
sed 's/try_no=\(.*\) command/\1|command/g'
To get only specific fields (id real time and io wait for example), one
can issue:
IFS="|";bzcat results.txt.bz2 | \
sed 's/try_no=\(.*\) command/\1|command/g' | \
while read id comm rt kt ut maf mif csw iow fsr fsw
do
echo "$id $rt $iow"
done
To get only the values and specific parts of the string, one could use
${var##*=} and ${var:offset:length}. Example:
IFS="|";bzcat results.txt.bz2 | \
sed 's/try_no=\(.*\) command/\1|command/g' | \
while read id comm rt kt ut maf mif csw iow fsr fsw
do
echo -e "${comm:11:5}\t${rt##*=}\t${iow##*=}"
done
Tonight I hope I'll have more time to discuss the results. I believe
the format is not hard to parse for input into an SQL backend in order
to use a statistics application for analysis and graphical
representation (RRDtool, perhaps?).
--
Best regards,
Daniel
results.txt.bz2
Description: BZip2 compressed data

