That'll probably work too.....provided you are only running Windows servers.<br>For Solaris, you need to use section=uname<br>Not sure for anything else.<br><br>By using wget, you are essentially retrieving the "info" page.<br>
Doesn't matter what OS you are running, you should find the version and some details next to the string "OS:"<br>You might still need a little bit of creative massaging to get what you want into a comparable format, but the basics are there.<br>
It has worked for me in the past. <br>YMMV.<br><br>Regards<br>     Vernon<br><br><br><br><div class="gmail_quote">On Tue, Sep 21, 2010 at 12:26 AM, Patrick Nixon <span dir="ltr"><<a href="mailto:pnixon@gmail.com">pnixon@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">How does a wget call compare to using the bb command?<br><br>I replaced the wget with:<br>    $BBHOME/server/bin/bb localhost "clientlog $HOSTNAME section=osversion" | grep -v osversion > $HOSTNAME<br>
<br>and the OSVER with:<br>
   OSVER=$(sed -e :a -e 's/<[^>]*>//g;/</N;//ba' $HOSTNAME)<div><div></div><div class="h5"><br><br><br><br><div class="gmail_quote">On Mon, Sep 20, 2010 at 9:33 AM, Vernon Everett <span dir="ltr"><<a href="mailto:everett.vernon@gmail.com" target="_blank">everett.vernon@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Bugger!<br>Was pretty busy today, and completely forgot.<br><br>Here's something that will help.<br>

<span style="font-family: courier new,monospace;">#!/bin/ksh</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">export BBHOME=/usr/lib/hobbit</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">typeset -L20 HOST</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">mkdir -p /usr/lib/hobbit/custom/data</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">cd /usr/lib/hobbit/custom/data</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">INCLUDES=$(grep ^include /etc/hobbit/bb-hosts | awk '{ print $2 }')</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">cat /etc/hobbit/bb-hosts $INCLUDES | egrep -h -v "^#|^page|^$|^title|^subpage|^group|^include" | awk '{ print $2 }' \</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">   | sort | uniq \</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">   | while read HOSTNAME</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">     do</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">        wget -O $HOSTNAME -o /dev/null <a href="http://hobbit/hobbit-cgi/bb-hostsvc.sh%5C?HOST%5C=$HOSTNAME%5C&SERVICE%5C=info" target="_blank">http://hobbit/hobbit-cgi/bb-hostsvc.sh\?HOST\=$HOSTNAME\&SERVICE\=info</a> &</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">     done</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">wait</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">for HOSTNAME in /usr/lib/hobbit/custom/data/*</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">do</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">   OSVER=$(grep OS: $HOSTNAME | sed 's/OS://g'| sed -e :a -e 's/<[^>]*>//g;/</N;//ba')</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">   HOST=$(basename $HOSTNAME)</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">   echo "$HOST    $OSVER"</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">done</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">rm /usr/lib/hobbit/custom/data/*</span><br><br>This will generate a list of hosts, and OS version.<br>You want a list of number of OS versions, pipe the output to <span style="font-family: courier new,monospace;">awk '{ print $2 }' | sort | uniq -c | awk '{ print $2":"$1}</span><br>


You can feed this back to Hobbit using bb, as a test and graph it.<br><br>I recommend you use stack graphs for more interesting looking graphs.<br><br>Let me know how you go.<br><br>Regards<br><font color="#888888">     Vernon</font><div>

<div></div><div><br><br><br><br><div class="gmail_quote">
On Mon, Sep 20, 2010 at 8:25 PM, Martin Flemming <span dir="ltr"><<a href="mailto:martin.flemming@desy.de" target="_blank">martin.flemming@desy.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


<div><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Got some code stubs I can post later when I get to work.<br>
</blockquote>
<br></div>
That's will be great :-)<br>
<br>
thanks & cheers,<br><font color="#888888">
<br>
   martin</font><div><div></div><div><br>
<br>
On Mon, 20 Sep 2010, Vernon Everett wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Easy enough to knock together.<br>
Read it out of the server, then feed it back.<br>
<br>
Got some code stubs I can post later when I get to work.<br>
<br>
Cheers<br>
   V<br>
<br>
<br>
On Sun, Sep 19, 2010 at 1:47 AM, Martin Flemming <<a href="mailto:martin.flemming@desy.de" target="_blank">martin.flemming@desy.de</a>> wrote:<br>
<br>
      Hi !<br>
<br>
      Got somebody an working script for counting OS of alle clients<br>
      ( RHEl3/4/5 Solaris .5.8/5.19./5.10 etc ..) with graphing .. ?<br>
<br>
      I know some old threads about that request,<br>
      But hey didn't really work for me are without graphs .. :-(<br>
<br>
      thanks & cheers,<br>
<br>
<br>
            Martin<br>
<br>
<br>
      To unsubscribe from the xymon list, send an e-mail to<br>
      <a href="mailto:xymon-unsubscribe@xymon.com" target="_blank">xymon-unsubscribe@xymon.com</a><br>
<br>
</blockquote>
</div></div><br>To unsubscribe from the xymon list, send an e-mail to<br>
<a href="mailto:xymon-unsubscribe@xymon.com" target="_blank">xymon-unsubscribe@xymon.com</a><br>
<br></blockquote></div><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>