[go: up one dir, main page]

File: fkt_bufstats

package info (click to toggle)
fxt 0.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,208 kB
  • ctags: 1,970
  • sloc: sh: 11,340; ansic: 7,915; perl: 3,268; asm: 598; makefile: 202
file content (22 lines) | stat: -rwxr-xr-x 724 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
EPS=${1/.bufdat/.eps}
[ -n "$1" -a -n "$2" -a "$2" != "$1" ] && EPS="$2"

if [ "$EPS" = "$1" ]
then
	echo "Usage: $0 file.bufdat [output.eps]"
	exit 1
fi

(cat << EOF
set terminal postscript eps enhanced color solid
set xlabel "Mcy"
set key top left
plot "$1" using (\$2/1000000):(\$1) title "probes" with lines lt 7,\
     "$1" using (\$2/1000000):(\$4) title "synchronizations" with points pt 5,\
     "$1" using (\$2/1000000):(\$3) title "writing" with lines lt 3,\
     "$1" using (\$2/1000000):(\$5+\$6) title "written" with lines lt 2,\
     "$1" using (\$2/1000000):(\$5+\$6+\$7) title "available" with lines lt 1,\
     "$1" using (\$2/1000000):(\$7) title "pages" with lines lt 6
EOF
) | gnuplot > $EPS