<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 29 January 2015 at 06:29, J.C. Cleaver <span dir="ltr"><<a href="mailto:cleaver@terabithia.org" target="_blank">cleaver@terabithia.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">All of those values are collected as the raw output from various unix<br>
shell commands.<br></blockquote><div><br></div><div>Yep, exactly as JC said.  To illustrate a little bit more, you should have a look at the xymonclient-linux.sh (or any of the other OS-specific versions of the same).  At around line 80 is the code for "free" to show free memory, which looks like this:</div><div><br></div><div>echo "[free]"</div><div>free</div><div><br></div><div>The output for this is something like:</div><div><br></div><div>[free]</div><div><div>             total       used       free     shared    buffers     cached</div><div>Mem:       6103900    5495904     607996          0     655316    4156752</div><div>-/+ buffers/cache:     683836    5420064</div><div>Swap:      6291448         88    6291360</div></div><div><br></div><div>So this text, and all of the others that are generated by xymonclient-linux.sh, are sent as a client message to the Xymon server.  Have a look at an example client message on the demon website at <a href="http://xymon.org/xymon-cgi/svcstatus.sh?CLIENT=felix.hswn.dk">http://xymon.org/xymon-cgi/svcstatus.sh?CLIENT=felix.hswn.dk</a>.  You'll see a [free] section that looks pretty much like I showed above.</div><div><br></div><div>In fact, if you run xymonclient-linux.sh on a client installation, it will send the client message to your screen.</div><div><br></div><div>If a new OS came along, anyone could create their own xymonclient-newos.sh script and have it run all of the appropriate commands (df, free, ifconfig) to generate the same text elements as all of the other OS-specific client scripts.</div><div><br></div><div>Then, on the Xymon server side, different bits of the client message processing code will parse the client message for different sections.  The bit that looks for free memory will look for the [free] section for a Linux, AIX or SCO server, or the [meminfo] section for a BSD-type server, or [memory] section for a Solaris, HPUX or Windows server.  In most cases, the same section is used for all OSes, but in some cases, there are significant differences between OS flavours, and so different code needs to parse them differently.  But the important thing is that the client message contains the output of the "df", "top", "vmstat" or whatever commands, labeled by [sections], and sent to the server for parsing.</div><div><br></div><div>Cheers</div><div>Jeremy</div><div><br></div></div></div></div>