Hi,
What I would like to do is construct a CDEF that adds some of the data sources together to produce an addition DS, while ignoring others. RPN makes me want to cry. To further illustrate:
I have the follwing graph item data sources:
ucd/net - Memory - Free (.1.3.6.1.4.1.2021.4.11.0 or memTotalFree.0)
ucd/net - Memory - Buffers (.1.3.6.1.4.1.2021.4.14.0 or memBuffer.0)
ucd/net - Memory - Cache (.1.3.6.1.4.1.2021.4.15.0 or memCached.0)
... add these together to result in another source. Tried the "Total All Data Sources" CDEF preset, but it also added the other data sources in this graph, which include,
memTotalReal.0,
memAvailSwap.0
... and resulted in a graph item that was enormous and innacurate. Is this methodology even correct? Does someone know of another MIB object that will report RAM that is -actually- available to processes?
Thanks!
Help writing CDEF for Linux memory graphing...
Moderators: Developers, Moderators
Yeah,
I disected a CDEF line that cacti generated and came up with something that works. The pertinent parts:
CDEF:cdef_cache=a,1024,* \
CDEF:cdef_totphys=b,1024,* \
CDEF:cdef_free=c,1024,* \
CDEF:cdef_buffers=d,1024,* \
CDEF:cdef_tot=TIME,1128021910,GT,cdef_cache,cdef_cache,UN,0,cdef_cache,IF,IF,TIME,1128021910,GT,cdef_free,cdef_free,UN,0,cdef_free,IF,IF,TIME,1128021910,GT,cdef_buffers,cdef_buffers,UN,0,cdef_buffers,IF,IF,+,+ \
LINE1:cdef_totphys#000000:"Total Physical Mem\n" \
AREA:cdef_tot#CCCCFF:"Available Mem\n" \
LINE1:cdef_cache#FF0000:"Cache\n" \
LINE1:cdef_buffers#FF00ED:"Buffers\n" \
LINE1:cdef_free#3300ED:"Free\n"
Still, i'm guessing this is not the easiest way to do this, and I would rather just graph the memFree object, but it is meaningless. Now all I have to do is figure out how to get this into cacti...
DW
I disected a CDEF line that cacti generated and came up with something that works. The pertinent parts:
CDEF:cdef_cache=a,1024,* \
CDEF:cdef_totphys=b,1024,* \
CDEF:cdef_free=c,1024,* \
CDEF:cdef_buffers=d,1024,* \
CDEF:cdef_tot=TIME,1128021910,GT,cdef_cache,cdef_cache,UN,0,cdef_cache,IF,IF,TIME,1128021910,GT,cdef_free,cdef_free,UN,0,cdef_free,IF,IF,TIME,1128021910,GT,cdef_buffers,cdef_buffers,UN,0,cdef_buffers,IF,IF,+,+ \
LINE1:cdef_totphys#000000:"Total Physical Mem\n" \
AREA:cdef_tot#CCCCFF:"Available Mem\n" \
LINE1:cdef_cache#FF0000:"Cache\n" \
LINE1:cdef_buffers#FF00ED:"Buffers\n" \
LINE1:cdef_free#3300ED:"Free\n"
Still, i'm guessing this is not the easiest way to do this, and I would rather just graph the memFree object, but it is meaningless. Now all I have to do is figure out how to get this into cacti...
DW
I'm realizing that despite being able to do this on the command line, I don't have a clue as to how to set up the above as a reusable cacti CDEF.
Can someone decipher the above CDEF statement? (not the multiply by 1024 ones...), or better yet, offer some assistance as to how to input this into cacti?
Thank you very much,
DW
Can someone decipher the above CDEF statement? (not the multiply by 1024 ones...), or better yet, offer some assistance as to how to input this into cacti?
Thank you very much,
DW
Who is online
Users browsing this forum: No registered users and 0 guests