Gnuplot Cpu Usage Script
Gnuplot Cpu Usage Script
Gnuplot Cpu Usage Script
/bin/bash
# Usage
show_help(){
echo "Usage is $0 a|m|n|c|h"
echo "-a or --all to plot cpu(c),mem(m) and net(n)"
}
graph
}
# Plot memory usage
plotmem(){
fileType="png"
output='"memory.png"'
title='"memory-usage"'
xlabel='"time"'
ylabel='"size(Mb)"'
plot=( '"stat.dat"' using 1:8 title '"used"' with lines,'"stat.dat"' using 1:9
title '"buff"' with lines, '"stat.dat"' using 1:10 title '"cach"' with
lines,'"stat.dat"' using 1:11 title '"free"' with lines )
plot=( '"stat.dat"' using 1:11 title '"sent"' with lines,'"stat.dat"' using 1:12
title '"recvd"' with lines )
graph