dodb.cr/bin/extract-final-data.sh

25 lines
696 B
Bash
Raw Normal View History

2024-05-12 16:47:53 +02:00
#!/bin/sh
if [ $# -ne 1 ]
then
echo "usage: $0 result-directory"
exit 0
fi
d=$1
echo "from data (.d) to truncated data (.t)"
for i in $d/*.d
do
fname=$(echo $i | sed "s/[.]d$/.t/")
awk '{ print $2, $3, $5 }' < $i > $fname
done
awk '{ print $1 }' < $d/ram_index.d > it
mkdir data
echo "from truncated data (.t) to graphed data data/XXX.d"
paste it $d/ram_index.t $d/cached_index.t $d/semi_index.t $d/uncached_index.t > ./data/index.d
paste it $d/ram_partitions.t $d/cached_partitions.t $d/semi_partitions.t $d/uncached_partitions.t > ./data/partitions.d
paste it $d/ram_tags.t $d/cached_tags.t $d/semi_tags.t $d/uncached_tags.t > ./data/tags.d