├── graphs
├── cpu.png
├── ram.png
├── proc.png
├── swap.png
├── tasks.png
├── sockets.png
├── contextsw.png
├── iotransfer.png
├── loadaverage.png
└── netinterface.png
├── sarviewer.properties
├── plotters
├── gnuplot
│ ├── proc.gplot
│ ├── contextsw.gplot
│ ├── swap.gplot
│ ├── iotransfer.gplot
│ ├── netinterface.gplot
│ ├── cpu.gplot
│ ├── loadaverage.gplot
│ ├── tasks.gplot
│ ├── sockets.gplot
│ └── ram.gplot
└── matplotlib
│ ├── proc.py
│ ├── contextsw.py
│ ├── swap.py
│ ├── netinterface.py
│ ├── cpu.py
│ ├── loadaverage.py
│ ├── iotransfer.py
│ ├── tasks.py
│ ├── sockets.py
│ └── ram.py
├── plotter.sh
├── data
├── proc.dat
├── sockets.dat
├── netinterface.dat
├── swap.dat
├── iotransfer.dat
├── loadaverage.dat
├── cpu.dat
└── ram.dat
├── data_collector.sh
├── system_data_reader.sh
├── README.md
└── LICENSE
/graphs/cpu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/juliojsb/sarviewer/HEAD/graphs/cpu.png
--------------------------------------------------------------------------------
/graphs/ram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/juliojsb/sarviewer/HEAD/graphs/ram.png
--------------------------------------------------------------------------------
/graphs/proc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/juliojsb/sarviewer/HEAD/graphs/proc.png
--------------------------------------------------------------------------------
/graphs/swap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/juliojsb/sarviewer/HEAD/graphs/swap.png
--------------------------------------------------------------------------------
/graphs/tasks.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/juliojsb/sarviewer/HEAD/graphs/tasks.png
--------------------------------------------------------------------------------
/graphs/sockets.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/juliojsb/sarviewer/HEAD/graphs/sockets.png
--------------------------------------------------------------------------------
/graphs/contextsw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/juliojsb/sarviewer/HEAD/graphs/contextsw.png
--------------------------------------------------------------------------------
/graphs/iotransfer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/juliojsb/sarviewer/HEAD/graphs/iotransfer.png
--------------------------------------------------------------------------------
/graphs/loadaverage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/juliojsb/sarviewer/HEAD/graphs/loadaverage.png
--------------------------------------------------------------------------------
/graphs/netinterface.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/juliojsb/sarviewer/HEAD/graphs/netinterface.png
--------------------------------------------------------------------------------
/sarviewer.properties:
--------------------------------------------------------------------------------
1 | #
2 | # sarviewer configuration file
3 | #
4 |
5 | # LC_TIME controls time format. To correctly draw the graphs, we need 24 hour time format
6 | # By default, POSIX. DO NOT CHANGE
7 | export LC_TIME="POSIX"
8 |
9 | # Variable graph_generator controls which scripts are used to generate the graphs
10 | # Possible values:
11 | # gnuplot
12 | # matplotlib
13 | # By default gnuplot
14 | graph_generator="gnuplot"
15 |
16 | # Log dir where sa* files are stored
17 | # By default folder /var/log/sysstat
18 | sysstat_logdir="/var/log/sysstat"
19 |
20 | # Variable network_interface specifies the interface for netinterface statistics graph
21 | # By default, eth0
22 | network_interface="eth0"
23 |
24 | # Default start time to parse statistics
25 | start_time="00:00:00"
26 |
27 | # Default end time to parse statistics
28 | end_time="23:59:59"
29 |
--------------------------------------------------------------------------------
/plotters/gnuplot/proc.gplot:
--------------------------------------------------------------------------------
1 | #!/usr/bin/gnuplot
2 | #
3 | # Script :proc.gplot
4 | # Author :Julio Sanz
5 | # Website :www.elarraydejota.com
6 | # Email :juliojosesb@gmail.com
7 | # Description :Script to create a graph about processes created per second
8 | # Dependencies :gnuplot
9 | # Usage :gnuplot proc.gplot
10 | # License :GPLv3
11 | #
12 |
13 | reset
14 |
15 | # Terminal config
16 | set terminal pngcairo enhanced font 'Verdana,8'
17 | set output '../../graphs/proc.png'
18 | set title "Processes"
19 | set key bmargin
20 |
21 | # Line style
22 | set style line 1 lc rgb '#e74c3c' pt 1 ps 1 lt 1 lw 2 # line1
23 |
24 | # Axis configuration
25 | set style line 11 lc rgb '#2c3e50' lt 1 lw 1.5 # Axis line
26 | set border 3 back ls 11
27 | set tics nomirror
28 | set autoscale xy
29 | set xdata time
30 | set timefmt "%H:%M:%S"
31 | set format x "%H:%M"
32 | set xlabel "Time"
33 | set ylabel "Processes"
34 |
35 | # Background grid
36 | set style line 11 lc rgb '#aeb6bf' lt 0 lw 2
37 | set grid back ls 11
38 |
39 | # Begin plotting
40 | plot '../../data/proc.dat' using 1:2 title 'Processes created per second' with l ls 1
41 |
--------------------------------------------------------------------------------
/plotters/gnuplot/contextsw.gplot:
--------------------------------------------------------------------------------
1 | #!/usr/bin/gnuplot
2 | #
3 | # Script :contextsw.gplot
4 | # Author :Julio Sanz
5 | # Website :www.elarraydejota.com
6 | # Email :juliojosesb@gmail.com
7 | # Description :Script to create a graph about context switches performed per second
8 | # Dependencies :gnuplot
9 | # Usage :gnuplot contextsw.gplot
10 | # License :GPLv3
11 | #
12 |
13 | reset
14 |
15 | # Terminal config
16 | set terminal pngcairo enhanced font 'Verdana,8'
17 | set output '../../graphs/contextsw.png'
18 | set title "Context switches"
19 | set key bmargin
20 |
21 | # Line style
22 | set style line 1 lc rgb '#e74c3c' pt 1 ps 1 lt 1 lw 2 # line1
23 | set style line 2 lc rgb '#3498db' pt 6 ps 1 lt 1 lw 2 # line2
24 |
25 | # Axis configuration
26 | set style line 11 lc rgb '#2c3e50' lt 1 lw 1.5 # Axis line
27 | set border 3 back ls 11
28 | set tics nomirror
29 | set autoscale xy
30 | set xdata time
31 | set timefmt "%H:%M:%S"
32 | set format x "%H:%M"
33 | set xlabel "Time"
34 | set ylabel "Context switches"
35 |
36 | # Background grid
37 | set style line 11 lc rgb '#aeb6bf' lt 0 lw 2
38 | set grid back ls 11
39 |
40 | # Begin plotting
41 | plot '../../data/proc.dat' using 1:3 title 'Context switches performed per second' with l ls 1
42 |
--------------------------------------------------------------------------------
/plotters/gnuplot/swap.gplot:
--------------------------------------------------------------------------------
1 | #!/usr/bin/gnuplot
2 | #
3 | # Script :swap.gplot
4 | # Author :Julio Sanz
5 | # Website :www.elarraydejota.com
6 | # Email :juliojosesb@gmail.com
7 | # Description :Script to create a SWAP usage graph with gnuplot
8 | # Dependencies :gnuplot
9 | # Usage :gnuplot swap.gplot
10 | # License :GPLv3
11 | #
12 |
13 | reset
14 |
15 | # Terminal config
16 | set terminal pngcairo enhanced font 'Verdana,8'
17 | set output '../../graphs/swap.png'
18 | set title "SWAP usage graph"
19 | set key bmargin
20 |
21 | # Lines
22 | set style line 1 lc rgb '#e74c3c' pt 1 ps 1 lt 1 lw 2 # line1
23 | set style line 2 lc rgb '#3498db' pt 6 ps 1 lt 1 lw 2 # line2
24 |
25 | # Axis configuration
26 | set style line 11 lc rgb '#2c3e50' lt 1 lw 1.5 # Axis line
27 | set border 3 back ls 11
28 | set tics nomirror
29 | set autoscale xy
30 | set xdata time
31 | set timefmt "%H:%M:%S"
32 | set format x "%H:%M"
33 | set xlabel "Time"
34 | set ylabel "SWAP (MB)"
35 |
36 | # Background grid
37 | set style line 11 lc rgb '#aeb6bf' lt 0 lw 2
38 | set grid back ls 11
39 |
40 | # Begin plotting
41 | plot '../../data/swap.dat' using 1:($2/1024) title 'Free' with l ls 1, \
42 | '' using 1:($3/1024) title 'Used' with l ls 2
43 |
--------------------------------------------------------------------------------
/plotters/gnuplot/iotransfer.gplot:
--------------------------------------------------------------------------------
1 | #!/usr/bin/gnuplot
2 | #
3 | # Script :iotransfer.gplot
4 | # Author :Julio Sanz
5 | # Website :www.elarraydejota.com
6 | # Email :juliojosesb@gmail.com
7 | # Description :Script to create a IO transfer (blocks written/read per second) graph
8 | # Dependencies :gnuplot
9 | # Usage :gnuplot iotransfer.gplot
10 | # License :GPLv3
11 | #
12 |
13 | reset
14 |
15 | # Terminal config
16 | set terminal pngcairo enhanced font 'Verdana,8'
17 | set output '../../graphs/iotransfer.png'
18 | set title "IO Transfer"
19 | set key bmargin
20 |
21 | # Line style
22 | set style line 1 lc rgb '#e74c3c' pt 1 ps 1 lt 1 lw 2 # line1
23 | set style line 2 lc rgb '#3498db' pt 6 ps 1 lt 1 lw 2 # line2
24 |
25 | # Axis configuration
26 | set style line 11 lc rgb '#2c3e50' lt 1 lw 1.5 # Axis line
27 | set border 3 back ls 11
28 | set tics nomirror
29 | set autoscale xy
30 | set xdata time
31 | set timefmt "%H:%M:%S"
32 | set format x "%H:%M"
33 | set xlabel "Time"
34 | set ylabel "Blocks per second"
35 |
36 | # Background grid
37 | set style line 11 lc rgb '#aeb6bf' lt 0 lw 2
38 | set grid back ls 11
39 |
40 | # Begin plotting
41 | plot '../../data/iotransfer.dat' using 1:5 title 'Blocks read per second' with l ls 1, \
42 | '' using 1:6 title 'Blocks written per second' with l ls 2
43 |
--------------------------------------------------------------------------------
/plotter.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Script :plotter.sh
4 | # Author :Julio Sanz
5 | # Website :www.elarraydejota.com
6 | # Email :juliojosesb@gmail.com
7 | # Description :Script to generate graphs in the folder graphs/ of this repository
8 | # Dependencies :sar,gnuplot
9 | # Usage :1)Give executable permissions to script -> chmod +x plotter.sh
10 | # 2)Execute script -> ./plotter.sh
11 | # License :GPLv3
12 | #
13 |
14 | # Read sarviewer.properties file
15 | . sarviewer.properties
16 |
17 | if [ $# -ne 0 ];then
18 | echo "This script doesn't accept parameters"
19 | elif [ "$graph_generator" == "gnuplot" ];then
20 | cd plotters/gnuplot
21 | gnuplot loadaverage.gplot
22 | gnuplot tasks.gplot
23 | gnuplot cpu.gplot
24 | gnuplot ram.gplot
25 | gnuplot swap.gplot
26 | gnuplot iotransfer.gplot
27 | gnuplot proc.gplot
28 | gnuplot contextsw.gplot
29 | gnuplot netinterface.gplot
30 | gnuplot sockets.gplot
31 | elif [ "$graph_generator" == "matplotlib" ];then
32 | cd plotters/matplotlib
33 | python loadaverage.py
34 | python tasks.py
35 | python cpu.py
36 | python ram.py
37 | python swap.py
38 | python iotransfer.py
39 | python proc.py
40 | python contextsw.py
41 | python netinterface.py
42 | python sockets.py
43 | else
44 | echo "Variable graph_generator must be \"gnuplot\" or \"matplotlib\", please check sarviewer.properties"
45 | fi
--------------------------------------------------------------------------------
/plotters/gnuplot/netinterface.gplot:
--------------------------------------------------------------------------------
1 | #!/usr/bin/gnuplot
2 | #
3 | # Script :netinterface.gplot
4 | # Author :Julio Sanz
5 | # Website :www.elarraydejota.com
6 | # Email :juliojosesb@gmail.com
7 | # Description :Script to create network interface statistics graph with gnuplot
8 | # Dependencies :gnuplot
9 | # Usage :gnuplot netinterface.gplot
10 | # License :GPLv3
11 | #
12 |
13 | reset
14 |
15 | # Graph terminal and general config
16 | set terminal pngcairo enhanced font 'Verdana,8'
17 | set output '../../graphs/netinterface.png'
18 | set title "Network statistics"
19 | set key bmargin
20 |
21 | # Styles for different lines
22 | set style line 1 lc rgb '#009973' pt 1 ps 1 lt 1 lw 2 # line1
23 | set style line 2 lc rgb '#b3b300' pt 6 ps 1 lt 1 lw 2 # line2
24 |
25 | # Axis configuration
26 | set style line 11 lc rgb '#2c3e50' lt 1 lw 1.5 # Axis line
27 | set border 3 back ls 11
28 | set tics nomirror
29 | set autoscale xy
30 | set xdata time
31 | set timefmt "%H:%M:%S"
32 | set format x "%H:%M"
33 | set xlabel "Time"
34 | set ylabel "Kb/s"
35 |
36 | # Background grid
37 | set style line 11 lc rgb '#aeb6bf' lt 0 lw 2
38 | set grid back ls 11
39 |
40 | # Begin plotting
41 | plot '../../data/netinterface.dat' using 1:5 title 'Kilobytes received per second' with l ls 1, \
42 | '' using 1:6 title 'Kilobytes sent per second' with l ls 2
43 |
--------------------------------------------------------------------------------
/plotters/gnuplot/cpu.gplot:
--------------------------------------------------------------------------------
1 | #!/usr/bin/gnuplot
2 | #
3 | # Script :cpu.gplot
4 | # Author :Julio Sanz
5 | # Website :www.elarraydejota.com
6 | # Email :juliojosesb@gmail.com
7 | # Description :Script to create a CPU usage graph with gnuplot
8 | # Dependencies :gnuplot
9 | # Usage :gnuplot cpu.gplot
10 | # License :GPLv3
11 | #
12 |
13 | reset
14 |
15 | # Graph terminal and general config
16 | set terminal pngcairo enhanced font 'Verdana,8'
17 | set output '../../graphs/cpu.png'
18 | set title "CPU usage graph"
19 | set key bmargin
20 |
21 | # Styles for different lines
22 | set style line 1 lc rgb '#e74c3c' pt 1 ps 1 lt 1 lw 2 # line1
23 | set style line 2 lc rgb '#3498db' pt 6 ps 1 lt 1 lw 2 # line2
24 | set style line 3 lc rgb '#28b463' pt 4 ps 1 lt 1 lw 2 # line3
25 |
26 | # Axis configuration
27 | set style line 11 lc rgb '#2c3e50' lt 1 lw 1.5 # Axis line
28 | set border 3 back ls 11
29 | set tics nomirror
30 | set autoscale xy
31 | set xdata time
32 | set timefmt "%H:%M:%S"
33 | set format x "%H:%M"
34 | set xlabel "Time"
35 | set ylabel "CPU %"
36 |
37 | # Background grid
38 | set style line 11 lc rgb '#aeb6bf' lt 0 lw 2
39 | set grid back ls 11
40 |
41 | # Begin plotting
42 | plot '../../data/cpu.dat' using 1:3 title 'User%' with l ls 1, \
43 | '' using 1:5 title 'System%' with l ls 2, \
44 | '' using 1:8 title 'Idle%' with l ls 3
45 |
--------------------------------------------------------------------------------
/plotters/gnuplot/loadaverage.gplot:
--------------------------------------------------------------------------------
1 | #!/usr/bin/gnuplot
2 | #
3 | # Script :loadaverage.gplot
4 | # Author :Julio Sanz
5 | # Website :www.elarraydejota.com
6 | # Email :juliojosesb@gmail.com
7 | # Description :Script to create a LoadAverage graph with gnuplot
8 | # Dependencies :gnuplot
9 | # Usage :gnuplot loadaverage.gplot
10 | # License :GPLv3
11 | #
12 |
13 | reset
14 |
15 | set terminal pngcairo enhanced font 'Verdana,8'
16 | set output '../../graphs/loadaverage.png'
17 | set title "System load average graph"
18 | set key bmargin
19 |
20 | # Styles for different lines
21 | set style line 1 lc rgb '#e74c3c' pt 1 ps 1 lt 1 lw 2 # line1
22 | set style line 2 lc rgb '#3498db' pt 6 ps 1 lt 1 lw 2 # line2
23 | set style line 3 lc rgb '#28b463' pt 4 ps 1 lt 1 lw 2 # line3
24 |
25 | # Axis configuration
26 | set style line 11 lc rgb '#2c3e50' lt 1 lw 1.5 # Axis line
27 | set border 3 back ls 11
28 | set tics nomirror
29 | set autoscale xy
30 | set xdata time
31 | set timefmt "%H:%M:%S"
32 | set format x "%H:%M"
33 | set xlabel "Time"
34 | set ylabel "Load average"
35 |
36 | # Background grid
37 | set style line 11 lc rgb '#aeb6bf' lt 0 lw 2
38 | set grid back ls 11
39 |
40 | # Begin plotting
41 | plot '../../data/loadaverage.dat' using 1:4 title '1 min' with l ls 1, \
42 | '' using 1:5 title '5 min' with l ls 2, \
43 | '' using 1:6 title '15 min' with l ls 3
44 |
--------------------------------------------------------------------------------
/plotters/gnuplot/tasks.gplot:
--------------------------------------------------------------------------------
1 | #!/usr/bin/gnuplot
2 | #
3 | # Script :tasks.gplot
4 | # Author :Julio Sanz
5 | # Website :www.elarraydejota.com
6 | # Email :juliojosesb@gmail.com
7 | # Description :Script to create tasks graph with gnuplot
8 | # Dependencies :gnuplot
9 | # Usage :gnuplot tasks.gplot
10 | # License :GPLv3
11 | #
12 |
13 | reset
14 |
15 | set terminal pngcairo enhanced font 'Verdana,8'
16 | set output '../../graphs/tasks.png'
17 | set title "Tasks graph"
18 | set key bmargin
19 |
20 | # Styles for different lines
21 | set style line 1 lc rgb '#e74c3c' pt 1 ps 1 lt 1 lw 2 # line1
22 | set style line 2 lc rgb '#3498db' pt 6 ps 1 lt 1 lw 2 # line2
23 | set style line 3 lc rgb '#28b463' pt 4 ps 1 lt 1 lw 2 # line3
24 |
25 | # Axis configuration
26 | set style line 11 lc rgb '#2c3e50' lt 1 lw 1.5 # Axis line
27 | set border 3 back ls 11
28 | set tics nomirror
29 | set autoscale xy
30 | set xdata time
31 | set timefmt "%H:%M:%S"
32 | set format x "%H:%M"
33 | set xlabel "Time"
34 | set ylabel "Tasks"
35 |
36 | # Background grid
37 | set style line 11 lc rgb '#aeb6bf' lt 0 lw 2
38 | set grid back ls 11
39 |
40 | # Begin plotting
41 | plot '../../data/loadaverage.dat' using 1:2 title 'Tasks in run queue' with l ls 1, \
42 | '' using 1:3 title 'Total active tasks (processes + threads)' with l ls 2, \
43 | '' using 1:7 title 'Blocked tasks' with l ls 3
44 |
--------------------------------------------------------------------------------
/plotters/gnuplot/sockets.gplot:
--------------------------------------------------------------------------------
1 | #!/usr/bin/gnuplot
2 | #
3 | # Script :sockets.gplot
4 | # Author :Julio Sanz
5 | # Website :www.elarraydejota.com
6 | # Email :juliojosesb@gmail.com
7 | # Description :Script to create sockets statistics graph with gnuplot
8 | # Dependencies :gnuplot
9 | # Usage :gnuplot sockets.gplot
10 | # License :GPLv3
11 | #
12 |
13 | reset
14 |
15 | # Graph terminal and general config
16 | set terminal pngcairo enhanced font 'Verdana,8'
17 | set output '../../graphs/sockets.png'
18 | set title "Sockets"
19 | set key bmargin
20 |
21 | # Styles for different lines
22 | set style line 1 lc rgb '#ff9933' pt 1 ps 1 lt 1 lw 2 # line1
23 | set style line 2 lc rgb '#66ccff' pt 1 ps 1 lt 1 lw 2 # line2
24 | set style line 3 lc rgb '#009933' pt 1 ps 1 lt 1 lw 2 # line3
25 | set style line 4 lc rgb '#cc3300' pt 1 ps 1 lt 1 lw 2 # line4
26 |
27 | # Axis configuration
28 | set style line 11 lc rgb '#2c3e50' lt 1 lw 1.5 # Axis line
29 | set border 3 back ls 11
30 | set tics nomirror
31 | set autoscale xy
32 | set xdata time
33 | set timefmt "%H:%M:%S"
34 | set format x "%H:%M"
35 | set xlabel "Time"
36 | set ylabel "Number of sockets"
37 |
38 | # Background grid
39 | set style line 11 lc rgb '#aeb6bf' lt 0 lw 2
40 | set grid back ls 11
41 |
42 | # Begin plotting
43 | plot '../../data/sockets.dat' using 1:($3+$7) title 'Total TCP sockets' with l ls 1, \
44 | '' using 1:3 title 'TCP sockets in use' with l ls 2, \
45 | '' using 1:4 title 'UDP sockets in use' with l ls 3, \
46 | '' using 1:7 title 'TCP sockets in TIME WAIT state' with l ls 4
47 |
--------------------------------------------------------------------------------
/plotters/gnuplot/ram.gplot:
--------------------------------------------------------------------------------
1 | #!/usr/bin/gnuplot
2 | #
3 | # Script :ram.gplot
4 | # Author :Julio Sanz
5 | # Website :www.elarraydejota.com
6 | # Email :juliojosesb@gmail.com
7 | # Description :Script to create a RAM usage graph with gnuplot
8 | # Dependencies :gnuplot
9 | # Usage :gnuplot ram.gplot
10 | # License :GPLv3
11 | #
12 |
13 | reset
14 |
15 | # Terminal config
16 | set terminal pngcairo enhanced font 'Verdana,8'
17 | set output '../../graphs/ram.png'
18 | set title "RAM usage graph"
19 | set key bmargin
20 |
21 | # Line style
22 | set style line 1 lc rgb '#e74c3c' pt 1 ps 1 lt 1 lw 2 # line1
23 | set style line 2 lc rgb '#3498db' pt 6 ps 1 lt 1 lw 2 # line2
24 | set style line 3 lc rgb '#28b463' pt 4 ps 1 lt 1 lw 2 # line3
25 | set style line 4 lc rgb '#f5b041' pt 4 ps 1 lt 1 lw 2 # line4
26 |
27 | # Axis configuration
28 | set style line 11 lc rgb '#2c3e50' lt 1 lw 1.5 # Axis line
29 | set border 3 back ls 11
30 | set tics nomirror
31 | set autoscale xy
32 | set xdata time
33 | set timefmt "%H:%M:%S"
34 | set format x "%H:%M"
35 | set xlabel "Time"
36 | set ylabel "Memory (MB)"
37 |
38 | # Background grid
39 | set style line 11 lc rgb '#aeb6bf' lt 0 lw 2
40 | set grid back ls 11
41 |
42 | # Begin plotting
43 | # Real free RAM = Free + cached + buffers
44 | # Real used RAM = Used - cached - buffers - free
45 | plot '../../data/ram.dat' using 1:($2/1024+$5/1024+$6/1024) title 'Free' with l ls 1, \
46 | '' using 1:($5/1024) title 'Buffers' with l ls 2, \
47 | '' using 1:($6/1024) title 'Cached' with l ls 3, \
48 | '' using 1:($3/1024-$5/1024-$6/1024) title 'Used' with l ls 4
49 |
--------------------------------------------------------------------------------
/plotters/matplotlib/proc.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python2
2 | """
3 | Author :Julio Sanz
4 | Website :www.elarraydejota.com
5 | Email :juliojosesb@gmail.com
6 | Description :Script to create a graph about processes created per second
7 | Dependencies :Python 2.x, matplotlib
8 | Usage :python proc.py
9 | License :GPLv3
10 | """
11 |
12 | import matplotlib
13 | matplotlib.use('Agg')
14 | import matplotlib.pyplot as plt
15 | import csv
16 | from datetime import datetime
17 | import matplotlib.dates
18 |
19 | # ======================
20 | # VARIABLES
21 | # ======================
22 |
23 | # Aesthetic parameters
24 | plt.rcParams.update({'font.size': 8})
25 | plt.rcParams['lines.linewidth'] = 1.5
26 | time_format = matplotlib.dates.DateFormatter('%H:%M:%S')
27 | plt.gca().xaxis.set_major_formatter(time_format)
28 | plt.gcf().autofmt_xdate()
29 |
30 | # Time (column 0)
31 | x = []
32 | # Data arrays
33 | procs_per_second = []
34 |
35 | # ======================
36 | # FUNCTIONS
37 | # ======================
38 |
39 | def generate_graph():
40 | with open('../../data/proc.dat', 'r') as csvfile:
41 | data_source = csv.reader(csvfile, delimiter=' ', skipinitialspace=True)
42 | for row in data_source:
43 | # [0] column is a time column
44 | # Convert to datetime data type
45 | a = datetime.strptime((row[0]),'%H:%M:%S')
46 | x.append((a))
47 | # The remaining columns contain data
48 | procs_per_second.append(row[1])
49 |
50 | # Plot lines
51 | plt.plot(x,procs_per_second, label='Processes created per second', color='r', antialiased=True)
52 |
53 | # Graph properties
54 | plt.xlabel('Time',fontstyle='italic')
55 | plt.ylabel('Processes',fontstyle='italic')
56 | plt.title('Processes created per second graph')
57 | plt.grid(linewidth=0.4, antialiased=True)
58 | plt.legend(loc='upper center', bbox_to_anchor=(0.5, -0.15), ncol=2, fancybox=True, shadow=True)
59 | plt.autoscale(True)
60 |
61 | # Graph saved to PNG file
62 | plt.savefig('../../graphs/proc.png', bbox_inches='tight')
63 | #plt.show()
64 |
65 | # ======================
66 | # MAIN
67 | # ======================
68 |
69 | if __name__ == '__main__':
70 | generate_graph()
--------------------------------------------------------------------------------
/plotters/matplotlib/contextsw.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python2
2 | """
3 | Author :Julio Sanz
4 | Website :www.elarraydejota.com
5 | Email :juliojosesb@gmail.com
6 | Description :Script to create a graph about context switches performed per second
7 | Dependencies :Python 2.x, matplotlib
8 | Usage :python contextsw.py
9 | License :GPLv3
10 | """
11 |
12 | import matplotlib
13 | matplotlib.use('Agg')
14 | import matplotlib.pyplot as plt
15 | import csv
16 | from datetime import datetime
17 | import matplotlib.dates
18 |
19 | # ======================
20 | # VARIABLES
21 | # ======================
22 |
23 | # Aesthetic parameters
24 | plt.rcParams.update({'font.size': 8})
25 | plt.rcParams['lines.linewidth'] = 1.5
26 | time_format = matplotlib.dates.DateFormatter('%H:%M:%S')
27 | plt.gca().xaxis.set_major_formatter(time_format)
28 | plt.gcf().autofmt_xdate()
29 |
30 | # Time (column 0)
31 | x = []
32 | # Data arrays
33 | contextsw_per_second = []
34 |
35 | # ======================
36 | # FUNCTIONS
37 | # ======================
38 |
39 | def generate_graph():
40 | with open('../../data/proc.dat', 'r') as csvfile:
41 | data_source = csv.reader(csvfile, delimiter=' ', skipinitialspace=True)
42 | for row in data_source:
43 | # [0] column is a time column
44 | # Convert to datetime data type
45 | a = datetime.strptime((row[0]),'%H:%M:%S')
46 | x.append((a))
47 | # The remaining columns contain data
48 | contextsw_per_second.append(row[2])
49 |
50 | # Plot lines
51 | plt.plot(x,contextsw_per_second, label='Context switches performed per second', color='r', antialiased=True)
52 |
53 | # Graph properties
54 | plt.xlabel('Time',fontstyle='italic')
55 | plt.ylabel('Context switches',fontstyle='italic')
56 | plt.title('Context switches')
57 | plt.grid(linewidth=0.4, antialiased=True)
58 | plt.legend(loc='upper center', bbox_to_anchor=(0.5, -0.15), ncol=2, fancybox=True, shadow=True)
59 | plt.autoscale(True)
60 |
61 | # Graph saved to PNG file
62 | plt.savefig('../../graphs/contextsw.png', bbox_inches='tight')
63 | #plt.show()
64 |
65 | # ======================
66 | # MAIN
67 | # ======================
68 |
69 | if __name__ == '__main__':
70 | generate_graph()
--------------------------------------------------------------------------------
/plotters/matplotlib/swap.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python2
2 | """
3 | Author :Julio Sanz
4 | Website :www.elarraydejota.com
5 | Email :juliojosesb@gmail.com
6 | Description :Script to create a graph about swap usage
7 | Dependencies :Python 2.x, matplotlib
8 | Usage :python swap.py
9 | License :GPLv3
10 | """
11 |
12 | import matplotlib
13 | matplotlib.use('Agg')
14 | import matplotlib.pyplot as plt
15 | import csv
16 | from datetime import datetime
17 | import matplotlib.dates
18 |
19 | # ======================
20 | # VARIABLES
21 | # ======================
22 |
23 | # Aesthetic parameters
24 | plt.rcParams.update({'font.size': 8})
25 | plt.rcParams['lines.linewidth'] = 1.5
26 | time_format = matplotlib.dates.DateFormatter('%H:%M:%S')
27 | plt.gca().xaxis.set_major_formatter(time_format)
28 | plt.gcf().autofmt_xdate()
29 |
30 | # Time (column 0)
31 | x = []
32 | # Data arrays
33 | swap_free = []
34 | swap_used = []
35 |
36 | # ======================
37 | # FUNCTIONS
38 | # ======================
39 |
40 | def generate_graph():
41 | with open('../../data/swap.dat', 'r') as csvfile:
42 | data_source = csv.reader(csvfile, delimiter=' ', skipinitialspace=True)
43 | for row in data_source:
44 | # [0] column is a time column
45 | # Convert to datetime data type
46 | a = datetime.strptime((row[0]),'%H:%M:%S')
47 | x.append((a))
48 | # The remaining columns contain data
49 | swap_free.append(str(int(row[1])/1024))
50 | swap_used.append(str(int(row[2])/1024))
51 |
52 |
53 | # Plot lines
54 | plt.plot(x,swap_used, label='Used', color='r', antialiased=True)
55 | plt.plot(x,swap_free, label='Free', color='g', antialiased=True)
56 |
57 | # Graph properties
58 | plt.xlabel('Time',fontstyle='italic')
59 | plt.ylabel('SWAP (MB)',fontstyle='italic')
60 | plt.title('SWAP usage graph')
61 | plt.grid(linewidth=0.4, antialiased=True)
62 | plt.legend(loc='upper center', bbox_to_anchor=(0.5, -0.15), ncol=2, fancybox=True, shadow=True)
63 | plt.autoscale(True)
64 |
65 | # Graph saved to PNG file
66 | plt.savefig('../../graphs/swap.png', bbox_inches='tight')
67 | #plt.show()
68 |
69 | # ======================
70 | # MAIN
71 | # ======================
72 |
73 | if __name__ == '__main__':
74 | generate_graph()
--------------------------------------------------------------------------------
/plotters/matplotlib/netinterface.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python2
2 | """
3 | Author :Julio Sanz
4 | Website :www.elarraydejota.com
5 | Email :juliojosesb@gmail.com
6 | Description :Generate net interface graph from netinterface.dat file
7 | Dependencies :Python 2.x, matplotlib
8 | Usage :python netinterface.py
9 | License :GPLv3
10 | """
11 |
12 | import matplotlib
13 | matplotlib.use('Agg')
14 | import matplotlib.pyplot as plt
15 | import csv
16 | from datetime import datetime
17 | import matplotlib.dates
18 |
19 | # ======================
20 | # VARIABLES
21 | # ======================
22 |
23 | # Aesthetic parameters
24 | plt.rcParams.update({'font.size': 8})
25 | plt.rcParams['lines.linewidth'] = 1.5
26 | time_format = matplotlib.dates.DateFormatter('%H:%M:%S')
27 | plt.gca().xaxis.set_major_formatter(time_format)
28 | plt.gcf().autofmt_xdate()
29 |
30 | # Time (column 0)
31 | x = []
32 | # Data arrays
33 | r_kb = []
34 | s_kb = []
35 |
36 | # ======================
37 | # FUNCTIONS
38 | # ======================
39 |
40 | def generate_graph():
41 | with open('../../data/netinterface.dat', 'r') as csvfile:
42 | data_source = csv.reader(csvfile, delimiter=' ', skipinitialspace=True)
43 | for row in data_source:
44 | # [0] column is a time column
45 | # Convert to datetime data type
46 | a = datetime.strptime((row[0]),'%H:%M:%S')
47 | x.append((a))
48 | # The remaining columns contain data
49 | r_kb.append(row[4])
50 | s_kb.append(row[5])
51 |
52 | # Plot lines
53 | plt.plot(x,r_kb, label='Kilobytes received per second', color='#009973', antialiased=True)
54 | plt.plot(x,s_kb, label='Kilobytes sent per second', color='#b3b300', antialiased=True)
55 |
56 | # Graph properties
57 | plt.xlabel('Time',fontstyle='italic')
58 | plt.ylabel('Kb/s',fontstyle='italic')
59 | plt.title('Network statistics')
60 | plt.grid(linewidth=0.4, antialiased=True)
61 | plt.legend(loc='upper center', bbox_to_anchor=(0.5, -0.18), ncol=2, fancybox=True, shadow=True)
62 | plt.autoscale(True)
63 |
64 | # Graph saved to PNG file
65 | plt.savefig('../../graphs/netinterface.png', bbox_inches='tight')
66 | #plt.show()
67 |
68 | # ======================
69 | # MAIN
70 | # ======================
71 |
72 | if __name__ == '__main__':
73 | generate_graph()
--------------------------------------------------------------------------------
/plotters/matplotlib/cpu.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python2
2 | """
3 | Author :Julio Sanz
4 | Website :www.elarraydejota.com
5 | Email :juliojosesb@gmail.com
6 | Description :Generate CPU graph from cpu.dat file
7 | Dependencies :Python 2.x, matplotlib
8 | Usage :python cpu.py
9 | License :GPLv3
10 | """
11 |
12 | import matplotlib
13 | matplotlib.use('Agg')
14 | import matplotlib.pyplot as plt
15 | import csv
16 | from datetime import datetime
17 | import matplotlib.dates
18 |
19 | # ======================
20 | # VARIABLES
21 | # ======================
22 |
23 | # Aesthetic parameters
24 | plt.rcParams.update({'font.size': 8})
25 | plt.rcParams['lines.linewidth'] = 1.5
26 | time_format = matplotlib.dates.DateFormatter('%H:%M:%S')
27 | plt.gca().xaxis.set_major_formatter(time_format)
28 | plt.gcf().autofmt_xdate()
29 |
30 | # Time (column 0)
31 | x = []
32 | # Data arrays
33 | user_cpu = []
34 | system_cpu = []
35 | idle_cpu = []
36 |
37 | # ======================
38 | # FUNCTIONS
39 | # ======================
40 |
41 | def generate_graph():
42 | with open('../../data/cpu.dat', 'r') as csvfile:
43 | data_source = csv.reader(csvfile, delimiter=' ', skipinitialspace=True)
44 | for row in data_source:
45 | # [0] column is a time column
46 | # Convert to datetime data type
47 | a = datetime.strptime((row[0]),'%H:%M:%S')
48 | x.append((a))
49 | # The remaining columns contain data
50 | user_cpu.append(row[2])
51 | system_cpu.append(row[4])
52 | idle_cpu.append(row[7])
53 |
54 | # Plot lines
55 | plt.plot(x,user_cpu, label='User %', color='g', antialiased=True)
56 | plt.plot(x,system_cpu, label='System %', color='r', antialiased=True)
57 | plt.plot(x,idle_cpu, label='Idle %', color='b', antialiased=True)
58 |
59 | # Graph properties
60 | plt.xlabel('Time',fontstyle='italic')
61 | plt.ylabel('CPU %',fontstyle='italic')
62 | plt.title('CPU usage graph')
63 | plt.grid(linewidth=0.4, antialiased=True)
64 | plt.legend(loc='upper center', bbox_to_anchor=(0.5, -0.15), ncol=2, fancybox=True, shadow=True)
65 | plt.autoscale(True)
66 |
67 | # Graph saved to PNG file
68 | plt.savefig('../../graphs/cpu.png', bbox_inches='tight')
69 | #plt.show()
70 |
71 | # ======================
72 | # MAIN
73 | # ======================
74 |
75 | if __name__ == '__main__':
76 | generate_graph()
--------------------------------------------------------------------------------
/plotters/matplotlib/loadaverage.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python2
2 | """
3 | Author :Julio Sanz
4 | Website :www.elarraydejota.com
5 | Email :juliojosesb@gmail.com
6 | Description :Generate Load Average graph from loadaverage.dat file
7 | Dependencies :Python 2.x, matplotlib
8 | Usage :python loadaverage.py
9 | License :GPLv3
10 | """
11 |
12 | import matplotlib
13 | matplotlib.use('Agg')
14 | import matplotlib.pyplot as plt
15 | import csv
16 | from datetime import datetime
17 | import matplotlib.dates
18 |
19 | # ======================
20 | # VARIABLES
21 | # ======================
22 |
23 | # Aesthetic parameters
24 | plt.rcParams.update({'font.size': 8})
25 | plt.rcParams['lines.linewidth'] = 1.5
26 | time_format = matplotlib.dates.DateFormatter('%H:%M:%S')
27 | plt.gca().xaxis.set_major_formatter(time_format)
28 | plt.gcf().autofmt_xdate()
29 |
30 | # Time (column 0)
31 | x = []
32 | # Data arrays
33 | m1 = []
34 | m5 = []
35 | m15 = []
36 |
37 | # ======================
38 | # FUNCTIONS
39 | # ======================
40 |
41 | def generate_graph():
42 | with open('../../data/loadaverage.dat', 'r') as csvfile:
43 | data_source = csv.reader(csvfile, delimiter=' ', skipinitialspace=True)
44 | for row in data_source:
45 | # [0] column is a time column
46 | # Convert to datetime data type
47 | a = datetime.strptime((row[0]),'%H:%M:%S')
48 | x.append((a))
49 | # The remaining columns contain data
50 | m1.append(row[3])
51 | m5.append(row[4])
52 | m15.append(row[5])
53 |
54 | # Plot lines
55 | plt.plot(x,m1, label='1 min', color='g', antialiased=True)
56 | plt.plot(x,m5, label='5 min', color='r', antialiased=True)
57 | plt.plot(x,m15, label='15 min', color='b', antialiased=True)
58 |
59 | # Graph properties
60 | plt.xlabel('Time',fontstyle='italic')
61 | plt.ylabel('Load average',fontstyle='italic')
62 | plt.title('Load average graph')
63 | plt.grid(linewidth=0.4, antialiased=True)
64 | plt.legend(loc='upper center', bbox_to_anchor=(0.5, -0.15), ncol=2, fancybox=True, shadow=True)
65 | plt.autoscale(True)
66 |
67 | # Graph saved to PNG file
68 | plt.savefig('../../graphs/loadaverage.png', bbox_inches='tight')
69 | #plt.show()
70 |
71 | # ======================
72 | # MAIN
73 | # ======================
74 |
75 | if __name__ == '__main__':
76 | generate_graph()
--------------------------------------------------------------------------------
/plotters/matplotlib/iotransfer.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python2
2 | """
3 | Author :Julio Sanz
4 | Website :www.elarraydejota.com
5 | Email :juliojosesb@gmail.com
6 | Description :Script to create a IO transfer (blocks written/read per second) graph
7 | Dependencies :Python 2.x, matplotlib
8 | Usage :python iotransfer.py
9 | License :GPLv3
10 | """
11 |
12 | import matplotlib
13 | matplotlib.use('Agg')
14 | import matplotlib.pyplot as plt
15 | import csv
16 | from datetime import datetime
17 | import matplotlib.dates
18 |
19 | # ======================
20 | # VARIABLES
21 | # ======================
22 |
23 | # Aesthetic parameters
24 | plt.rcParams.update({'font.size': 8})
25 | plt.rcParams['lines.linewidth'] = 1.5
26 | time_format = matplotlib.dates.DateFormatter('%H:%M:%S')
27 | plt.gca().xaxis.set_major_formatter(time_format)
28 | plt.gcf().autofmt_xdate()
29 |
30 | # Time (column 0)
31 | x = []
32 | # Data arrays
33 | b_read_second = []
34 | b_written_second = []
35 |
36 | # ======================
37 | # FUNCTIONS
38 | # ======================
39 |
40 | def generate_graph():
41 | with open('../../data/iotransfer.dat', 'r') as csvfile:
42 | data_source = csv.reader(csvfile, delimiter=' ', skipinitialspace=True)
43 | for row in data_source:
44 | # [0] column is a time column
45 | # Convert to datetime data type
46 | a = datetime.strptime((row[0]),'%H:%M:%S')
47 | x.append((a))
48 | # The remaining columns contain data
49 | b_read_second.append(row[4])
50 | b_written_second.append(row[5])
51 |
52 | # Plot lines
53 | plt.plot(x,b_read_second, label='Blocks read per second', color='r', antialiased=True)
54 | plt.plot(x,b_written_second, label='Blocks written per second', color='g', antialiased=True)
55 |
56 | # Graph properties
57 | plt.xlabel('Time',fontstyle='italic')
58 | plt.ylabel('Blocks per second',fontstyle='italic')
59 | plt.title('IO Transfer graph')
60 | plt.grid(linewidth=0.4, antialiased=True)
61 | plt.legend(loc='upper center', bbox_to_anchor=(0.5, -0.15), ncol=2, fancybox=True, shadow=True)
62 | plt.autoscale(True)
63 |
64 | # Graph saved to PNG file
65 | plt.savefig('../../graphs/iotransfer.png', bbox_inches='tight')
66 | #plt.show()
67 |
68 | # ======================
69 | # MAIN
70 | # ======================
71 |
72 | if __name__ == '__main__':
73 | generate_graph()
--------------------------------------------------------------------------------
/plotters/matplotlib/tasks.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python2
2 | """
3 | Author :Julio Sanz
4 | Website :www.elarraydejota.com
5 | Email :juliojosesb@gmail.com
6 | Description :Generate tasks graph from loadaverage.dat file
7 | Dependencies :Python 2.x, matplotlib
8 | Usage :python tasks.py
9 | License :GPLv3
10 | """
11 |
12 | import matplotlib
13 | matplotlib.use('Agg')
14 | import matplotlib.pyplot as plt
15 | import csv
16 | from datetime import datetime
17 | import matplotlib.dates
18 |
19 | # ======================
20 | # VARIABLES
21 | # ======================
22 |
23 | # Aesthetic parameters
24 | plt.rcParams.update({'font.size': 8})
25 | plt.rcParams['lines.linewidth'] = 1.5
26 | time_format = matplotlib.dates.DateFormatter('%H:%M:%S')
27 | plt.gca().xaxis.set_major_formatter(time_format)
28 | plt.gcf().autofmt_xdate()
29 |
30 | # Time (column 0)
31 | x = []
32 | # Data arrays
33 | t_run_queue = []
34 | t_total = []
35 | t_blocked = []
36 |
37 | # ======================
38 | # FUNCTIONS
39 | # ======================
40 |
41 | def generate_graph():
42 | with open('../../data/loadaverage.dat', 'r') as csvfile:
43 | data_source = csv.reader(csvfile, delimiter=' ', skipinitialspace=True)
44 | for row in data_source:
45 | # [0] column is a time column
46 | # Convert to datetime data type
47 | a = datetime.strptime((row[0]),'%H:%M:%S')
48 | x.append((a))
49 | # The remaining columns contain data
50 | t_run_queue.append(row[1])
51 | t_total.append(row[2])
52 | t_blocked.append(row[6])
53 |
54 | # Plot lines
55 | plt.plot(x,t_run_queue, label='Tasks in run queue', color='g', antialiased=True)
56 | plt.plot(x,t_total, label='Total active tasks (processes + threads)', color='r', antialiased=True)
57 | plt.plot(x,t_blocked, label='Blocked tasks', color='m', antialiased=True)
58 |
59 | # Graph properties
60 | plt.xlabel('Time',fontstyle='italic')
61 | plt.ylabel('Tasks',fontstyle='italic')
62 | plt.title('Tasks graph')
63 | plt.grid(linewidth=0.4, antialiased=True)
64 | plt.legend(loc='upper center', bbox_to_anchor=(0.5, -0.15), ncol=2, fancybox=True, shadow=True)
65 | plt.autoscale(True)
66 |
67 | # Graph saved to PNG file
68 | plt.savefig('../../graphs/tasks.png', bbox_inches='tight')
69 | #plt.show()
70 |
71 | # ======================
72 | # MAIN
73 | # ======================
74 |
75 | if __name__ == '__main__':
76 | generate_graph()
--------------------------------------------------------------------------------
/plotters/matplotlib/sockets.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python2
2 | """
3 | Author :Julio Sanz
4 | Website :www.elarraydejota.com
5 | Email :juliojosesb@gmail.com
6 | Description :Generate sockets graph from sockets.dat file
7 | Dependencies :Python 2.x, matplotlib
8 | Usage :python sockets.py
9 | License :GPLv3
10 | """
11 |
12 | import matplotlib
13 | matplotlib.use('Agg')
14 | import matplotlib.pyplot as plt
15 | import csv
16 | from datetime import datetime
17 | import matplotlib.dates
18 |
19 | # ======================
20 | # VARIABLES
21 | # ======================
22 |
23 | # Aesthetic parameters
24 | plt.rcParams.update({'font.size': 8})
25 | plt.rcParams['lines.linewidth'] = 1.5
26 | time_format = matplotlib.dates.DateFormatter('%H:%M:%S')
27 | plt.gca().xaxis.set_major_formatter(time_format)
28 | plt.gcf().autofmt_xdate()
29 |
30 | # Time (column 0)
31 | x = []
32 | # Data arrays
33 | t_tcp = []
34 | t_tcp_use = []
35 | t_udp_use = []
36 | t_tcp_time_wait = []
37 |
38 | # ======================
39 | # FUNCTIONS
40 | # ======================
41 |
42 | def generate_graph():
43 | with open('../../data/sockets.dat', 'r') as csvfile:
44 | data_source = csv.reader(csvfile, delimiter=' ', skipinitialspace=True)
45 | for row in data_source:
46 | # [0] column is a time column
47 | # Convert to datetime data type
48 | a = datetime.strptime((row[0]),'%H:%M:%S')
49 | x.append((a))
50 | # The remaining columns contain data
51 | t_tcp.append(str((int(row[2]))+(int(row[6]))))
52 | t_tcp_use.append(row[2])
53 | t_udp_use.append(row[3])
54 | t_tcp_time_wait.append(row[6])
55 |
56 | # Plot lines
57 | plt.plot(x,t_tcp, label='Total TCP sockets', color='#ff9933', antialiased=True)
58 | plt.plot(x,t_tcp_use, label='TCP sockets in use', color='#66ccff', antialiased=True)
59 | plt.plot(x,t_udp_use, label='UDP sockets in use', color='#009933', antialiased=True)
60 | plt.plot(x,t_tcp_time_wait, label='TCP sockets in TIME WAIT state', color='#cc3300', antialiased=True)
61 |
62 | # Graph properties
63 | plt.xlabel('Time',fontstyle='italic')
64 | plt.ylabel('Number of sockets',fontstyle='italic')
65 | plt.title('Sockets')
66 | plt.grid(linewidth=0.4, antialiased=True)
67 | plt.legend(loc='upper center', bbox_to_anchor=(0.5, -0.20), ncol=2, fancybox=True, shadow=True)
68 | plt.autoscale(True)
69 |
70 | # Graph saved to PNG file
71 | plt.savefig('../../graphs/sockets.png', bbox_inches='tight')
72 | #plt.show()
73 |
74 | # ======================
75 | # MAIN
76 | # ======================
77 |
78 | if __name__ == '__main__':
79 | generate_graph()
--------------------------------------------------------------------------------
/plotters/matplotlib/ram.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python2
2 | """
3 | Author :Julio Sanz
4 | Website :www.elarraydejota.com
5 | Email :juliojosesb@gmail.com
6 | Description :Generate RAM graph from ram.dat file
7 | Dependencies :Python 2.x, matplotlib
8 | Usage :python ram.py
9 | License :GPLv3
10 | """
11 |
12 | import matplotlib
13 | matplotlib.use('Agg')
14 | import matplotlib.pyplot as plt
15 | import csv
16 | from datetime import datetime
17 | import matplotlib.dates
18 |
19 | # ======================
20 | # VARIABLES
21 | # ======================
22 |
23 | # Aesthetic parameters
24 | plt.rcParams.update({'font.size': 8})
25 | plt.rcParams['lines.linewidth'] = 1.5
26 | time_format = matplotlib.dates.DateFormatter('%H:%M:%S')
27 | plt.gca().xaxis.set_major_formatter(time_format)
28 | plt.gcf().autofmt_xdate()
29 |
30 | # Time (column 0)
31 | x = []
32 | # Memory data arrays
33 | free_mem = []
34 | used_mem = []
35 | buffer_mem = []
36 | cached_mem = []
37 |
38 | # ======================
39 | # FUNCTIONS
40 | # ======================
41 |
42 | def generate_graph():
43 | with open('../../data/ram.dat', 'r') as csvfile:
44 | data_source = csv.reader(csvfile, delimiter=' ', skipinitialspace=True)
45 | for row in data_source:
46 | # [0] column is a time column
47 | # Convert to datetime data type
48 | a = datetime.strptime((row[0]),'%H:%M:%S')
49 | x.append((a))
50 | # The remaining columns contain data
51 | free_mem.append(str((int(row[1])/1024)+(int(row[4])/1024)+(int(row[5])/1024)))
52 | used_mem.append(str((int(row[2])/1024)-(int(row[4])/1024)-(int(row[5])/1024)))
53 | buffer_mem.append(str(int(row[4])/1024))
54 | cached_mem.append(str(int(row[5])/1024))
55 |
56 | # Plot lines
57 | plt.plot(x,free_mem, label='Free', color='g', antialiased=True)
58 | plt.plot(x,used_mem, label='Used', color='r', antialiased=True)
59 | plt.plot(x,buffer_mem, label='Buffer', color='b', antialiased=True)
60 | plt.plot(x,cached_mem, label='Cached', color='c', antialiased=True)
61 |
62 | # Graph properties
63 | plt.xlabel('Time',fontstyle='italic')
64 | plt.ylabel('Memory (MB)',fontstyle='italic')
65 | plt.title('RAM usage graph')
66 | plt.grid(linewidth=0.4, antialiased=True)
67 | plt.legend(loc='upper center', bbox_to_anchor=(0.5, -0.15), ncol=2, fancybox=True, shadow=True)
68 | plt.autoscale(True)
69 |
70 | # Graph saved to PNG file
71 | plt.savefig('../../graphs/ram.png', bbox_inches='tight')
72 | #plt.show()
73 |
74 | # ======================
75 | # MAIN
76 | # ======================
77 |
78 | if __name__ == '__main__':
79 | generate_graph()
--------------------------------------------------------------------------------
/data/proc.dat:
--------------------------------------------------------------------------------
1 | 20:02:54 0.00 593.50
2 | 20:02:56 0.50 1782.50
3 | 20:02:58 57.00 2444.50
4 | 20:03:00 6.00 1501.00
5 | 20:03:02 0.50 1236.00
6 | 20:03:04 0.00 1063.00
7 | 20:03:06 0.50 881.00
8 | 20:03:08 0.00 992.00
9 | 20:03:10 3.00 2237.00
10 | 20:03:12 40.00 14103.00
11 | 20:03:14 6.00 6154.50
12 | 20:03:16 2.50 5010.50
13 | 20:03:18 0.50 3409.50
14 | 20:03:20 0.00 2894.50
15 | 20:03:22 0.50 3606.50
16 | 20:03:24 0.00 2347.50
17 | 20:03:26 0.50 1558.00
18 | 20:03:28 0.00 1999.00
19 | 20:03:30 0.00 4105.00
20 | 20:03:32 3.50 3254.00
21 | 20:03:34 2.50 301308.00
22 | 20:03:36 5.00 118126.50
23 | 20:03:38 0.00 2838.00
24 | 20:03:40 5.00 274918.50
25 | 20:03:42 1.50 120408.50
26 | 20:03:44 0.00 374331.50
27 | 20:03:46 0.50 5179.50
28 | 20:03:48 0.00 6234.50
29 | 20:03:50 0.00 5373.00
30 | 20:03:52 4.00 5375.00
31 | 20:03:54 0.00 6883.00
32 | 20:03:56 0.50 5168.50
33 | 20:03:58 0.00 5856.50
34 | 20:04:00 0.00 15670.50
35 | 20:04:02 0.50 16869.50
36 | 20:04:04 4.50 16197.00
37 | 20:04:06 1.00 16740.50
38 | 20:04:08 0.00 15018.00
39 | 20:04:10 0.00 15729.00
40 | 20:04:12 1.00 20297.50
41 | 20:04:14 0.50 14469.50
42 | 20:04:16 0.50 11214.50
43 | 20:04:18 0.00 10384.50
44 | 20:04:20 0.00 11104.50
45 | 20:04:22 0.50 10534.00
46 | 20:04:24 0.00 10928.00
47 | 20:04:26 0.50 10040.00
48 | 20:04:28 0.00 11449.00
49 | 20:04:30 0.50 13503.00
50 | 20:04:32 0.50 13275.00
51 | 20:04:34 0.00 13058.50
52 | 20:04:36 1.00 11354.50
53 | 20:04:38 0.00 9414.50
54 | 20:04:40 0.00 108195.00
55 | 20:04:42 0.50 11666.50
56 | 20:04:44 0.00 11873.00
57 | 20:04:46 0.50 9637.00
58 | 20:04:48 0.00 11902.50
59 | 20:04:50 0.00 11513.50
60 | 20:04:52 0.50 10742.50
61 | 20:04:54 0.00 11297.00
62 | 20:04:56 0.50 10034.00
63 | 20:04:58 0.00 8937.00
64 | 20:05:00 0.00 11199.50
65 | 20:05:02 3.00 12066.00
66 | 20:05:04 0.00 11037.00
67 | 20:05:06 1.00 8733.00
68 | 20:05:08 0.00 9560.00
69 | 20:05:10 0.00 8350.00
70 | 20:05:12 0.50 9387.00
71 | 20:05:14 0.00 9614.50
72 | 20:05:16 0.50 10173.00
73 | 20:05:18 0.00 7488.50
74 | 20:05:20 0.00 8917.00
75 | 20:05:22 0.50 8714.50
76 | 20:05:24 0.00 9834.00
77 | 20:05:26 0.50 11871.00
78 | 20:05:28 0.00 8608.50
79 | 20:05:30 0.00 4584.50
80 | 20:05:32 4.00 5672.00
81 | 20:05:34 0.00 6066.50
82 | 20:05:36 1.00 12978.50
83 | 20:05:38 0.00 8106.50
84 | 20:05:40 0.00 6947.50
85 | 20:05:42 0.50 8041.50
86 | 20:05:44 0.00 6596.50
87 | 20:05:46 0.50 7896.00
88 | 20:05:48 0.00 15559.50
89 | 20:05:50 0.00 7722.50
90 | 20:05:52 0.50 6025.50
91 | 20:05:54 0.00 9917.00
92 | 20:05:56 0.50 10898.50
93 | 20:05:58 0.00 17362.50
94 | 20:06:00 0.50 7254.00
95 | 20:06:02 0.50 5121.00
96 | 20:06:04 0.00 4653.00
97 | 20:06:06 1.00 4723.00
98 | 20:06:08 0.00 4964.50
99 | 20:06:10 0.00 5302.50
100 | 20:06:12 0.50 7012.50
101 | 20:06:14 0.00 6534.00
102 | 20:06:16 0.50 7226.50
103 | 20:06:18 0.00 11085.00
104 | 20:06:20 0.00 10388.00
105 | 20:06:22 0.50 15064.00
106 | 20:06:24 0.00 10578.50
107 | 20:06:26 0.50 20473.00
108 | 20:06:28 0.00 25850.50
109 | 20:06:30 0.00 32652.50
110 | 20:06:32 0.50 27697.50
111 | 20:06:34 0.00 33675.50
112 | 20:06:36 1.00 41619.50
113 | 20:06:38 0.50 36902.50
114 | 20:06:40 0.00 39922.00
115 | 20:06:42 0.50 34267.00
116 | 20:06:44 0.00 28423.00
117 | 20:06:46 0.50 31713.50
118 | 20:06:48 0.00 39904.50
119 | 20:06:50 0.00 30338.50
120 | 20:06:52 1.50 33406.50
121 |
--------------------------------------------------------------------------------
/data_collector.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Script :data_collector.sh
4 | # Author :Julio Sanz
5 | # Website :www.elarraydejota.com
6 | # Email :juliojosesb@gmail.com
7 | # Description :Script to collect resources data using sar and put it in data/ folder of this repository.
8 | # Note this script is intended to collect data in real time (useful for stress tests) but
9 | # not to analyse the overall performance of a machine during a long time frame.
10 | # If you want to check historic data of the server, better use system_data_reader.sh script.
11 | # Dependencies :sysstat,gnuplot,mutt(optional)
12 | # License :GPLv3
13 | #
14 |
15 | # Initialize in sarviewer folder
16 | cd $(dirname $0)
17 |
18 | # ======================
19 | # VARIABLES
20 | # ======================
21 |
22 | # Read sarviewer.properties file
23 | . sarviewer.properties
24 |
25 | # ======================
26 | # FUNCTIONS
27 | # ======================
28 |
29 | sar_collectors(){
30 | # CPU
31 | sar -u $sample_interval $number_of_samples | grep -v -E "CPU|Average|^$" > data/cpu.dat &
32 | # RAM
33 | sar -r $sample_interval $number_of_samples | grep -v -E "[a-zA-Z]|^$" > data/ram.dat &
34 | # Swap
35 | sar -S $sample_interval $number_of_samples | grep -v -E "[a-zA-Z]|^$" > data/swap.dat &
36 | # Load average and tasks
37 | sar -q $sample_interval $number_of_samples | grep -v -E "[a-zA-Z]|^$" > data/loadaverage.dat &
38 | # IO transfer
39 | sar -b $sample_interval $number_of_samples | grep -v -E "[a-zA-Z]|^$" > data/iotransfer.dat &
40 | # Process/context switches
41 | sar -w $sample_interval $number_of_samples | grep -v -E "[a-zA-Z]|^$" > data/proc.dat &
42 | # Network Interface
43 | sar -n DEV $sample_interval $number_of_samples | grep $network_interface | grep -v "Average" > data/netinterface.dat &
44 | # Sockets
45 | sar -n SOCK $sample_interval $number_of_samples | grep -v -E "[a-zA-Z]|^$" > data/sockets.dat &
46 |
47 | total_time=$(($sample_interval * $number_of_samples))
48 | echo "Taking ${number_of_samples} samples with ${sample_interval} seconds interval"
49 | echo "Total time to collect all data: ${total_time} seconds"
50 | echo "----------------------------------"
51 | echo ">>> Collecting data"
52 | echo ">>> Please wait until data collection is completed"
53 | echo "----------------------------------"
54 | echo "- You can abort this script with Ctrl+C, but have in mind the data will stop being collected when you cancel it."
55 | echo "- You will also need to manually launch script plotter.sh to generate the graphs."
56 | sleep $total_time
57 |
58 | # Added additional sleep of 5 seconds to avoid "warning: Skipping data file with no valid points"
59 | echo "----------------------------------"
60 | echo ">>> Just 5 seconds more while processing all data"
61 | echo "----------------------------------"
62 | sleep 5
63 | echo "Done!"
64 | }
65 |
66 | howtouse(){
67 | cat <<-'EOF'
68 |
69 | This script can work with or without parameters.
70 | Without parameters, just execute it --> ./data_collector.sh
71 | If you use parameters, this is the correct format:
72 | -n [samples] number of samples to take
73 | -i [interval] interval (in seconds) between each sample
74 | -m [mail] mail address to send the graphs to
75 | -h help
76 |
77 | Examples:
78 |
79 | # Send by email statistics from 10 samples, taken each one every 1 second
80 | ./data_collector.sh -n 10 -i 1 -m example@example.com
81 | # Generate statistics from 20 samples, taken each one very 2 seconds
82 | ./data_collector.sh -n 20 -i 2
83 |
84 | EOF
85 | }
86 |
87 | # ======================
88 | # MAIN
89 | # ======================
90 |
91 | if [ "$#" -eq 0 ];then
92 | echo -n "Please specify the number of samples to take-> "
93 | read number_of_samples
94 | echo -n "Please specify the sample interval (take sample every X seconds)-> "
95 | read sample_interval
96 |
97 | # Begin collecting data with sar
98 | sar_collectors
99 |
100 | # Call plotter.sh to generate the graphs
101 | ./plotter.sh
102 |
103 | elif [ "$#" -ne 0 ];then
104 | while getopts ":n:i:m:h" opt; do
105 | case $opt in
106 | "n")
107 | number_of_samples="$OPTARG"
108 | ;;
109 | "i")
110 | sample_interval="$OPTARG"
111 | ;;
112 | "m")
113 | mail_to="$OPTARG"
114 | ;;
115 | \?)
116 | echo "Invalid option: -$OPTARG" >&2
117 | howtouse
118 | exit 1
119 | ;;
120 | :)
121 | echo "Option -$OPTARG requires an argument." >&2
122 | howtouse
123 | exit 1
124 | ;;
125 | "h"|*)
126 | howtouse
127 | exit 1
128 | ;;
129 | esac
130 | done
131 | # Begin collecting data with sar
132 | sar_collectors
133 |
134 | # Call plotter.sh to generate the graphs
135 | ./plotter.sh
136 |
137 | # Send mail if specified
138 | if [[ $mail_to ]];then
139 | echo "SARVIEWER - data_collector.sh sysstat statistics for $(hostname)" | mutt -a graphs/*.png -s "SARVIEWER - data_collector.sh sysstat statistics for $(hostname)" -- $mail_to
140 | fi
141 | fi
--------------------------------------------------------------------------------
/data/sockets.dat:
--------------------------------------------------------------------------------
1 | 10:15:01 829 14 3 0 0 12
2 | 10:25:01 829 14 3 0 0 6
3 | 10:35:01 829 14 3 0 0 6
4 | 10:45:01 829 14 3 0 0 6
5 | 10:55:01 924 39 4 0 0 8
6 | 11:05:01 920 29 4 0 0 6
7 | 11:15:01 919 28 4 0 0 6
8 | 11:25:01 921 28 4 0 0 7
9 | 11:35:01 921 28 4 0 0 6
10 | 11:45:01 922 29 4 0 0 6
11 | 11:55:01 921 28 4 0 0 7
12 | 12:05:01 919 28 4 0 0 6
13 | 12:15:01 919 28 4 0 0 6
14 | 12:25:01 919 28 4 0 0 7
15 | 12:35:01 919 28 4 0 0 6
16 | 12:45:01 921 28 4 0 0 6
17 | 12:55:01 881 52 3 0 0 7
18 | 13:05:01 853 24 3 0 0 11
19 | 13:15:01 865 35 3 0 0 15
20 | 13:25:01 862 32 3 0 0 15
21 | 13:35:01 861 30 3 0 0 36
22 | 13:45:01 892 52 3 0 0 41
23 | 13:55:01 873 32 3 0 0 8
24 | 14:05:01 854 20 3 0 0 6
25 | 14:15:01 887 53 3 0 0 6
26 | 14:25:01 867 20 3 0 0 7
27 | 14:35:01 878 31 3 0 0 6
28 | 14:45:01 872 19 3 0 0 6
29 | 14:55:01 872 19 3 0 0 7
30 | 15:05:01 873 20 3 0 0 6
31 | 15:15:01 871 18 3 0 0 6
32 | 15:25:01 872 19 3 0 0 7
33 | 15:35:01 873 20 3 0 0 6
34 | 15:45:01 872 19 3 0 0 7
35 | 15:55:01 961 40 5 0 0 7
36 | 16:05:01 963 34 4 0 0 8
37 | 16:15:01 960 33 4 0 0 6
38 | 16:25:01 961 34 4 0 0 7
39 | 16:35:01 961 34 4 0 0 6
40 | 16:45:01 960 33 4 0 0 6
41 | 16:55:01 960 33 4 0 0 7
42 | 17:05:01 960 33 4 0 0 8
43 | 17:15:01 960 33 4 0 0 6
44 | 17:25:01 960 34 4 0 0 7
45 | 17:35:01 959 33 4 0 0 6
46 | 17:45:01 872 19 3 0 0 6
47 | 17:55:01 900 47 3 0 0 22
48 | 18:05:01 899 46 3 0 0 55
49 | 18:15:01 881 28 3 0 0 8
50 | 18:25:01 873 20 3 0 0 7
51 | 18:35:01 893 40 3 0 0 19
52 | 18:45:01 886 33 3 0 0 39
53 | 18:55:01 885 32 3 0 0 11
54 | 19:05:01 891 38 3 0 0 11
55 | 19:15:01 860 15 3 0 0 8
56 | 19:25:01 900 55 3 0 0 14
57 | 19:35:01 860 25 3 0 0 9
58 | 19:45:01 856 21 3 0 0 10
59 | 19:55:01 861 26 3 0 0 8
60 | 20:05:01 909 26 3 0 0 7
61 | 20:15:01 856 27 3 0 0 7
62 | 20:25:01 899 21 3 0 0 8
63 | 20:35:01 866 35 3 0 0 9
64 | 20:45:01 797 14 3 0 0 7
65 | 20:55:01 871 29 3 0 0 10
66 | 21:05:01 856 14 3 0 0 9
67 | 21:15:01 856 14 3 0 0 8
68 | 21:25:01 878 35 3 0 0 9
69 | 21:35:01 876 31 3 0 0 9
70 | 21:45:01 888 42 3 0 0 10
71 | 21:55:01 860 15 3 0 0 9
72 |
--------------------------------------------------------------------------------
/system_data_reader.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Script :system_data_reader.sh
4 | # Author :Julio Sanz
5 | # Website :www.elarraydejota.com
6 | # Email :juliojosesb@gmail.com
7 | # Description :Script to parse logs from system sar already collected data.
8 | # Useful to analyse the overall performance of a server. Note it does not collect
9 | # data in real time like data_collector.sh. This script just reads the sa* files
10 | # on your system (usually located under /var/log/sysstat), parses the info and generates
11 | # the graphs calling the script plotter.sh
12 | # Dependencies :sysstat,gnuplot,mutt(optional)
13 | # License :GPLv3
14 | #
15 |
16 | # Initialize in sarviewer folder
17 | cd $(dirname $0)
18 |
19 | # ======================
20 | # VARIABLES
21 | # ======================
22 |
23 | # Read sarviewer.properties file
24 | . sarviewer.properties
25 |
26 | # ======================
27 | # FUNCTIONS
28 | # ======================
29 |
30 | dump_sar_info(){
31 | # CPU
32 | sar -u -f $sysstat_logdir/$sa_file -s $start_time -e $end_time | grep -v -E "CPU|Average|RESTART|^$" > data/cpu.dat &
33 | # RAM
34 | sar -r -f $sysstat_logdir/$sa_file -s $start_time -e $end_time | grep -v -E "[a-zA-Z]|^$" > data/ram.dat &
35 | # Swap
36 | sar -S -f $sysstat_logdir/$sa_file -s $start_time -e $end_time | grep -v -E "[a-zA-Z]|^$" > data/swap.dat &
37 | # Load average and tasks
38 | sar -q -f $sysstat_logdir/$sa_file -s $start_time -e $end_time | grep -v -E "[a-zA-Z]|^$" > data/loadaverage.dat &
39 | # IO transfer
40 | sar -b -f $sysstat_logdir/$sa_file -s $start_time -e $end_time | grep -v -E "[a-zA-Z]|^$" > data/iotransfer.dat &
41 | # Process/context switches
42 | sar -w -f $sysstat_logdir/$sa_file -s $start_time -e $end_time | grep -v -E "[a-zA-Z]|^$" > data/proc.dat &
43 | # Network Interface
44 | sar -n DEV -f $sysstat_logdir/$sa_file -s $start_time -e $end_time | grep $network_interface | grep -v "Average" > data/netinterface.dat &
45 | # Sockets
46 | sar -n SOCK -f $sysstat_logdir/$sa_file -s $start_time -e $end_time | grep -v -E "[a-zA-Z]|^$" > data/sockets.dat &
47 |
48 | wait
49 | }
50 |
51 | check_sa_file(){
52 | if [ ! -f "$sysstat_logdir/$sa_file" ];then
53 | echo ""
54 | echo "ERROR: The file ${sysstat_logdir}/${sa_file} does not exist"
55 | echo "Please select a valid \"sa\" file from the list"
56 | exit 1
57 | fi
58 | }
59 |
60 | list_sa_files(){
61 | echo "List of sa* files available at this moment to retrieve data from:"
62 | echo ""
63 | echo "-------------------------------------------"
64 | for file in $(ls ${sysstat_logdir} | grep -v sar);do
65 | echo "File ${file} with data from $(sar -r -f ${sysstat_logdir}/${file} | head -1 )";
66 | done
67 | echo "-------------------------------------------"
68 | echo ""
69 | echo "Note that the number that follows the \"sa\" file specifies the day of the data collected by sar daemon"
70 | }
71 |
72 | howtouse(){
73 | cat <<-'EOF'
74 |
75 | This script can work with or without parameters.
76 | Without parameters, just execute it --> ./system_data_reader.sh
77 | If you use parameters, this is the correct format:
78 | -f [sa file] sar file to parse
79 | -s [hh:mm] start parse time in 24 hour format
80 | -e [hh:mm] end parse time in 24 hour format
81 | -m [mail] mail address to send the graphs to
82 | -l list available sa files
83 | -h help
84 |
85 | Examples:
86 |
87 | # Send by email day 04 statistics
88 | ./system_data_reader.sh -f sa04 -m example@example.com
89 |
90 | # Send by email day 04 statistics between 09:00 and 12:00
91 | ./system_data_reader.sh -f sa04 -s 09:00 -e 12:00 -m example@example.com
92 |
93 | # Send by email day 05 statistics just since 10:00
94 | ./system_data_reader.sh -f sa05 -s 10:00 -m example@example.com
95 |
96 | # Just parse day 05 statistics
97 | ./system_data_reader.sh -f sa05
98 |
99 | # Send yesterday's statistics statistics by email:
100 | ./system_data_reader.sh -f sa$(date +%d -d yesterday) -m example@example.com
101 |
102 | # Send today's statistics statistics by email:
103 | ./system_data_reader.sh -f sa$(date +%d) -m example@example.com
104 |
105 | EOF
106 | }
107 |
108 | # ======================
109 | # MAIN
110 | # ======================
111 |
112 | if [ "$#" -eq 0 ];then
113 | list_sa_files
114 | echo -n "Please select a sa* file from the listed above: "
115 | read sa_file
116 |
117 | # Check if the selected sa_file exists
118 | check_sa_file
119 |
120 | # Dump data contained in selected sar file
121 | dump_sar_info
122 |
123 | # Call plotter.sh to generate the graphs
124 | ./plotter.sh
125 |
126 | elif [ "$#" -ne 0 ];then
127 | while getopts ":f:s:e:m:lh" opt; do
128 | case $opt in
129 | "f")
130 | sa_file="$OPTARG"
131 | ;;
132 | "s")
133 | start_time="$OPTARG"
134 | ;;
135 | "e")
136 | end_time="$OPTARG"
137 | ;;
138 | "m")
139 | mail_to="$OPTARG"
140 | ;;
141 | "l")
142 | list_sa_files
143 | exit 0
144 | ;;
145 | \?)
146 | echo "Invalid option: -$OPTARG" >&2
147 | howtouse
148 | exit 1
149 | ;;
150 | :)
151 | echo "Option -$OPTARG requires an argument." >&2
152 | howtouse
153 | exit 1
154 | ;;
155 | "h" | *)
156 | howtouse
157 | exit 1
158 | ;;
159 | esac
160 | done
161 | # Check if the selected sa_file exists
162 | check_sa_file
163 |
164 | # Dump data contained in selected sar file
165 | dump_sar_info
166 |
167 | # Call plotter.sh to generate the graphs
168 | ./plotter.sh
169 |
170 | # Send mail if specified
171 | if [[ $mail_to ]];then
172 | echo "SARVIEWER - sysstat ${sa_file} statistics for $(hostname)" | mutt -a graphs/*.png -s "SARVIEWER - sysstat ${sa_file} statistics for $(hostname)" -- $mail_to
173 | fi
174 | fi
175 |
--------------------------------------------------------------------------------
/data/netinterface.dat:
--------------------------------------------------------------------------------
1 | 10:15:01 eth0 37.87 11.95 46.45 1.33 0.00 0.00 0.63 0.04
2 | 10:25:01 eth0 1.16 0.43 0.51 0.05 0.00 0.00 0.56 0.00
3 | 10:35:01 eth0 1.76 0.43 0.52 0.05 0.00 0.00 0.89 0.00
4 | 10:45:01 eth0 1.16 0.31 0.20 0.03 0.00 0.00 0.67 0.00
5 | 10:55:01 eth0 39.70 14.05 47.44 1.84 0.00 0.00 0.57 0.04
6 | 11:05:01 eth0 2.14 1.20 0.36 0.16 0.00 0.00 0.58 0.00
7 | 11:15:01 eth0 1.83 1.08 0.49 0.17 0.00 0.00 0.59 0.00
8 | 11:25:01 eth0 1.92 0.94 0.50 0.16 0.00 0.00 0.57 0.00
9 | 11:35:01 eth0 1.49 0.58 0.27 0.11 0.00 0.00 0.56 0.00
10 | 11:45:01 eth0 1.84 1.01 0.47 0.33 0.00 0.00 0.56 0.00
11 | 11:55:01 eth0 2.04 1.03 0.87 0.17 0.00 0.00 0.56 0.00
12 | 12:05:01 eth0 1.35 0.64 0.28 0.12 0.00 0.00 0.56 0.00
13 | 12:15:01 eth0 1.95 1.10 0.74 0.33 0.00 0.00 0.58 0.00
14 | 12:25:01 eth0 2.54 1.15 1.31 0.16 0.00 0.00 0.56 0.00
15 | 12:35:01 eth0 1.26 0.58 0.27 0.09 0.00 0.00 0.56 0.00
16 | 12:45:01 eth0 1.90 1.08 0.47 0.34 0.00 0.00 0.56 0.00
17 | 12:55:01 eth0 20.23 17.50 20.37 14.51 0.00 0.00 0.56 0.02
18 | 13:05:01 eth0 42.58 12.67 53.36 1.42 0.00 0.00 0.57 0.04
19 | 13:15:01 eth0 75.39 26.22 96.92 2.76 0.00 0.00 0.58 0.08
20 | 13:25:01 eth0 2.64 1.45 1.64 0.17 0.00 0.00 0.56 0.00
21 | 13:35:01 eth0 16.83 7.28 20.90 0.67 0.00 0.00 0.56 0.02
22 | 13:45:01 eth0 185.14 72.44 258.57 6.83 0.00 0.00 0.56 0.21
23 | 13:55:01 eth0 1087.70 430.97 1586.84 31.32 0.00 0.00 0.56 1.30
24 | 14:05:01 eth0 149.35 62.15 213.87 4.74 0.00 0.00 0.56 0.18
25 | 14:15:01 eth0 27.23 9.39 36.07 0.83 0.00 0.00 0.58 0.03
26 | 14:25:01 eth0 22.69 7.22 28.55 0.64 0.00 0.00 0.56 0.02
27 | 14:35:01 eth0 21.15 8.21 23.90 0.76 0.00 0.00 0.56 0.02
28 | 14:45:01 eth0 32.16 12.95 34.49 1.40 0.00 0.00 0.93 0.03
29 | 14:55:01 eth0 28.14 3.86 18.23 0.45 0.00 0.00 18.53 0.01
30 | 15:05:01 eth0 2.61 0.52 0.49 0.08 0.00 0.00 1.23 0.00
31 | 15:15:01 eth0 2.22 0.19 0.38 0.02 0.00 0.00 1.23 0.00
32 | 15:25:01 eth0 2.41 0.31 0.41 0.04 0.00 0.00 1.24 0.00
33 | 15:35:01 eth0 2.36 0.34 0.43 0.04 0.00 0.00 1.28 0.00
34 | 15:45:01 eth0 2.16 0.23 0.38 0.03 0.00 0.00 1.23 0.00
35 | 15:55:01 eth0 10.71 4.50 10.76 0.95 0.00 0.00 1.35 0.01
36 | 16:05:01 eth0 3.09 1.28 0.70 0.39 0.00 0.00 1.24 0.00
37 | 16:15:01 eth0 1.59 0.48 0.28 0.08 0.00 0.00 0.81 0.00
38 | 16:25:01 eth0 1.34 0.55 0.22 0.10 0.00 0.00 0.55 0.00
39 | 16:35:01 eth0 5.94 2.13 6.95 0.40 0.00 0.00 0.58 0.01
40 | 16:45:01 eth0 1.11 0.50 0.21 0.09 0.00 0.00 0.57 0.00
41 | 16:55:01 eth0 1.32 0.53 0.22 0.11 0.00 0.00 0.60 0.00
42 | 17:05:01 eth0 1.49 0.79 0.36 0.15 0.00 0.00 0.56 0.00
43 | 17:15:01 eth0 1.23 0.49 0.22 0.09 0.00 0.00 0.59 0.00
44 | 17:25:01 eth0 1.38 0.61 0.29 0.13 0.00 0.00 0.56 0.00
45 | 17:35:01 eth0 1.21 0.59 0.24 0.12 0.00 0.00 0.58 0.00
46 | 17:45:01 eth0 38.36 23.03 46.71 15.49 0.00 0.00 0.58 0.04
47 | 17:55:01 eth0 45.07 17.27 56.25 2.01 0.00 0.00 0.58 0.05
48 | 18:05:01 eth0 49.04 18.07 63.14 2.02 0.00 0.00 0.58 0.05
49 | 18:15:01 eth0 56.37 19.48 73.44 2.15 0.00 0.00 0.61 0.06
50 | 18:25:01 eth0 36.07 18.25 48.60 1.68 0.00 0.00 0.64 0.04
51 | 18:35:01 eth0 139.57 49.03 191.28 4.56 0.00 0.00 0.63 0.16
52 | 18:45:01 eth0 58.48 15.56 82.94 1.20 0.00 0.00 0.66 0.07
53 | 18:55:01 eth0 32.94 9.45 45.22 0.77 0.00 0.00 0.66 0.04
54 | 19:05:01 eth0 143.01 43.38 195.67 3.98 0.00 0.00 0.74 0.16
55 | 19:15:01 eth0 162.83 46.10 229.86 3.98 0.00 0.00 0.65 0.19
56 | 19:25:01 eth0 183.81 58.34 236.94 5.32 0.00 0.00 0.71 0.19
57 | 19:35:01 eth0 116.15 32.16 162.56 2.81 0.00 0.00 0.65 0.13
58 | 19:45:01 eth0 117.86 32.41 165.72 2.85 0.00 0.00 0.66 0.14
59 | 19:55:01 eth0 183.36 56.71 255.97 5.20 0.00 0.00 0.92 0.21
60 | 20:05:01 eth0 41.85 16.90 52.44 1.63 0.00 0.00 0.83 0.04
61 | 20:15:01 eth0 97.81 30.37 132.27 2.82 0.00 0.00 0.71 0.11
62 | 20:25:01 eth0 86.96 30.15 107.27 3.08 0.00 0.00 0.67 0.09
63 | 20:35:01 eth0 254.55 82.10 360.80 7.20 0.00 0.00 0.61 0.30
64 | 20:45:01 eth0 6.89 3.21 7.44 0.35 0.00 0.00 0.65 0.01
65 | 20:55:01 eth0 28.07 11.38 32.22 1.30 0.00 0.00 0.61 0.03
66 | 21:05:01 eth0 16.54 4.03 21.15 0.33 0.00 0.00 0.52 0.02
67 | 21:15:01 eth0 1.08 0.25 0.14 0.03 0.00 0.00 0.53 0.00
68 | 21:25:01 eth0 24.42 9.89 29.98 0.86 0.00 0.00 0.52 0.02
69 | 21:35:01 eth0 46.41 18.46 58.51 1.84 0.00 0.00 0.51 0.05
70 | 21:45:01 eth0 81.95 32.75 107.59 3.05 0.00 0.00 0.52 0.09
71 | 21:55:01 eth0 20.24 5.91 18.43 0.57 0.00 0.00 7.74 0.02
72 |
--------------------------------------------------------------------------------
/data/swap.dat:
--------------------------------------------------------------------------------
1 | 20:02:54 34177020 0 0.00 0 0.00
2 | 20:02:56 34177020 0 0.00 0 0.00
3 | 20:02:58 34177020 0 0.00 0 0.00
4 | 20:03:00 34177020 0 0.00 0 0.00
5 | 20:03:02 34177020 0 0.00 0 0.00
6 | 20:03:04 34177020 0 0.00 0 0.00
7 | 20:03:06 34177020 0 0.00 0 0.00
8 | 20:03:08 34177020 0 0.00 0 0.00
9 | 20:03:10 34177020 0 0.00 0 0.00
10 | 20:03:12 34177020 0 0.00 0 0.00
11 | 20:03:14 34177020 0 0.00 0 0.00
12 | 20:03:16 34177020 0 0.00 0 0.00
13 | 20:03:18 34177020 0 0.00 0 0.00
14 | 20:03:20 34177020 0 0.00 0 0.00
15 | 20:03:22 34177020 0 0.00 0 0.00
16 | 20:03:24 34177020 0 0.00 0 0.00
17 | 20:03:26 34177020 0 0.00 0 0.00
18 | 20:03:28 34177020 0 0.00 0 0.00
19 | 20:03:30 34177020 0 0.00 0 0.00
20 | 20:03:32 34177020 0 0.00 0 0.00
21 | 20:03:34 34177020 0 0.00 0 0.00
22 | 20:03:36 34177020 0 0.00 0 0.00
23 | 20:03:38 34177020 0 0.00 0 0.00
24 | 20:03:40 34177020 0 0.00 0 0.00
25 | 20:03:42 34177020 0 0.00 0 0.00
26 | 20:03:44 34177020 0 0.00 0 0.00
27 | 20:03:46 34177020 0 0.00 0 0.00
28 | 20:03:48 34177020 0 0.00 0 0.00
29 | 20:03:50 34177020 0 0.00 0 0.00
30 | 20:03:52 34177020 0 0.00 0 0.00
31 | 20:03:54 34177020 0 0.00 0 0.00
32 | 20:03:56 34177020 0 0.00 0 0.00
33 | 20:03:58 34177020 0 0.00 0 0.00
34 | 20:04:00 34177020 0 0.00 0 0.00
35 | 20:04:02 34177020 0 0.00 0 0.00
36 | 20:04:04 34177020 0 0.00 0 0.00
37 | 20:04:06 34177020 0 0.00 0 0.00
38 | 20:04:08 34177020 0 0.00 0 0.00
39 | 20:04:10 34177020 0 0.00 0 0.00
40 | 20:04:12 34177020 0 0.00 0 0.00
41 | 20:04:14 34177020 0 0.00 0 0.00
42 | 20:04:16 34177020 0 0.00 0 0.00
43 | 20:04:18 34177020 0 0.00 0 0.00
44 | 20:04:20 34177020 0 0.00 0 0.00
45 | 20:04:22 34177020 0 0.00 0 0.00
46 | 20:04:24 34177020 0 0.00 0 0.00
47 | 20:04:26 34177020 0 0.00 0 0.00
48 | 20:04:28 34177020 0 0.00 0 0.00
49 | 20:04:30 34177020 0 0.00 0 0.00
50 | 20:04:32 34177020 0 0.00 0 0.00
51 | 20:04:34 34177020 0 0.00 0 0.00
52 | 20:04:36 34177020 0 0.00 0 0.00
53 | 20:04:38 34177020 0 0.00 0 0.00
54 | 20:04:40 34177020 0 0.00 0 0.00
55 | 20:04:42 34177020 0 0.00 0 0.00
56 | 20:04:44 34177020 0 0.00 0 0.00
57 | 20:04:46 34177020 0 0.00 0 0.00
58 | 20:04:48 34177020 0 0.00 0 0.00
59 | 20:04:50 34177020 0 0.00 0 0.00
60 | 20:04:52 34177020 0 0.00 0 0.00
61 | 20:04:54 34177020 0 0.00 0 0.00
62 | 20:04:56 34177020 0 0.00 0 0.00
63 | 20:04:58 34177020 0 0.00 0 0.00
64 | 20:05:00 34177020 0 0.00 0 0.00
65 | 20:05:02 34177020 0 0.00 0 0.00
66 | 20:05:04 34177020 0 0.00 0 0.00
67 | 20:05:06 34177020 0 0.00 0 0.00
68 | 20:05:08 34177020 0 0.00 0 0.00
69 | 20:05:10 34177020 0 0.00 0 0.00
70 | 20:05:12 34177020 0 0.00 0 0.00
71 | 20:05:14 34177020 0 0.00 0 0.00
72 | 20:05:16 34177020 0 0.00 0 0.00
73 | 20:05:18 34177020 0 0.00 0 0.00
74 | 20:05:20 34177020 0 0.00 0 0.00
75 | 20:05:22 34177020 0 0.00 0 0.00
76 | 20:05:24 34177020 0 0.00 0 0.00
77 | 20:05:26 34177020 0 0.00 0 0.00
78 | 20:05:28 34177020 0 0.00 0 0.00
79 | 20:05:30 34177020 0 0.00 0 0.00
80 | 20:05:32 34177020 0 0.00 0 0.00
81 | 20:05:34 34177020 0 0.00 0 0.00
82 | 20:05:36 34177020 0 0.00 0 0.00
83 | 20:05:38 34177020 0 0.00 0 0.00
84 | 20:05:40 34177020 0 0.00 0 0.00
85 | 20:05:42 34177020 0 0.00 0 0.00
86 | 20:05:44 34177020 0 0.00 0 0.00
87 | 20:05:46 34177020 0 0.00 0 0.00
88 | 20:05:48 34177020 0 0.00 0 0.00
89 | 20:05:50 34177020 0 0.00 0 0.00
90 | 20:05:52 34177020 0 0.00 0 0.00
91 | 20:05:54 34177020 0 0.00 0 0.00
92 | 20:05:56 34177020 0 0.00 0 0.00
93 | 20:05:58 34177020 0 0.00 0 0.00
94 | 20:06:00 34177020 0 0.00 0 0.00
95 | 20:06:02 34177020 0 0.00 0 0.00
96 | 20:06:04 34177020 0 0.00 0 0.00
97 | 20:06:06 34177020 0 0.00 0 0.00
98 | 20:06:08 34177020 0 0.00 0 0.00
99 | 20:06:10 34177020 0 0.00 0 0.00
100 | 20:06:12 34177020 0 0.00 0 0.00
101 | 20:06:14 34177020 0 0.00 0 0.00
102 | 20:06:16 34177020 0 0.00 0 0.00
103 | 20:06:18 34177020 0 0.00 0 0.00
104 | 20:06:20 34177020 0 0.00 0 0.00
105 | 20:06:22 34177020 0 0.00 0 0.00
106 | 20:06:24 34177020 0 0.00 0 0.00
107 | 20:06:26 34177020 0 0.00 0 0.00
108 | 20:06:28 34177020 0 0.00 0 0.00
109 | 20:06:30 34177020 0 0.00 0 0.00
110 | 20:06:32 34177020 0 0.00 0 0.00
111 | 20:06:34 34177020 0 0.00 0 0.00
112 | 20:06:36 34177020 0 0.00 0 0.00
113 | 20:06:38 34177020 0 0.00 0 0.00
114 | 20:06:40 34177020 0 0.00 0 0.00
115 | 20:06:42 34177020 0 0.00 0 0.00
116 | 20:06:44 34177020 0 0.00 0 0.00
117 | 20:06:46 34177020 0 0.00 0 0.00
118 | 20:06:48 34177020 0 0.00 0 0.00
119 | 20:06:50 34177020 0 0.00 0 0.00
120 | 20:06:52 34177020 0 0.00 0 0.00
121 |
--------------------------------------------------------------------------------
/data/iotransfer.dat:
--------------------------------------------------------------------------------
1 | 20:02:54 1.00 0.00 1.00 0.00 32.00
2 | 20:02:56 3.50 0.00 3.50 0.00 148.00
3 | 20:02:58 39.50 0.00 39.50 0.00 1348.00
4 | 20:03:00 1.50 0.00 1.50 0.00 144.00
5 | 20:03:02 5.00 0.00 5.00 0.00 188.00
6 | 20:03:04 6.00 0.00 6.00 0.00 344.00
7 | 20:03:06 2.00 0.00 2.00 0.00 92.00
8 | 20:03:08 9.00 0.00 9.00 0.00 720.00
9 | 20:03:10 4.50 0.00 4.50 0.00 364.00
10 | 20:03:12 47.00 0.00 47.00 0.00 1204.00
11 | 20:03:14 11.50 0.50 11.00 8.00 780.00
12 | 20:03:16 4.50 3.00 1.50 164.00 196.00
13 | 20:03:18 14.50 10.00 4.50 2580.00 472.00
14 | 20:03:20 0.50 0.00 0.50 0.00 4.00
15 | 20:03:22 4.00 4.00 0.00 884.00 0.00
16 | 20:03:24 8.50 0.50 8.00 100.00 1104.00
17 | 20:03:26 1.00 0.00 1.00 0.00 20.00
18 | 20:03:28 6.00 0.00 6.00 0.00 2496.00
19 | 20:03:30 0.50 0.00 0.50 0.00 48.00
20 | 20:03:32 242.50 238.50 4.00 38176.00 420.00
21 | 20:03:34 346.50 339.00 7.50 71464.00 360.00
22 | 20:03:36 602.50 601.00 1.50 45656.00 36.00
23 | 20:03:38 507.50 506.50 1.00 27464.00 80.00
24 | 20:03:40 188.00 184.00 4.00 10088.00 184.00
25 | 20:03:42 135.00 125.50 9.50 3876.00 140.00
26 | 20:03:44 230.50 93.00 137.50 19964.00 2604.00
27 | 20:03:46 232.50 231.50 1.00 59136.00 68.00
28 | 20:03:48 307.50 306.50 1.00 77824.00 8.00
29 | 20:03:50 274.50 271.00 3.50 63708.00 148.00
30 | 20:03:52 168.50 167.50 1.00 37216.00 52.00
31 | 20:03:54 53.00 53.00 0.00 12680.00 0.00
32 | 20:03:56 16.50 13.00 3.50 2480.00 276.00
33 | 20:03:58 14.00 13.00 1.00 2596.00 24.00
34 | 20:04:00 57.50 54.00 3.50 7972.00 256.00
35 | 20:04:02 83.00 79.50 3.50 2928.00 3584.00
36 | 20:04:04 35.50 20.50 15.00 3376.00 10940.00
37 | 20:04:06 21.00 19.00 2.00 2804.00 264.00
38 | 20:04:08 15.00 14.00 1.00 2464.00 12.00
39 | 20:04:10 13.50 11.00 2.50 1824.00 208.00
40 | 20:04:12 42.00 40.00 2.00 2060.00 100.00
41 | 20:04:14 10.00 9.50 0.50 2436.00 4.00
42 | 20:04:16 14.00 9.00 5.00 2276.00 936.00
43 | 20:04:18 26.50 12.00 14.50 2788.00 288.00
44 | 20:04:20 92.00 21.00 71.00 5384.00 976.00
45 | 20:04:22 12.00 7.50 4.50 1848.00 860.00
46 | 20:04:24 8.50 4.00 4.50 1012.00 324.00
47 | 20:04:26 6.50 5.50 1.00 1412.00 168.00
48 | 20:04:28 10.50 4.00 6.50 1028.00 1896.00
49 | 20:04:30 5.00 0.50 4.50 128.00 124.00
50 | 20:04:32 5.00 0.00 5.00 0.00 1080.00
51 | 20:04:34 27.00 3.50 23.50 28.00 14952.00
52 | 20:04:36 1.00 0.00 1.00 0.00 168.00
53 | 20:04:38 6.00 0.00 6.00 0.00 992.00
54 | 20:04:40 8.50 0.00 8.50 0.00 616.00
55 | 20:04:42 6.00 3.00 3.00 200.00 932.00
56 | 20:04:44 34.00 0.50 33.50 128.00 828.00
57 | 20:04:46 2.50 1.50 1.00 260.00 168.00
58 | 20:04:48 13.00 7.50 5.50 1800.00 1156.00
59 | 20:04:50 8.50 0.00 8.50 0.00 3640.00
60 | 20:04:52 1.00 0.00 1.00 0.00 168.00
61 | 20:04:54 73.50 0.50 73.00 128.00 7284.00
62 | 20:04:56 1.00 0.00 1.00 0.00 168.00
63 | 20:04:58 10.00 6.50 3.50 1672.00 540.00
64 | 20:05:00 11.50 1.50 10.00 100.00 4456.00
65 | 20:05:02 1.00 0.00 1.00 0.00 168.00
66 | 20:05:04 14.00 0.50 13.50 128.00 5420.00
67 | 20:05:06 1.00 0.00 1.00 0.00 168.00
68 | 20:05:08 2.50 0.00 2.50 0.00 64.00
69 | 20:05:10 10.00 0.00 10.00 0.00 3980.00
70 | 20:05:12 2.00 0.00 2.00 0.00 56.00
71 | 20:05:14 8.50 0.00 8.50 0.00 2960.00
72 | 20:05:16 3.50 0.50 3.00 128.00 276.00
73 | 20:05:18 7.50 0.00 7.50 0.00 64.00
74 | 20:05:20 11.50 0.00 11.50 0.00 3408.00
75 | 20:05:22 1.00 0.00 1.00 0.00 20.00
76 | 20:05:24 12.00 0.00 12.00 0.00 4852.00
77 | 20:05:26 13.50 10.00 3.50 1980.00 176.00
78 | 20:05:28 1.00 1.00 0.00 132.00 0.00
79 | 20:05:30 97.00 21.50 75.50 5136.00 4728.00
80 | 20:05:32 58.00 53.00 5.00 10032.00 196.00
81 | 20:05:34 198.00 189.00 9.00 12076.00 3944.00
82 | 20:05:36 755.50 752.00 3.50 153412.00 212.00
83 | 20:05:38 749.50 748.50 1.00 185448.00 24.00
84 | 20:05:40 472.50 467.50 5.00 113780.00 1580.00
85 | 20:05:42 369.00 364.50 4.50 74008.00 180.00
86 | 20:05:44 439.00 424.00 15.00 103808.00 14248.00
87 | 20:05:46 443.50 443.50 0.00 104024.00 0.00
88 | 20:05:48 490.00 484.50 5.50 118616.00 180.00
89 | 20:05:50 403.00 402.50 0.50 94200.00 4.00
90 | 20:05:52 375.00 366.00 9.00 85684.00 176.00
91 | 20:05:54 490.50 488.50 2.00 97000.00 128.00
92 | 20:05:56 584.00 584.00 0.00 125452.00 0.00
93 | 20:05:58 995.00 991.50 3.50 249900.00 116.00
94 | 20:06:00 85.00 83.50 1.50 20452.00 56.00
95 | 20:06:02 5.50 5.50 0.00 372.00 0.00
96 | 20:06:04 41.50 18.00 23.50 324.00 356.00
97 | 20:06:06 4.50 4.50 0.00 144.00 0.00
98 | 20:06:08 8.50 6.00 2.50 72.00 100.00
99 | 20:06:10 106.50 104.00 2.50 14040.00 24.00
100 | 20:06:12 165.00 165.00 0.00 18820.00 0.00
101 | 20:06:14 75.00 70.00 5.00 12836.00 256.00
102 | 20:06:16 193.50 192.50 1.00 27688.00 12.00
103 | 20:06:18 481.00 481.00 0.00 104644.00 0.00
104 | 20:06:20 884.50 879.50 5.00 218920.00 152.00
105 | 20:06:22 504.00 504.00 0.00 120420.00 0.00
106 | 20:06:24 54.50 51.00 3.50 9620.00 132.00
107 | 20:06:26 6.00 6.00 0.00 1096.00 0.00
108 | 20:06:28 7.50 5.50 2.00 360.00 20.00
109 | 20:06:30 4.50 1.00 3.50 8.00 116.00
110 | 20:06:32 5.00 5.00 0.00 356.00 0.00
111 | 20:06:34 10.00 4.00 6.00 248.00 52.00
112 | 20:06:36 6.00 2.50 3.50 184.00 112.00
113 | 20:06:38 0.00 0.00 0.00 0.00 0.00
114 | 20:06:40 4.00 0.00 4.00 0.00 148.00
115 | 20:06:42 0.50 0.00 0.50 0.00 12.00
116 | 20:06:44 1.50 1.00 0.50 256.00 8.00
117 | 20:06:46 3.50 0.00 3.50 0.00 132.00
118 | 20:06:48 0.00 0.00 0.00 0.00 0.00
119 | 20:06:50 0.50 0.00 0.50 0.00 4.00
120 | 20:06:52 10.00 5.00 5.00 392.00 144.00
121 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # sarviewer
2 |
3 | This repository is intended to give a simple way to measure resources usage (CPU, RAM...) in a machine. It uses sar to retrieve data and gnuplot (by default) or matplotlib to generate graphs from it.
4 |
5 | Useful to visualize and analyze data during stress tests.
6 |
7 | The following graphs based on sar data are generated:
8 |
9 | * CPU usage
10 | * Load average
11 | * RAM usage
12 | * I/O transfer
13 | * Processes created per second
14 | * Swap usage
15 | * Context switches
16 | * Tasks (run queue, active, blocked)
17 | * Network interface statistics (eth0 by default)
18 | * TCP/UDP sockets
19 |
20 | ## Requirements
21 |
22 | For basic functionality you will need to install **sysstat** and **gnuplot** in your system using your package manager:
23 | ```bash
24 | # Debian & based
25 | apt-get install sysstat gnuplot
26 | # RHEL & based
27 | yum install sysstat gnuplot
28 | ```
29 |
30 | Minimum version required:
31 |
32 | * gnuplot 4.4+
33 | * sysstat 10.1.5+
34 |
35 | You can check your current version with:
36 | ```bash
37 | # Gnuplot
38 | gnuplot --version
39 | # Sysstat
40 | sar -V
41 | ```
42 |
43 | If your current distribution (for example, CentOS 6) doesn't have these versions in repositories by default, you will have to either install the needed package or build from sources.
44 |
45 | If you want to generate the graphs using **matplotlib** (in **Python 2.7**) you can install it with **pip**. In case you don't have pip [check the official guide](https://pip.pypa.io/en/stable/installing/#using-linux-package-managers) to install it using your chosen package manager. Once you have pip just:
46 | ```bash
47 | pip install matplotlib
48 | ```
49 |
50 | * If you are going to use the mail option (to send the graphs via email) you will need **mutt**:
51 | ```bash
52 | # Debian & based
53 | apt-get install mutt
54 | # RHEL & based
55 | yum install mutt
56 | ```
57 |
58 | ## Usage
59 |
60 | * Clone this repo or download it (ZIP format). Note that the files contained in data/ and graphs/ folders are only for sample purposes.
61 | * By default the graphs are generated using gnuplot. If you want to generate them using matplotlib, change the variable **graph_generator** in the file **sarviewer.properties** from *gnuplot* to *matplotlib*
62 | * Network interface statistics are generated for eth0 by default. Change the variable **network_interface** as needed in **sarviewer.properties** file.
63 | * The repo can be used in two modes, depending on your needs. See below.
64 |
65 | ### Mode 1: Begin collecting data and generate graphs
66 |
67 | * Useful for stress tests. Launch the **data_collector.sh** script if you want to begin collecting data. Specify the number of samples and interval to take each sample. Notice that whenever you want you can cancel the collector with *Ctrl+C*, interrumpting the collection of data. If it is cancelled you will need to launch the script **plotter.sh** manually. The data and graphs generated will overwrite the samples given in this repo in **data/** and **graphs/** folder respectively.
68 |
69 | ```
70 | [jota@myserver sarviewer]$ ./data_collector.sh
71 | Please specify the number of samples to take-> 10
72 | Please specify the sample interval (take sample every X seconds)-> 2
73 | Taking 10 samples with 2 seconds interval
74 | Total time to collect all data: 20 seconds
75 | ----------------------------------
76 | >>> Collecting data
77 | >>> Please wait until data collection is completed
78 | ----------------------------------
79 | - You can abort this script with Ctrl+C, but have in mind the data will stop being collected when you cancel it.
80 | - You will also need to manually launch script plotter.sh to generate the graphs.
81 | ```
82 |
83 | * Once the script has finished the data collection or you have cancelled it (and subsequently launched plotter.sh) you can analyze the resource usage in the graphs (PNG format) that have been generated in the **graphs/** folder of this repo.
84 |
85 | * You can also use parameters with the script, for example:
86 |
87 | ```
88 | # Generate 10 samples with 1 second interval between each one
89 | ./data_collector.sh -n 10 -i 1
90 |
91 | # Generate 10 samples with 1 second interval between each one and send results to mail
92 | ./data_collector.sh -n 10 -i 1 -m example@example.com
93 | ```
94 |
95 | ### Mode 2: Read data from sar daemon and generate graphs
96 |
97 | * If you just want to read the data already generated by sar daemon in your system, use the script **system_data_reader.sh** and choose the sa* file you want to parse to generate the corresponding graphs. Remember that sar daemon should have been previously enabled in **/etc/default/sysstat**
98 |
99 | ```
100 | [jota@myserver sarviewer]$ ./system_data_reader.sh
101 | List of sa* files available at this moment to retrieve data from:
102 |
103 | -------------------------------------------
104 | File sa15 with data from Linux 3.16.0-4-amd64 (myserver) 04/15/17 _x86_64_ (8 CPU)
105 | File sa16 with data from Linux 3.16.0-4-amd64 (myserver) 04/16/17 _x86_64_ (8 CPU)
106 | File sa17 with data from Linux 3.16.0-4-amd64 (myserver) 04/17/17 _x86_64_ (8 CPU)
107 | File sa18 with data from Linux 3.16.0-4-amd64 (myserver) 04/18/17 _x86_64_ (8 CPU)
108 | File sa19 with data from Linux 3.16.0-4-amd64 (myserver) 04/19/17 _x86_64_ (8 CPU)
109 | File sa20 with data from Linux 3.16.0-4-amd64 (myserver) 04/20/17 _x86_64_ (8 CPU)
110 | File sa21 with data from Linux 3.16.0-4-amd64 (myserver) 04/21/17 _x86_64_ (8 CPU)
111 | File sa22 with data from Linux 3.16.0-4-amd64 (myserver) 04/22/17 _x86_64_ (8 CPU)
112 | File sa23 with data from Linux 3.16.0-4-amd64 (myserver) 04/23/17 _x86_64_ (8 CPU)
113 | -------------------------------------------
114 |
115 | Note that the number that follows the "sa" file specifies the day of the data collected by sar daemon
116 | Please select a sa* file from the listed above: sa15
117 | ```
118 |
119 | * You can also use parameters with the script **system_data_reader.sh**, specifying the sa file to parse, start/ending time and an optional email address where you will receive your graphs attached. Examples:
120 |
121 | ```
122 | # Send by email day 04 statistics
123 | ./system_data_reader.sh -f sa04 -m example@example.com
124 |
125 | # Send by email day 04 statistics between 09:00 and 12:00
126 | ./system_data_reader.sh -f sa04 -s 09:00 -e 12:00 -m example@example.com
127 |
128 | # Send by email day 05 statistics just since 10:00
129 | ./system_data_reader.sh -f sa05 -s 10:00 -m example@example.com
130 |
131 | # Just parse day 05 statistics
132 | ./system_data_reader.sh -f sa05
133 | ```
134 |
135 | * Parameters are also useful if you want to send statistics periodically with a **crontab**. Examples:
136 |
137 | ```
138 | # Send graphs statistics from present day everyday at 23:30
139 | 30 23 * * * /home/jota/scripts/sarviewer/system_data_reader.sh -f sa$(date +\%d) -m example@example.com
140 |
141 | # Send graphs statistics from the day before everyday at 23:30
142 | 30 23 * * * /home/jota/scripts/sarviewer/system_data_reader.sh -f sa$(date +\%d -d yesterday) -m example@example.com
143 | ```
144 |
145 | ## GNUPLOT samples
146 |
147 | Some samples of graphs generated with gnuplot
148 |
149 | * RAM
150 |
151 | 
152 |
153 | * CPU
154 |
155 | 
156 |
157 | * Load average
158 |
159 | 
160 |
161 | * Processes
162 |
163 | 
164 |
165 | ## Matplotlib samples
166 |
167 | Some samples of graphs generated with matplotlib (Python)
168 |
169 | * RAM
170 |
171 | 
172 |
173 | * CPU
174 |
175 | 
176 |
177 | * Load average
178 |
179 | 
180 |
181 | * Processes
182 |
183 | 
184 |
--------------------------------------------------------------------------------
/data/loadaverage.dat:
--------------------------------------------------------------------------------
1 | 20:02:54 4 539 0.25 0.34 0.48 0
2 | 20:02:56 4 539 0.31 0.35 0.48 0
3 | 20:02:58 2 568 0.31 0.35 0.48 0
4 | 20:03:00 3 573 0.29 0.34 0.48 0
5 | 20:03:02 3 573 0.29 0.34 0.48 0
6 | 20:03:04 1 573 0.29 0.34 0.48 0
7 | 20:03:06 1 573 0.27 0.34 0.48 0
8 | 20:03:08 2 573 0.27 0.34 0.48 0
9 | 20:03:10 1 578 0.32 0.35 0.48 0
10 | 20:03:12 3 580 0.32 0.35 0.48 0
11 | 20:03:14 2 592 0.32 0.35 0.48 0
12 | 20:03:16 3 596 0.30 0.34 0.48 0
13 | 20:03:18 2 597 0.30 0.34 0.48 0
14 | 20:03:20 3 597 0.35 0.35 0.48 0
15 | 20:03:22 2 597 0.35 0.35 0.48 0
16 | 20:03:24 2 597 0.35 0.35 0.48 0
17 | 20:03:26 3 595 0.49 0.38 0.49 0
18 | 20:03:28 3 595 0.49 0.38 0.49 0
19 | 20:03:30 3 595 0.45 0.37 0.49 0
20 | 20:03:32 2 599 0.45 0.37 0.49 1
21 | 20:03:34 3 604 0.45 0.37 0.49 0
22 | 20:03:36 2 601 0.57 0.40 0.50 1
23 | 20:03:38 2 601 0.57 0.40 0.50 0
24 | 20:03:40 2 609 0.77 0.44 0.51 0
25 | 20:03:42 3 611 0.77 0.44 0.51 0
26 | 20:03:44 2 611 0.77 0.44 0.51 0
27 | 20:03:46 3 611 0.78 0.45 0.51 0
28 | 20:03:48 3 611 0.78 0.45 0.51 0
29 | 20:03:50 2 611 0.96 0.50 0.53 1
30 | 20:03:52 1 618 0.96 0.50 0.53 0
31 | 20:03:54 3 618 0.96 0.50 0.53 0
32 | 20:03:56 3 617 1.20 0.55 0.55 0
33 | 20:03:58 2 617 1.20 0.55 0.55 0
34 | 20:04:00 2 617 1.35 0.59 0.56 0
35 | 20:04:02 2 617 1.35 0.59 0.56 1
36 | 20:04:04 2 618 1.35 0.59 0.56 0
37 | 20:04:06 2 618 1.32 0.60 0.56 0
38 | 20:04:08 4 618 1.32 0.60 0.56 0
39 | 20:04:10 3 618 1.37 0.62 0.57 0
40 | 20:04:12 2 619 1.37 0.62 0.57 0
41 | 20:04:14 2 620 1.37 0.62 0.57 0
42 | 20:04:16 2 620 1.35 0.63 0.57 0
43 | 20:04:18 3 620 1.35 0.63 0.57 0
44 | 20:04:20 2 620 1.32 0.64 0.57 0
45 | 20:04:22 2 619 1.32 0.64 0.57 0
46 | 20:04:24 2 619 1.32 0.64 0.57 0
47 | 20:04:26 3 619 1.37 0.66 0.58 0
48 | 20:04:28 3 619 1.37 0.66 0.58 0
49 | 20:04:30 4 620 1.34 0.66 0.58 0
50 | 20:04:32 2 620 1.34 0.66 0.58 0
51 | 20:04:34 1 620 1.34 0.66 0.58 0
52 | 20:04:36 1 621 1.31 0.67 0.59 0
53 | 20:04:38 2 621 1.31 0.67 0.59 0
54 | 20:04:40 2 621 1.61 0.74 0.61 0
55 | 20:04:42 3 621 1.61 0.74 0.61 0
56 | 20:04:44 2 621 1.61 0.74 0.61 0
57 | 20:04:46 2 621 1.56 0.75 0.61 0
58 | 20:04:48 2 621 1.56 0.75 0.61 0
59 | 20:04:50 1 621 1.68 0.78 0.62 0
60 | 20:04:52 3 621 1.68 0.78 0.62 0
61 | 20:04:54 4 620 1.68 0.78 0.62 0
62 | 20:04:56 3 620 1.62 0.79 0.63 0
63 | 20:04:58 3 620 1.62 0.79 0.63 0
64 | 20:05:00 2 620 1.57 0.79 0.63 0
65 | 20:05:02 1 620 1.57 0.79 0.63 0
66 | 20:05:04 2 620 1.57 0.79 0.63 0
67 | 20:05:06 2 621 1.53 0.79 0.63 0
68 | 20:05:08 6 620 1.53 0.79 0.63 0
69 | 20:05:10 2 620 1.56 0.81 0.64 0
70 | 20:05:12 3 620 1.56 0.81 0.64 0
71 | 20:05:14 2 620 1.56 0.81 0.64 0
72 | 20:05:16 3 621 1.60 0.83 0.65 0
73 | 20:05:18 2 620 1.60 0.83 0.65 0
74 | 20:05:20 3 619 1.87 0.90 0.67 0
75 | 20:05:22 2 619 1.87 0.90 0.67 0
76 | 20:05:24 2 619 1.87 0.90 0.67 0
77 | 20:05:26 2 620 1.80 0.90 0.67 0
78 | 20:05:28 2 619 1.80 0.90 0.67 0
79 | 20:05:30 3 619 1.74 0.91 0.67 0
80 | 20:05:32 2 626 1.74 0.91 0.67 1
81 | 20:05:34 2 626 1.74 0.91 0.67 1
82 | 20:05:36 2 628 1.76 0.92 0.68 2
83 | 20:05:38 6 627 1.76 0.92 0.68 1
84 | 20:05:40 2 627 1.78 0.94 0.69 1
85 | 20:05:42 1 627 1.78 0.94 0.69 0
86 | 20:05:44 4 627 1.78 0.94 0.69 0
87 | 20:05:46 2 628 1.88 0.98 0.70 1
88 | 20:05:48 2 627 1.88 0.98 0.70 0
89 | 20:05:50 1 626 1.89 0.99 0.71 1
90 | 20:05:52 2 626 1.89 0.99 0.71 0
91 | 20:05:54 1 626 1.89 0.99 0.71 1
92 | 20:05:56 3 627 1.89 1.01 0.71 2
93 | 20:05:58 3 626 1.89 1.01 0.71 1
94 | 20:06:00 4 627 1.90 1.03 0.72 0
95 | 20:06:02 3 627 1.90 1.03 0.72 0
96 | 20:06:04 2 627 1.90 1.03 0.72 0
97 | 20:06:06 2 629 1.83 1.03 0.72 0
98 | 20:06:08 2 628 1.83 1.03 0.72 1
99 | 20:06:10 2 628 1.76 1.03 0.72 0
100 | 20:06:12 4 628 1.76 1.03 0.72 0
101 | 20:06:14 1 628 1.76 1.03 0.72 1
102 | 20:06:16 3 629 1.78 1.04 0.73 0
103 | 20:06:18 5 628 1.78 1.04 0.73 1
104 | 20:06:20 4 627 1.72 1.04 0.73 1
105 | 20:06:22 2 627 1.72 1.04 0.73 0
106 | 20:06:24 5 627 1.72 1.04 0.73 0
107 | 20:06:26 3 628 1.74 1.06 0.74 0
108 | 20:06:28 3 627 1.74 1.06 0.74 0
109 | 20:06:30 4 627 1.76 1.07 0.75 0
110 | 20:06:32 4 627 1.76 1.07 0.75 0
111 | 20:06:34 2 627 1.76 1.07 0.75 0
112 | 20:06:36 4 629 1.86 1.11 0.76 0
113 | 20:06:38 3 629 1.86 1.11 0.76 0
114 | 20:06:40 3 629 2.03 1.15 0.77 0
115 | 20:06:42 8 629 2.03 1.15 0.77 0
116 | 20:06:44 3 629 2.03 1.15 0.77 0
117 | 20:06:46 3 630 2.03 1.17 0.78 0
118 | 20:06:48 3 629 2.03 1.17 0.78 0
119 | 20:06:50 2 629 1.95 1.16 0.78 0
120 | 20:06:52 4 625 1.95 1.16 0.78 0
121 |
--------------------------------------------------------------------------------
/data/cpu.dat:
--------------------------------------------------------------------------------
1 | 20:02:54 all 3.00 0.00 0.13 0.00 0.00 96.87
2 | 20:02:56 all 10.22 0.00 0.31 0.44 0.00 89.03
3 | 20:02:58 all 8.96 0.00 2.44 1.00 0.00 87.59
4 | 20:03:00 all 2.12 0.00 0.44 0.06 0.00 97.38
5 | 20:03:02 all 5.45 0.00 0.13 0.13 0.00 94.30
6 | 20:03:04 all 1.69 0.00 0.25 0.56 0.00 97.50
7 | 20:03:06 all 3.81 0.00 0.12 0.25 0.00 95.82
8 | 20:03:08 all 0.50 0.00 0.13 0.00 0.00 99.37
9 | 20:03:10 all 6.98 0.00 1.00 0.25 0.00 91.77
10 | 20:03:12 all 9.59 0.00 2.69 0.56 0.00 87.16
11 | 20:03:14 all 6.81 0.38 1.32 0.06 0.00 91.43
12 | 20:03:16 all 7.12 0.94 1.00 0.50 0.00 90.44
13 | 20:03:18 all 7.16 0.00 0.44 0.50 0.00 91.90
14 | 20:03:20 all 5.64 0.00 0.50 0.00 0.00 93.86
15 | 20:03:22 all 7.60 0.00 0.63 0.25 0.00 91.52
16 | 20:03:24 all 5.33 0.00 0.31 1.13 0.00 93.22
17 | 20:03:26 all 3.02 0.00 0.13 0.06 0.00 96.80
18 | 20:03:28 all 4.58 0.00 0.25 0.44 0.00 94.73
19 | 20:03:30 all 4.14 0.00 1.13 0.00 0.00 94.73
20 | 20:03:32 all 3.07 0.00 1.57 9.33 0.00 86.04
21 | 20:03:34 all 9.00 0.00 4.15 8.74 0.00 78.11
22 | 20:03:36 all 8.38 0.00 1.70 6.99 0.00 82.92
23 | 20:03:38 all 8.90 0.00 0.44 5.20 0.00 85.46
24 | 20:03:40 all 14.69 0.00 7.06 2.73 0.00 75.52
25 | 20:03:42 all 8.56 0.00 1.64 5.79 0.00 84.01
26 | 20:03:44 all 18.05 0.00 2.34 3.67 0.00 75.93
27 | 20:03:46 all 14.40 0.00 0.69 0.13 0.00 84.78
28 | 20:03:48 all 18.69 0.00 0.82 0.13 0.00 80.37
29 | 20:03:50 all 14.11 0.00 0.75 4.51 0.00 80.63
30 | 20:03:52 all 11.37 0.00 1.07 2.76 0.00 84.80
31 | 20:03:54 all 20.49 0.00 1.50 0.19 0.00 77.82
32 | 20:03:56 all 17.87 0.00 1.13 0.69 0.00 80.31
33 | 20:03:58 all 17.60 0.00 1.01 0.13 0.00 81.27
34 | 20:04:00 all 25.60 0.00 2.58 1.01 0.00 70.82
35 | 20:04:02 all 16.98 0.00 0.75 1.01 0.00 81.26
36 | 20:04:04 all 16.24 0.00 1.13 1.13 0.00 81.50
37 | 20:04:06 all 19.47 0.00 1.07 0.50 0.00 78.96
38 | 20:04:08 all 16.54 0.00 1.07 0.25 0.00 82.14
39 | 20:04:10 all 18.19 0.00 1.18 0.25 0.00 80.37
40 | 20:04:12 all 18.71 0.00 1.51 0.75 0.00 79.03
41 | 20:04:14 all 17.65 0.00 1.06 0.13 0.00 81.16
42 | 20:04:16 all 18.61 0.00 1.00 0.44 0.00 79.95
43 | 20:04:18 all 17.47 0.00 1.00 0.06 0.00 81.47
44 | 20:04:20 all 17.22 0.00 0.94 0.06 0.00 81.78
45 | 20:04:22 all 19.50 0.00 0.69 0.44 0.00 79.37
46 | 20:04:24 all 17.06 0.00 0.69 0.13 0.00 82.12
47 | 20:04:26 all 18.33 0.00 0.82 0.00 0.00 80.85
48 | 20:04:28 all 17.34 0.00 0.82 0.50 0.00 81.34
49 | 20:04:30 all 16.61 0.00 0.82 0.00 0.00 82.57
50 | 20:04:32 all 18.75 0.00 1.00 0.44 0.00 79.81
51 | 20:04:34 all 17.07 0.00 0.69 0.19 0.00 82.05
52 | 20:04:36 all 16.84 0.00 0.75 0.00 0.00 82.40
53 | 20:04:38 all 14.90 0.00 1.70 0.44 0.00 82.95
54 | 20:04:40 all 15.82 0.00 4.43 0.00 0.00 79.75
55 | 20:04:42 all 18.92 0.00 0.94 0.13 0.00 80.01
56 | 20:04:44 all 18.31 0.00 0.82 0.38 0.00 80.50
57 | 20:04:46 all 16.46 0.00 0.76 0.06 0.00 82.72
58 | 20:04:48 all 18.90 0.00 0.81 0.44 0.00 79.85
59 | 20:04:50 all 20.67 0.00 1.00 0.06 0.00 78.26
60 | 20:04:52 all 17.82 0.00 0.57 0.00 0.00 81.61
61 | 20:04:54 all 19.04 0.00 0.88 0.63 0.00 79.46
62 | 20:04:56 all 17.80 0.00 1.37 0.00 0.00 80.82
63 | 20:04:58 all 20.26 0.00 1.07 0.44 0.00 78.23
64 | 20:05:00 all 18.88 0.00 1.00 0.63 0.00 79.49
65 | 20:05:02 all 17.04 0.00 1.19 0.06 0.00 81.70
66 | 20:05:04 all 19.22 0.00 0.69 0.44 0.00 79.65
67 | 20:05:06 all 18.05 0.00 0.63 0.00 0.00 81.33
68 | 20:05:08 all 17.51 0.00 0.82 0.00 0.00 81.67
69 | 20:05:10 all 20.15 0.00 0.75 0.44 0.00 78.66
70 | 20:05:12 all 18.26 0.00 0.56 0.25 0.00 80.93
71 | 20:05:14 all 18.60 0.00 0.63 0.06 0.00 80.71
72 | 20:05:16 all 17.14 0.00 2.24 0.37 0.00 80.24
73 | 20:05:18 all 8.11 0.00 1.07 0.06 0.00 90.75
74 | 20:05:20 all 16.59 0.00 3.71 0.38 0.00 79.32
75 | 20:05:22 all 18.66 0.00 0.63 0.00 0.00 80.72
76 | 20:05:24 all 16.78 0.00 0.82 0.00 0.00 82.40
77 | 20:05:26 all 19.75 0.00 0.63 0.88 0.00 78.75
78 | 20:05:28 all 17.07 0.00 0.38 0.13 0.00 82.43
79 | 20:05:30 all 15.62 0.00 0.69 0.25 0.00 83.45
80 | 20:05:32 all 12.96 0.00 0.44 1.69 0.00 84.91
81 | 20:05:34 all 10.07 0.00 0.56 6.00 0.00 83.36
82 | 20:05:36 all 14.65 0.00 0.94 11.96 0.00 72.45
83 | 20:05:38 all 5.60 0.00 1.95 13.84 0.00 78.62
84 | 20:05:40 all 10.09 0.00 1.63 7.96 0.00 80.31
85 | 20:05:42 all 12.06 0.00 1.01 5.18 0.00 81.76
86 | 20:05:44 all 11.86 0.00 1.32 4.89 0.00 81.93
87 | 20:05:46 all 13.05 0.00 1.44 5.08 0.00 80.43
88 | 20:05:48 all 13.11 0.00 2.07 5.52 0.00 79.30
89 | 20:05:50 all 11.42 0.00 1.45 5.05 0.00 82.08
90 | 20:05:52 all 15.33 0.00 1.76 4.84 0.00 78.08
91 | 20:05:54 all 11.48 0.00 1.68 5.74 0.00 81.10
92 | 20:05:56 all 8.44 0.00 1.76 7.75 0.00 82.05
93 | 20:05:58 all 23.26 0.00 6.70 11.23 0.00 58.81
94 | 20:06:00 all 19.84 0.00 6.15 1.07 0.00 72.94
95 | 20:06:02 all 18.88 0.00 5.48 0.00 0.00 75.64
96 | 20:06:04 all 14.38 0.00 0.50 0.88 0.00 84.24
97 | 20:06:06 all 12.84 0.00 0.44 0.13 0.00 86.60
98 | 20:06:08 all 17.06 0.00 0.44 0.38 0.00 82.12
99 | 20:06:10 all 12.32 0.00 0.82 1.89 0.00 84.98
100 | 20:06:12 all 12.76 0.00 5.85 3.27 0.00 78.13
101 | 20:06:14 all 17.20 0.00 5.88 2.38 0.00 74.55
102 | 20:06:16 all 11.01 0.00 0.81 4.38 0.00 83.79
103 | 20:06:18 all 10.57 0.00 1.07 6.86 0.00 81.50
104 | 20:06:20 all 8.04 0.00 2.07 11.37 0.00 78.52
105 | 20:06:22 all 14.20 0.00 2.20 7.47 0.00 76.13
106 | 20:06:24 all 20.64 0.00 2.26 1.69 0.00 75.41
107 | 20:06:26 all 25.40 0.00 1.65 0.00 0.00 72.96
108 | 20:06:28 all 30.80 0.00 2.45 0.13 0.00 66.62
109 | 20:06:30 all 32.85 0.00 1.56 0.50 0.00 65.08
110 | 20:06:32 all 29.80 0.00 1.50 0.06 0.00 68.64
111 | 20:06:34 all 30.48 0.00 1.63 0.06 0.00 67.83
112 | 20:06:36 all 32.51 0.00 2.73 0.25 0.00 64.52
113 | 20:06:38 all 30.30 0.00 1.64 0.57 0.00 67.49
114 | 20:06:40 all 31.05 0.00 1.59 0.32 0.00 67.05
115 | 20:06:42 all 29.59 0.00 1.44 0.00 0.00 68.97
116 | 20:06:44 all 29.11 0.00 2.12 0.00 0.00 68.77
117 | 20:06:46 all 30.73 0.00 1.57 0.25 0.00 67.44
118 | 20:06:48 all 29.29 0.00 1.63 0.00 0.00 69.08
119 | 20:06:50 all 28.37 0.00 2.28 0.06 0.00 69.28
120 | 20:06:52 all 32.40 0.00 1.63 0.31 0.00 65.67
121 |
--------------------------------------------------------------------------------
/data/ram.dat:
--------------------------------------------------------------------------------
1 | 20:02:54 1568284 14795412 90.42 1675712 10285128 5653540 11.19 4598524 9267920 892
2 | 20:02:56 1554008 14809688 90.50 1675712 10285168 5653540 11.19 4613576 9267956 916
3 | 20:02:58 1479656 14884040 90.96 1675724 10285120 6160260 12.19 4670756 9267268 964
4 | 20:03:00 1466256 14897440 91.04 1675724 10287480 6222052 12.31 4687864 9267432 1040
5 | 20:03:02 1464156 14899540 91.05 1675724 10287472 6222052 12.31 4690668 9267108 1124
6 | 20:03:04 1470232 14893464 91.02 1675736 10287468 6222052 12.31 4683340 9267108 1152
7 | 20:03:06 1467128 14896568 91.03 1675736 10287472 6222052 12.31 4686688 9267108 1160
8 | 20:03:08 1477124 14886572 90.97 1675736 10287472 6222052 12.31 4676684 9267108 416
9 | 20:03:10 1486048 14877648 90.92 1675748 10287576 6246480 12.36 4667592 9266020 520
10 | 20:03:12 1460492 14903204 91.07 1675752 10287580 6278380 12.42 4692584 9259184 536
11 | 20:03:14 1386236 14977460 91.53 1675752 10320784 6523072 12.91 4727516 9288728 328
12 | 20:03:16 1355904 15007792 91.71 1675752 10340512 6601040 13.06 4742640 9306432 816
13 | 20:03:18 1355900 15007796 91.71 1675764 10327440 6584812 13.03 4754492 9292976 1324
14 | 20:03:20 1350004 15013692 91.75 1675764 10327504 6594724 13.05 4761680 9292064 1448
15 | 20:03:22 1347580 15016116 91.76 1675764 10327572 6594540 13.05 4763732 9292192 1816
16 | 20:03:24 1330816 15032880 91.87 1675764 10328108 6612244 13.08 4776836 9290356 2232
17 | 20:03:26 1335136 15028560 91.84 1675772 10328108 6612244 13.08 4772532 9290356 2232
18 | 20:03:28 1333308 15030388 91.85 1675776 10328104 6620936 13.10 4773156 9292620 2232
19 | 20:03:30 1336032 15027664 91.84 1675776 10328108 6620936 13.10 4771148 9292620 2276
20 | 20:03:32 1194948 15168748 92.70 1675788 10420092 6976324 13.80 4818672 9383104 2280
21 | 20:03:34 1043664 15320032 93.62 1675816 10491372 7150648 14.15 4888192 9454580 2240
22 | 20:03:36 831160 15532536 94.92 1675968 10536760 7191548 14.23 5064940 9490132 2284
23 | 20:03:38 739896 15623800 95.48 1676100 10564124 7191548 14.23 5139248 9508152 2332
24 | 20:03:40 663416 15700280 95.95 1676112 10574296 7245484 14.34 5173748 9514368 2364
25 | 20:03:42 523424 15840272 96.80 1676112 10578284 7310988 14.47 5275128 9517300 2364
26 | 20:03:44 368104 15995592 97.75 1676128 10598544 7367276 14.58 5409800 9537320 268
27 | 20:03:46 164656 16199040 98.99 1676136 10582184 7367276 14.58 5626608 9520740 332
28 | 20:03:48 170696 16193000 98.96 1676136 10367224 7367276 14.58 5835364 9306524 324
29 | 20:03:50 173080 16190616 98.94 1676184 10169640 7367276 14.58 6056040 9084028 368
30 | 20:03:52 159728 16203968 99.02 1676232 9834040 7397288 14.64 6382132 8767484 1152
31 | 20:03:54 165424 16198272 98.99 1676232 9750956 7397288 14.64 6449428 8694800 3432
32 | 20:03:56 178312 16185384 98.91 1676232 9454708 7665620 15.17 6716448 8413212 5528
33 | 20:03:58 397188 15966508 97.57 1676240 9459516 7401420 14.64 6497660 8417880 7684
34 | 20:04:00 348100 16015596 97.87 1676376 9470228 7401420 14.64 6534384 8428752 11404
35 | 20:04:02 370416 15993280 97.74 1676884 9476876 7401420 14.64 6509484 8435368 1032
36 | 20:04:04 351276 16012420 97.85 1676896 9495228 7413232 14.67 6524288 8438988 15604
37 | 20:04:06 333080 16030616 97.96 1676900 9497848 7413232 14.67 6527324 8442100 15700
38 | 20:04:08 330920 16032776 97.98 1676900 9500664 7413232 14.67 6526756 8444912 15708
39 | 20:04:10 328952 16034744 97.99 1676908 9502524 7413232 14.67 6527628 8446516 15740
40 | 20:04:12 341144 16022552 97.92 1676952 9504956 7413232 14.67 6512668 8448824 15924
41 | 20:04:14 339232 16024464 97.93 1676952 9507660 7413232 14.67 6510764 8451512 16776
42 | 20:04:16 330572 16033124 97.98 1676964 9510052 7413232 14.67 6516588 8454044 17844
43 | 20:04:18 322832 16040864 98.03 1676964 9514196 7413232 14.67 6520336 8458228 19980
44 | 20:04:20 312280 16051416 98.09 1676964 9520784 7413232 14.67 6521624 8464744 20988
45 | 20:04:22 306756 16056940 98.13 1676972 9524736 7413232 14.67 6524040 8468076 23048
46 | 20:04:24 301236 16062460 98.16 1676972 9527480 7413232 14.67 6525532 8469432 24728
47 | 20:04:26 293164 16070532 98.21 1676972 9531380 7413232 14.67 6530676 8471752 27092
48 | 20:04:28 291636 16072060 98.22 1676980 9533212 7413232 14.67 6531888 8472528 28520
49 | 20:04:30 287460 16076236 98.24 1676984 9536880 7413232 14.67 6533604 8474424 31760
50 | 20:04:32 285356 16078340 98.26 1676996 9538612 7413232 14.67 6536356 8474828 33824
51 | 20:04:34 285084 16078612 98.26 1677024 9539100 7413232 14.67 6537124 8473648 19460
52 | 20:04:36 282712 16080984 98.27 1677024 9541120 7413232 14.67 6539688 8473808 21476
53 | 20:04:38 283076 16080620 98.27 1677032 9542676 7413232 14.67 6539968 8473916 22636
54 | 20:04:40 283292 16080404 98.27 1677032 9545004 7421352 14.68 6539580 8473856 24508
55 | 20:04:42 275856 16087840 98.31 1677032 9545424 7421352 14.68 6547352 8473372 24724
56 | 20:04:44 264396 16099300 98.38 1677048 9547568 7421352 14.68 6558972 8471872 26324
57 | 20:04:46 262208 16101488 98.40 1677048 9548836 7430312 14.70 6561756 8471000 27588
58 | 20:04:48 256996 16106700 98.43 1677052 9552348 7438420 14.72 6564544 8471824 28468
59 | 20:04:50 261568 16102128 98.40 1677052 9553792 7438420 14.72 6560620 8470712 26384
60 | 20:04:52 257488 16106208 98.43 1677052 9555772 7438420 14.72 6565648 8470652 28352
61 | 20:04:54 288068 16075628 98.24 1677056 9557500 7438420 14.72 6533852 8472360 23260
62 | 20:04:56 289560 16074136 98.23 1677056 9559780 7438420 14.72 6530488 8474772 25532
63 | 20:04:58 279148 16084548 98.29 1677068 9562872 7438420 14.72 6537952 8477772 27364
64 | 20:05:00 258488 16105208 98.42 1677072 9564684 7438420 14.72 6557944 8479440 24812
65 | 20:05:02 251712 16111984 98.46 1677076 9566524 7438420 14.72 6560256 8481344 26656
66 | 20:05:04 238832 16124864 98.54 1677076 9568188 7438420 14.72 6571660 8482680 24080
67 | 20:05:06 236916 16126780 98.55 1677076 9568468 7438420 14.72 6572024 8483312 24112
68 | 20:05:08 233972 16129724 98.57 1677084 9568836 7438420 14.72 6577320 8483684 24500
69 | 20:05:10 219672 16144024 98.66 1677084 9568844 7438420 14.72 6592392 8483684 21316
70 | 20:05:12 218708 16144988 98.66 1677084 9568460 7438420 14.72 6592820 8483696 21316
71 | 20:05:14 212216 16151480 98.70 1677104 9568244 7438420 14.72 6584380 8497800 32672
72 | 20:05:16 201492 16162204 98.77 1677104 9568376 7438420 14.72 6593156 8497928 32728
73 | 20:05:18 204760 16158936 98.75 1677104 9568384 7438420 14.72 6593580 8497928 32660
74 | 20:05:20 208640 16155056 98.72 1677108 9568392 7438420 14.72 6584272 8497940 29460
75 | 20:05:22 202880 16160816 98.76 1677116 9568396 7438420 14.72 6591752 8497940 29636
76 | 20:05:24 205420 16158276 98.74 1677116 9568404 7438420 14.72 6589424 8497940 24796
77 | 20:05:26 200192 16163504 98.78 1677120 9570384 7438420 14.72 6594544 8499836 24800
78 | 20:05:28 197416 16166280 98.79 1677120 9570512 7438420 14.72 6596680 8500052 24800
79 | 20:05:30 165588 16198108 98.99 1677120 9575560 7438420 14.72 6615512 8504996 19960
80 | 20:05:32 171612 16192084 98.95 1677124 9585356 7445524 14.73 6613500 8502188 20076
81 | 20:05:34 155292 16208404 99.05 1677124 9598072 7445524 14.73 6619716 8511852 16116
82 | 20:05:36 163864 16199832 99.00 1677124 9443044 7445524 14.73 6747164 8373168 16116
83 | 20:05:38 169840 16193856 98.96 1677132 9285252 7445524 14.73 6882428 8235644 16172
84 | 20:05:40 160196 16203500 99.02 1677132 9169480 7445524 14.73 6992660 8138404 14612
85 | 20:05:42 173224 16190472 98.94 1677140 9041604 7445524 14.73 7095032 8024256 14644
86 | 20:05:44 166048 16197648 98.99 1677144 8895168 7445524 14.73 7237460 7892268 376
87 | 20:05:46 170000 16193696 98.96 1677144 8755500 7445524 14.73 7354840 7770448 376
88 | 20:05:48 173776 16189920 98.94 1677156 8575944 7445524 14.73 7508116 7611784 408
89 | 20:05:50 167016 16196680 98.98 1677156 8442356 7445524 14.73 7634896 7495332 404
90 | 20:05:52 171192 16192504 98.95 1677156 8213356 7445524 14.73 7843604 7287052 404
91 | 20:05:54 171844 16191852 98.95 1677156 8092988 7445524 14.73 7949008 7181668 372
92 | 20:05:56 348704 16014992 97.87 1567780 7896188 7445524 14.73 8057668 6901088 372
93 | 20:05:58 173816 16189880 98.94 1379376 7929840 7445524 14.73 8334768 6801984 392
94 | 20:06:00 186932 16176764 98.86 1305460 7876036 7445524 14.73 8439324 6687664 428
95 | 20:06:02 242220 16121476 98.52 1283380 7853836 7445524 14.73 8424048 6646428 428
96 | 20:06:04 173796 16189900 98.94 1265144 7835932 7445524 14.73 8526208 6613744 188
97 | 20:06:06 167816 16195880 98.97 1211020 7781172 7445524 14.73 8631036 6516000 188
98 | 20:06:08 160096 16203600 99.02 1179716 7721280 7445524 14.73 8720360 6436780 192
99 | 20:06:10 175416 16188280 98.93 1172004 7563580 7716720 15.27 8807192 6282328 228
100 | 20:06:12 161908 16201788 99.01 1172004 7550492 7716720 15.27 8817752 6271992 236
101 | 20:06:14 170304 16193392 98.96 1172004 7325492 7716720 15.27 8987444 6076084 268
102 | 20:06:16 162844 16200852 99.00 1172012 7312680 7716720 15.27 9022876 6069160 116
103 | 20:06:18 169408 16194288 98.96 1172012 7178752 7716720 15.27 9129560 5954036 120
104 | 20:06:20 169840 16193856 98.96 1172016 6970548 7716720 15.27 9116368 5973256 136
105 | 20:06:22 172100 16191596 98.95 1170856 6837100 7716720 15.27 9211440 5867380 180
106 | 20:06:24 255064 16108632 98.44 1170832 6404364 7715184 15.27 9528224 5465780 188
107 | 20:06:26 348188 16015508 97.87 1170832 6405208 7715184 15.27 9524816 5467204 208
108 | 20:06:28 326364 16037332 98.01 1170832 6405500 7715184 15.27 9531556 5467488 208
109 | 20:06:30 323904 16039792 98.02 1170832 6405608 7715184 15.27 9539944 5467556 196
110 | 20:06:32 323532 16040164 98.02 1170832 6405692 7715184 15.27 9543188 5467636 208
111 | 20:06:34 314628 16049068 98.08 1170836 6405936 7715184 15.27 9544036 5467856 160
112 | 20:06:36 300812 16062884 98.16 1170840 6406368 7715184 15.27 9559096 5468248 168
113 | 20:06:38 298308 16065388 98.18 1170840 6406368 7715184 15.27 9562000 5468240 168
114 | 20:06:40 293388 16070308 98.21 1170840 6406372 7715184 15.27 9573216 5468244 172
115 | 20:06:42 289916 16073780 98.23 1170840 6406372 7715184 15.27 9576760 5468244 200
116 | 20:06:44 286556 16077140 98.25 1170840 6406628 7715184 15.27 9580480 5468464 192
117 | 20:06:46 275644 16088052 98.32 1170844 6406628 7715184 15.27 9588952 5468500 220
118 | 20:06:48 275272 16088424 98.32 1170844 6406628 7715184 15.27 9589252 5468500 220
119 | 20:06:50 272916 16090780 98.33 1170848 6406628 7715184 15.27 9592084 5468500 220
120 | 20:06:52 274620 16089076 98.32 1170852 6406892 7715184 15.27 9588380 5468700 220
121 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 | {one line to give the program's name and a brief idea of what it does.}
635 | Copyright (C) {year} {name of author}
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | {project} Copyright (C) {year} {fullname}
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------