os count
list Michael Nemeth
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 '$'.$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};
}
list Paul Root
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 [mailto:user-609d3fab5b2d@xymon.invalid] Sent: Thursday, November 20, 2008 7:11 AM
To: user-ae9b8668bcde@xymon.invalid
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 '$'.$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};
}
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.
list Michael Nemeth
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: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 [mailto:user-609d3fab5b2d@xymon.invalid] Sent: Thursday, November 20, 2008 7:11 AM
To: user-ae9b8668bcde@xymon.invalid
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 '$'.$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};
}
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.
list Vernon Everett
Hi I posted a script earlier this week, which can help you with this problem. http://www.hswn.dk/hobbiton/2008/11/msg00400.html 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 [mailto:user-609d3fab5b2d@xymon.invalid]
Sent: Friday, 21 November 2008 12:06 AM
To: user-ae9b8668bcde@xymon.invalid
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: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 [mailto:user-609d3fab5b2d@xymon.invalid]
Sent: Thursday, November 20, 2008 7:11 AM
To: user-ae9b8668bcde@xymon.invalid
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 '$'.$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}; }
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.
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.
list Padraig Lennon
This does not catch Windows servers though.. Either does the script below.. Padraig Lennon Senior Systems Engineer Production Services Pioneer Global Investments (Dublin) 5th Floor Georges Quay Plaza, Dublin 2 ext: XXXX Direct dial: 00353 1 480 2081
▸
-----Original Message-----
From: michael nemeth [mailto:user-609d3fab5b2d@xymon.invalid] Sent: 20 November 2008 15:06
To: user-ae9b8668bcde@xymon.invalid
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: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 [mailto:user-609d3fab5b2d@xymon.invalid] Sent: Thursday, November 20, 2008 7:11 AM
To: user-ae9b8668bcde@xymon.invalid
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 '$'.$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};
}
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.
-------------- next part -------------- "The information in this e-mail and in any attachments is confidential and intended solely for the attention and use of the named addressee(s). This information may be subject to legal, professional or other privilege and further distribution of it is strictly prohibited without our authority. If you are not the intended recipient, you are not authorised to and must not disclose, copy, distribute, or retain this message or any part of it, and should notify us immediately. This footnote also confirms that this email has been automatically scanned for the presence of computer viruses, profanities and certain file types." Pioneer Investment Management Limited. 1 George’s Quay Plaza, George’s Quay, Dublin 2, Ireland. Registered in Ireland no. 287793.
list T.J. Yang
Date: Thu, 20 Nov 2008 16:40:45 +0100> From: user-7738cfcc6ae0@xymon.invalid> To: user-ae9b8668bcde@xymon.invalid> Subject: RE: [hobbit] os count> > This does not catch Windows servers though..> Either does the script below..
The problem is on bbwin side, bbwin need to provide equvilant of "uname -a" like all other Unix xymon client do.
tj> > > > Padraig Lennon> Senior Systems Engineer> Production Services> Pioneer Global Investments (Dublin)> 5th Floor Georges Quay Plaza, Dublin 2> ext: XXXX> Direct dial: 00353 1 480 2081> > -----Original Message-----> From: michael nemeth [mailto:user-609d3fab5b2d@xymon.invalid] > Sent: 20 November 2008 15:06> To: user-ae9b8668bcde@xymon.invalid> 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:> > 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 [mailto:user-609d3fab5b2d@xymon.invalid] > > Sent: Thursday, November 20, 2008 7:11 AM> > To: user-ae9b8668bcde@xymon.invalid> > 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 '$> > > '.$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};> > }> >> >> > >> >> >> > 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.> >> > >> >> >> > > > > > >
Proud to be a PC? Show the world. Download the “I’m a PC” Messenger themepack now.
ht http://clk.atdmt.com/MRT/go/119642558/direct/01/
list Ralph Mitchell
Isn't that reported by the client as part of the big local checkout
message. If you click through one of the cpu, disk, memory or procs dots,
then click through the "client data available" link near the bottom of the
page, you'll see the report. It'll start something like this:
client servername.linux linux
[date]
Thu Nov 20 09:53:28 CST 2008
[uname]
Linux servername 2.6.22-gentoo-r4 sparc64
[osversion]
Gentoo Base System release 1.12.11.1
[uptime]
09:53:28 up 14 days, 20:40, 0 users, load average: 0.00, 0.00, 0.00
Ralph Mitchell
▸
On Thu, Nov 20, 2008 at 9:06 AM, michael nemeth <user-609d3fab5b2d@xymon.invalid>wrote:
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: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 [mailto:user-609d3fab5b2d@xymon.invalid] Sent: Thursday, November 20, 2008 7:11 AM To: user-ae9b8668bcde@xymon.invalid 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 '$'.$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}; } 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.
list Ulric Eriksson
The hobbitdboard method only works for the list of operating systems that is hardcoded in the big switch in hobbitd_client.c. We use a script that includes a bunch of heuristics to figure out what everything is and what client is used. It works some of the time. ;) I can post it if there is interest. Ulric
list Michael Nemeth
Id say post it! You too Paul, post yours. I think I can create graphs but would that not be fairly level graph?
▸
Ulric Eriksson wrote:The hobbitdboard method only works for the list of operating systems that is hardcoded in the big switch in hobbitd_client.c. We use a script that includes a bunch of heuristics to figure out what everything is and what client is used. It works some of the time. ;) I can post it if there is interest. Ulric
list Martin Flemming
Nice.. .. for me, it will be welcome :-) thanks & cheers martin
▸
On Thu, 20 Nov 2008, Ulric Eriksson wrote:
The hobbitdboard method only works for the list of operating systems that is hardcoded in the big switch in hobbitd_client.c. We use a script that includes a bunch of heuristics to figure out what everything is and what client is used. It works some of the time. ;) I can post it if there is interest. Ulric
list Michael Nemeth
I sort got it to work; but it seam very dependent on you environment egrep is xpg4 version of grep. Also did not parse bb-host correctly ; needs to ignore LOTS more , title, subparent ... . I've fairl complex set up. Also there some place its not passing a hostname for me.
▸
Everett, Vernon wrote:Hi I posted a script earlier this week, which can help you with this problem. http://www.hswn.dk/hobbiton/2008/11/msg00400.html 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 [mailto:user-609d3fab5b2d@xymon.invalid] Sent: Friday, 21 November 2008 12:06 AM To: user-ae9b8668bcde@xymon.invalid 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: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 [mailto:user-609d3fab5b2d@xymon.invalid] Sent: Thursday, November 20, 2008 7:11 AM To: user-ae9b8668bcde@xymon.invalid 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 '$'.$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}; } 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.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.
list Vernon Everett
That's why we use open source, so you have the code, and can modify it to suite your own needs. :-)
If it's a useful starting point, great.
If you make it better, please let me know what you have done to improve it.
I am sure there are many on the list who could use an improved version.
As a caveat, I said it works in our environment, but your mileage may vary. :-)
Regards
Vernon
▸
From: michael nemeth [mailto:user-609d3fab5b2d@xymon.invalid] Sent: Friday, 21 November 2008 9:18 PM To: user-ae9b8668bcde@xymon.invalid Subject: Re: [hobbit] os count I sort got it to work; but it seam very dependent on you environment egrep is xpg4 version of grep. Also did not parse bb-host correctly ; needs to ignore LOTS more , title, subparent ... . I've fairl complex set up. Also there some place its not passing a hostname for me. Everett, Vernon wrote: Hi I posted a script earlier this week, which can help you with this problem. http://www.hswn.dk/hobbiton/2008/11/msg00400.html 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 [mailto:user-609d3fab5b2d@xymon.invalid] Sent: Friday, 21 November 2008 12:06 AM To: user-ae9b8668bcde@xymon.invalid<mailto:user-ae9b8668bcde@xymon.invalid> 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: 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 [mailto:user-609d3fab5b2d@xymon.invalid] Sent: Thursday, November 20, 2008 7:11 AM To: user-ae9b8668bcde@xymon.invalid<mailto:user-ae9b8668bcde@xymon.invalid> 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 '$ '.$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}; } 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. 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. 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.
list Michael Nemeth
Yes I was thinking of repost in with changes . FINALY got it to work 100% right! Two problems (besides filtering of thing like title, subparent) one my fault my cd was aliased, so when I cd it echoed the highlight pwd. And it had a problem on a line where # was not at the begin # To do: set up file directory paths to be variables ie BBhosts= $BBHOME/etc/bb-hosts custom= /hobit/custom
▸
Everett, Vernon wrote:That's why we use open source, so you have the code, and can modify it to suite your own needs. :-) If it's a useful starting point, great. If you make it better, please let me know what you have done to improve it. I am sure there are many on the list who could use an improved version. As a caveat, I said it works in our environment, but your mileage may vary. :-) Regards Vernon *From:* michael nemeth [mailto:user-609d3fab5b2d@xymon.invalid] *Sent:* Friday, 21 November 2008 9:18 PM *To:* user-ae9b8668bcde@xymon.invalid *Subject:* Re: [hobbit] os count I sort got it to work; but it seam very dependent on you environment egrep is xpg4 version of grep. Also did not parse bb-host correctly ; needs to ignore LOTS more , title, subparent ... . I've fairl complex set up. Also there some place its not passing a hostname for me. Everett, Vernon wrote:Hi I posted a script earlier this week, which can help you with this problem. http://www.hswn.dk/hobbiton/2008/11/msg00400.html 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 [mailto:user-609d3fab5b2d@xymon.invalid] Sent: Friday, 21 November 2008 12:06 AM To: user-ae9b8668bcde@xymon.invalid 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: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 [mailto:user-609d3fab5b2d@xymon.invalid] Sent: Thursday, November 20, 2008 7:11 AM To: user-ae9b8668bcde@xymon.invalid 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 '$'.$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}; } 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.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.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.
list Michael Nemeth
I completed another oscount script this time using wget to get the info page Both this one and the hobbitdboard one return the same total so maybe there are 50 more you are missing. Ill post new script on Monday.
▸
Root, Paul wrote: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 [mailto:user-609d3fab5b2d@xymon.invalid] Sent: Thursday, November 20, 2008 7:11 AM
To: user-ae9b8668bcde@xymon.invalid
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 '$'.$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};
}
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.
list Paul Root
Well, wc on non-comment, non-page, non-titled, etc lines in bb-hosts, agrees with my count. Paul Root IM/MNS Infrastructure
▸
-----Original Message-----
From: michael nemeth [mailto:user-609d3fab5b2d@xymon.invalid]
Sent: Friday, November 21, 2008 9:59 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] os count
I completed another oscount script this time using wget to get the info
page
Both this one and the hobbitdboard one
return the same total so maybe there are 50 more you are missing.
Ill post new script on Monday.
Root, Paul wrote: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 [mailto:user-609d3fab5b2d@xymon.invalid]
Sent: Thursday, November 20, 2008 7:11 AM
To: user-ae9b8668bcde@xymon.invalid
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 '$'.$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};
}
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.
list Michael Nemeth
Well what I don't understand is how hobbitdboard one can return more that you count. Try the new one when I post it ; in only counts system with OS: on the info page. It may just be a fluke that they are the same on my system.
▸
Root, Paul wrote:Well, wc on non-comment, non-page, non-titled, etc lines in bb-hosts, agrees with my count. Paul Root IM/MNS Infrastructure -----Original Message----- From: michael nemeth [mailto:user-609d3fab5b2d@xymon.invalid] Sent: Friday, November 21, 2008 9:59 AM To: user-ae9b8668bcde@xymon.invalid Subject: Re: [hobbit] os count I completed another oscount script this time using wget to get the info page Both this one and the hobbitdboard one return the same total so maybe there are 50 more you are missing. Ill post new script on Monday. Root, Paul wrote:I wrote a script that does a similar thing. It connects to eachmachineand 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 thanIthink 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 [mailto:user-609d3fab5b2d@xymon.invalid] Sent: Thursday, November 20, 2008 7:11 AM To: user-ae9b8668bcde@xymon.invalid Subject: [hobbit] os count Did did a little perl program that does an os count produces countlikehp-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 '$'.$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 'hobbitdboardfields=BBH_OStest=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}; } This communication is the property of Qwest and may containconfidential orprivileged information. Unauthorized use of this communication isstrictlyprohibited and may be unlawful. If you have received thiscommunicationin error, please immediately notify the sender by reply e-mail anddestroyall copies of the communication and any attachments.