aboutsummaryrefslogtreecommitdiff
blob: bb3d0d93e348d19fd6a3d1c81b964f548a4cd157 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
--- rpimonitor/template/swap.conf.dist	2015-03-14 15:22:33.139612000 +0000
+++ rpimonitor/template/swap.conf	2015-03-14 15:25:01.529612000 +0000
@@ -5,27 +5,35 @@
 #  - swap total              - yes      - yes
 #  - swap used               - yes      - yes
 ########################################################################
-static.6.name=swap_total
-static.6.source=/proc/meminfo
-static.6.regexp=SwapTotal:\s+(\d+)
-static.6.postprocess=$1/1024
+
+dynamic.7.name=swap_total
+dynamic.7.source=/proc/meminfo
+dynamic.7.regexp=SwapTotal:\s+(\d+)
+dynamic.7.postprocess=$1/1024
+dynamic.7.rrd=GAUGE
 
 dynamic.8.name=swap_used
 dynamic.8.source=/proc/meminfo
 dynamic.8.regexp=SwapFree:\s+(\d+)
-dynamic.8.postprocess=$this->{'static'}->{'swap_total'} - ($1/1024)
+dynamic.8.postprocess=$this->{'dynamic'}->{'swap_total'} - ($1/1024)
 dynamic.8.rrd=GAUGE
 
+dynamic.18.name=swappiness
+dynamic.18.source=/proc/sys/vm/swappiness
+dynamic.18.regexp=(.*)
+dynamic.18.postprocess=
+dynamic.18.rrd=
+
 web.status.1.content.6.name=Swap
 web.status.1.content.6.icon=swap.png
-web.status.1.content.6.line.1="Used: <b>"+KMG(data.swap_used,'M')+"</b> (<b>"+Percent(data.swap_used,data.swap_total,'M')+"</b>) Free: <b>"+KMG(data.swap_total-data.swap_used,'M')+ "</b> Total: <b>"+ KMG(data.swap_total,'M') + "</b>"
+web.status.1.content.6.line.1="Used: <b>" + KMG(data.swap_used,'M') + "</b> (<b>" + Percent(data.swap_used,data.swap_total,'M') + "</b>) Free: <b>" + KMG(data.swap_total-data.swap_used,'M') + "</b> Total: <b>" + KMG(data.swap_total,'M') + "</b> Swappiness: <b>" + data.swappiness + "</b>"
 web.status.1.content.6.line.2=ProgressBar(data.swap_used,data.swap_total)
 
-web.statistics.1.content.5.name=Swap
-web.statistics.1.content.5.graph.1=swap_total
-web.statistics.1.content.5.graph.2=swap_used
-web.statistics.1.content.5.ds_graph_options.swap_total.label=Swap size (MB)
-web.statistics.1.content.5.ds_graph_options.swap_total.color="#FF7777"
-web.statistics.1.content.5.ds_graph_options.swap_used.label=Swap used (MB)
-web.statistics.1.content.5.ds_graph_options.swap_used.lines={ fill: true }
-web.statistics.1.content.5.ds_graph_options.swap_used.color="#7777FF"
+web.statistics.1.content.6.name=Swap
+web.statistics.1.content.6.graph.1=swap_total
+web.statistics.1.content.6.graph.2=swap_used
+web.statistics.1.content.6.ds_graph_options.swap_total.label=Swap size (MB)
+web.statistics.1.content.6.ds_graph_options.swap_total.color="#FF7777"
+web.statistics.1.content.6.ds_graph_options.swap_used.label=Swap used (MB)
+web.statistics.1.content.6.ds_graph_options.swap_used.lines={ fill: true }
+web.statistics.1.content.6.ds_graph_options.swap_used.color="#7777FF"