added a new option called 'graph_mode' to view the memory graph in two different modes

This commit is contained in:
Jordi Sanfeliu 2017-09-27 10:44:55 +02:00
parent 90fba55cd5
commit 566bd1bb32
3 changed files with 33 additions and 10 deletions

View File

@ -1,3 +1,10 @@
3.NN.N - DD-MMM-2017
====================
- Added a new option called 'graph_mode' to view the memory graph in two
different modes: 'real' (being the default) and 'interpreted'.
(suggested by Łukasz "Cyber Killer" Korpalski, cyberkiller8 AT gmail.com)
3.10.0 - 25-Sep-2017
====================
- Added a complete graph for IPMI sensors using the 'ipmitool' command.

View File

@ -655,16 +655,29 @@ sub system_cgi {
undef(@tmpz);
undef(@CDEF);
if($config->{os} eq "Linux" || $config->{os} eq "FreeBSD") {
push(@tmp, "AREA:m_mused#EE4444:Used");
push(@tmp, "AREA:m_mcach#44EE44:Cached");
push(@tmp, "AREA:m_mbuff#CCCCCC:Buffers");
push(@tmp, "AREA:m_macti#E29136:Active");
push(@tmp, "AREA:m_minac#448844:Inactive");
push(@tmp, "LINE2:m_minac#008800");
push(@tmp, "LINE2:m_macti#E29136");
push(@tmp, "LINE2:m_mbuff#888888");
push(@tmp, "LINE2:m_mcach#00EE00");
push(@tmp, "LINE2:m_mused#EE0000");
if(lc($system->{graph_mode} || "") eq "interpreted") {
push(@tmp, "AREA:m_mcach#44EE44:Cached");
push(@tmp, "AREA:m_mbuff#CCCCCC:Buffers");
push(@tmp, "AREA:m_macti#E29136:Active");
push(@tmp, "AREA:m_minac#448844:Inactive");
push(@tmp, "AREA:m_mused_i#EE4444:Used");
push(@tmp, "LINE2:m_mused_i#EE0000");
push(@tmp, "LINE2:m_minac#008800");
push(@tmp, "LINE2:m_macti#E29136");
push(@tmp, "LINE2:m_mbuff#888888");
push(@tmp, "LINE2:m_mcach#00EE00");
} else {
push(@tmp, "AREA:m_mused#EE4444:Used");
push(@tmp, "AREA:m_mcach#44EE44:Cached");
push(@tmp, "AREA:m_mbuff#CCCCCC:Buffers");
push(@tmp, "AREA:m_macti#E29136:Active");
push(@tmp, "AREA:m_minac#448844:Inactive");
push(@tmp, "LINE2:m_minac#008800");
push(@tmp, "LINE2:m_macti#E29136");
push(@tmp, "LINE2:m_mbuff#888888");
push(@tmp, "LINE2:m_mcach#00EE00");
push(@tmp, "LINE2:m_mused#EE0000");
}
} elsif($config->{os} eq "OpenBSD" || $config->{os} eq "NetBSD") {
push(@tmp, "AREA:m_mused#EE4444:Used");
push(@tmp, "AREA:m_macti#44EE44:Active");
@ -707,6 +720,7 @@ sub system_cgi {
"CDEF:m_mbuff=mbuff,1024,*",
"CDEF:m_mcach=mcach,1024,*",
"CDEF:m_mused=m_mtotl,mfree,1024,*,-",
"CDEF:m_mused_i=m_mtotl,mfree,1024,*,-,m_mbuff,-,m_mcach,-",
"CDEF:m_macti=macti,1024,*",
"CDEF:m_minac=minac,1024,*",
"CDEF:allvalues=mtotl,mbuff,mcach,mfree,macti,minac,+,+,+,+,+",
@ -742,6 +756,7 @@ sub system_cgi {
"CDEF:m_mbuff=mbuff,1024,*",
"CDEF:m_mcach=mcach,1024,*",
"CDEF:m_mused=m_mtotl,mfree,1024,*,-",
"CDEF:m_mused_i=m_mtotl,mfree,1024,*,-,m_mbuff,-,m_mcach,-",
"CDEF:m_macti=macti,1024,*",
"CDEF:m_minac=minac,1024,*",
"CDEF:allvalues=mtotl,mbuff,mcach,mfree,macti,minac,+,+,+,+,+",

View File

@ -124,6 +124,7 @@ secure_log_date_format = %b %e
# SYSTEM graph
# -----------------------------------------------------------------------------
<system>
graph_mode = real
<alerts>
loadavg_enabled = n
loadavg_timeintvl = 3600