Révision 9ae7e3a9
Fix the file. Removed swap because the scale was getting to high and we couldn't see the active mem (to monitor the swap see 'OpenBSD swap' script).
| plugins/other/openbsd-memory | ||
|---|---|---|
| 2 | 2 |
if [ "$1" = "config" ]; then |
| 3 | 3 |
echo "graph_title Memory usage (in MB)" |
| 4 | 4 |
echo 'graph_category system' |
| 5 |
echo "acti.label Active momery" |
|
| 6 |
echo "total.label Memory total" |
|
| 7 |
echo "free.label Free memory" |
|
| 8 |
echo "swap.label Swap in use" |
|
| 5 |
echo "acti.label Active" |
|
| 6 |
echo "used.label Used" |
|
| 7 |
echo "total.label Total" |
|
| 8 |
echo "free.label Free" |
|
| 9 |
echo "swap.label Swap used" |
|
| 9 | 10 |
echo "swapt.label Swap total" |
| 10 | 11 |
exit 0 |
| 11 | 12 |
fi |
| ... | ... | |
| 26 | 27 |
} |
| 27 | 28 |
/^Memory/ {
|
| 28 | 29 |
acti = scale(spliter($3,1)); |
| 29 |
total = scale(spliter($3,2));
|
|
| 30 |
used = scale(spliter($3,2));
|
|
| 30 | 31 |
free = scale($6); |
| 32 |
total = used + free; |
|
| 31 | 33 |
swap = scale(spliter($8,1)); |
| 32 | 34 |
swapt = scale(spliter($8,2)); |
| 33 | 35 |
|
| 34 | 36 |
print "acti.value", acti |
| 37 |
print "used.value", used |
|
| 35 | 38 |
print "total.value", total |
| 36 | 39 |
print "free.value", free |
| 37 | 40 |
print "swap.value", swap |
Formats disponibles : Unified diff