[Dxspider-support] MRTG number of users graph

Simon Ravnic simon at hamradio.si
Sat Jun 15 09:26:25 BST 2002


While ago I was asking about how to create a live graph of number of users
connected to a DXSpider node. Recently I succeeded and I'm sharing the
results. You can see it at http://s50dxs.ods.org/mrtg/s50dxs.html.

I won't get into how to install MRTG tool (available at
http://people.ee.ethz.ch/~oetiker/webtools/mrtg/). In your mrtg config file
you have to add something like this:

Target[s50dxs]: `ps aux | grep client | wc | gawk '{print $1 -2}'`
MaxBytes[s50dxs]: 100
Options[s50dxs]: gauge, nopercent
WithPeak[s50dxs]: ymwd
YLegend[s50dxs]: Number of users
ShortLegend[s50dxs]: users
Title[s50dxs]: Number of users at S50DXS -- s50dxs.ods.org
PageTop[s50dxs]: <H1>Number of users at S50DXS -- s50dxs.ods.org</H1>
   <TR><TD>System:</TD>     <TD>s50dxs.ods.org</TD></TR>
   <TR><TD>Maintainer:</TD> <TD>simon at hamradio.si/TD></TR>
   <TR><TD>ifType:</TD>     <TD>DXSpider cluster</TD></TR>

What is important is the command ps aux | grep client | wc | gawk '{print
$1 -1}'. It counts the number of client processes and prints out a single
number. With this method I try to guess the actual number of users. -1 is
there because the script also counts in the "grep client" and this reduces
the number by one.

If you do any further development on the subject please share results with
me or this mailing list.

Simon, S53ZO
S50DXS sysop

Simon Ravnic, simon at hamradio.si

"The opinions expressed in this email are strictly those of the author
 but he is a very good fellow so you can trust what he says."

More information about the Dxspider-support mailing list