<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Yes I was thinking of repost in with changes .<br>
FINALY got it to work 100% right!  <br>
Two problems (besides filtering of thing like title, subparent)  one my
fault my cd was aliased,  so when I<br>
cd it echoed the highlight pwd. And it had a problem on a line where # 
was not at the begin<br>
  #<br>
To do: set up file directory paths to be variables ie BBhosts=
$BBHOME/etc/bb-hosts custom= /hobit/custom<br>
<br>
<br>
Everett, Vernon wrote:
<blockquote
 cite="mid:A3D12FAD74FC8B46991703F40C182BABAB077651@permls102.wde.woodside.com.au"
 type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta content="MSHTML 6.00.2900.3314" name="GENERATOR">
  <div dir="ltr" align="left"><span class="345212312-21112008"><font
 color="#0000ff" face="Arial" size="2">That's why we use open source,
so you have the code, and can modify it to suite your own needs. :-)</font></span></div>
  <div dir="ltr" align="left"><span class="345212312-21112008"></span> </div>
  <div dir="ltr" align="left"><span class="345212312-21112008"><font
 color="#0000ff" face="Arial" size="2">If it's a useful starting point,
great.</font></span></div>
  <div dir="ltr" align="left"><span class="345212312-21112008"><font
 color="#0000ff" face="Arial" size="2">If you make it better, please
let me know what you have done to improve it.</font></span></div>
  <div dir="ltr" align="left"><span class="345212312-21112008"><font
 color="#0000ff" face="Arial" size="2">I am sure there are many on the
list who could use an improved version.</font></span></div>
  <div dir="ltr" align="left"><span class="345212312-21112008"></span> </div>
  <div dir="ltr" align="left"><span class="345212312-21112008"><font
 color="#0000ff" face="Arial" size="2">As a caveat, I said it works in
our environment, but your mileage may vary. :-)</font></span></div>
  <div dir="ltr" align="left"><span class="345212312-21112008"></span> </div>
  <div dir="ltr" align="left"><span class="345212312-21112008"><font
 color="#0000ff" face="Arial" size="2">Regards</font></span></div>
  <div dir="ltr" align="left"><span class="345212312-21112008"><font
 color="#0000ff" face="Arial" size="2">     Vernon</font></span></div>
  <br>
  <div class="OutlookMessageHeader" dir="ltr" align="left" lang="en-us">
  <hr tabindex="-1"><font face="Tahoma" size="2"><b>From:</b> michael
nemeth [<a class="moz-txt-link-freetext" href="mailto:michael.nemeth@lmco.com">mailto:michael.nemeth@lmco.com</a>] <br>
  <b>Sent:</b> Friday, 21 November 2008 9:18 PM<br>
  <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:hobbit@hswn.dk">hobbit@hswn.dk</a><br>
  <b>Subject:</b> Re: [hobbit] os count<br>
  </font><br>
  </div>
I sort got it to work; but it seam very dependent on you environment
egrep is xpg4 version of grep. Also did not<br>
parse bb-host correctly ; needs to ignore LOTS more , title, subparent
... . I've fairl complex set up.<br>
Also there some place its not passing a hostname  for me.<br>
  <br>
Everett, Vernon wrote:
  <blockquote
 cite="mid:A3D12FAD74FC8B46991703F40C182BABA8D8A1C3@permls102.wde.woodside.com.au"
 type="cite">
    <pre wrap="">Hi

I posted a script earlier this week, which can help you with this problem.
<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.hswn.dk/hobbiton/2008/11/msg00400.html">http://www.hswn.dk/hobbiton/2008/11/msg00400.html</a>
Might need to pipe the output to get exactly what you want, but it will get basic Os versions, and with a little massaging, it will give you what you want.

Cheers
     V


-----Original Message-----
From: michael nemeth [<a moz-do-not-send="true"
 class="moz-txt-link-freetext" href="mailto:michael.nemeth@lmco.com">mailto:michael.nemeth@lmco.com</a>]
Sent: Friday, 21 November 2008 12:06 AM
To: <a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:hobbit@hswn.dk">hobbit@hswn.dk</a>
Subject: Re: [hobbit] os count

Henrik suggest this awhile ago:
$BBHOME/server/bin/bb 127.0.0.1 'hobbitdboard fields=BBH_OS test=info'

So I'm not sure were hobbit gets the  BBH_OS Root, Paul wrote:
  </pre>
    <blockquote type="cite">
      <pre wrap="">I wrote a script that does a similar thing. It connects to each
machine and does a uname.
Being Solaris centric, I split it up by solaris version (and zone).

I ran your script on my server, and it gives me 50 more machines than
I think I have.
It certainly doesn't add up to the entries in the bb-hosts file.

I print out a chart of each machine's level then sum it up like this:

Host Count:
    noconn : 29
      zone : 57
       5.7 : 2
       5.8 : 2
       5.9 : 11
      5.10 : 32
     nossh : 44
     Linux : 7
     TOTAL : 184


I haven't had time, but I need/want to graph this.



Paul Root
Lead Internet Systems Eng
Network Services


-----Original Message-----
From: michael nemeth [<a moz-do-not-send="true"
 class="moz-txt-link-freetext" href="mailto:michael.nemeth@lmco.com">mailto:michael.nemeth@lmco.com</a>]
Sent: Thursday, November 20, 2008 7:11 AM
To: <a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:hobbit@hswn.dk">hobbit@hswn.dk</a>
Subject: [hobbit] os count

Did did a little perl program that does an os count produces count like
hp-ux   3
linux      1
sunos    38.

Run as a stand alone did not see the need to run out of hobbit.
But Henrik wouldn't this be easy enough to add in to bbtest?
Here it is:

#!/usr/local/bin/perl
eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}'
    if $running_under_some_shell;
                        # this emulates #! processing on NIH machines.
                        # (remove #! line above if indigestible)

eval '$
    </pre>
    </blockquote>
    <pre wrap=""><!---->
  </pre>
    <blockquote type="cite">
      <pre wrap="">'.$1.'$2;' while $ARGV[0] =~ /^([A-Za-z_0-9]+=)(.*)/ && shift;
                        # process any FOO=bar switches

$[ = 1;                 # set array base to 1
$BBHOME="/home/mnemeth/sunhobbit/";
open (HOB, "$BBHOME/server/bin/bb 127.0.0.1 'hobbitdboard
fields=BBH_OS test=info' |") ;

while (<HOB>) {
    chomp;      # strip record separator
    @Fld = split(' ', $_, -1);

    for ($i = 1; $i <= $#Fld; $i++) {
        $freq{$Fld[$i]}++;
    }
}

foreach $word (sort keys %freq) {
    printf "%s\t%d\n", $word, $freq{$word}; }


To unsubscribe from the hobbit list, send an e-mail to
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:hobbit-unsubscribe@hswn.dk">hobbit-unsubscribe@hswn.dk</a>



This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly
prohibited and may be unlawful.  If you have received this communication
in error, please immediately notify the sender by reply e-mail and destroy
all copies of the communication and any attachments.

To unsubscribe from the hobbit list, send an e-mail to
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:hobbit-unsubscribe@hswn.dk">hobbit-unsubscribe@hswn.dk</a>




    </pre>
    </blockquote>
    <pre wrap=""><!---->

To unsubscribe from the hobbit list, send an e-mail to
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:hobbit-unsubscribe@hswn.dk">hobbit-unsubscribe@hswn.dk</a>



NOTICE: This email and any attachments are confidential. 
They may contain legally privileged information or 
copyright material. You must not read, copy, use or 
disclose them without authorisation. If you are not an 
intended recipient, please contact us at once by return 
email and then delete both messages and all attachments.


To unsubscribe from the hobbit list, send an e-mail to
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:hobbit-unsubscribe@hswn.dk">hobbit-unsubscribe@hswn.dk</a>



  </pre>
  </blockquote>
  <br>
  <pre>NOTICE: This email and any attachments are confidential. 
They may contain legally privileged information or 
copyright material. You must not read, copy, use or 
disclose them without authorisation. If you are not an 
intended recipient, please contact us at once by return 
email and then delete both messages and all attachments.
  </pre>
</blockquote>
<br>
</body>
</html>