Xymon Mailing List Archive search

External Client scripts and MACHINE environment

3 messages in this thread

list Asif Iqbal · Thu, 17 Nov 2005 19:45:24 -0500 ·
Hi All

I just started using bb-cpu2[1] on ~hobbit/client/ext of version 4.1.2.
I am noticing it $MACHINE has no value inside the script while I run a
test like this
	./bin/bbcmd sh -x ~hobbit/client/ext/bb-cpu2.sh

Here is a google cache of the bb-cpu2 on deadcat.net since the site
seems kind a slow now.
	http://66.102.7.104/search?q=cache:6p53UoHzUEcJ:www.deadcat.net/BB/ext/cpu2+cpu+site:deadcat.net&hl=en

I checked all the emails upto Oct 5th and don't think saw a good answer
to this problem.

I hate to declare the value of MACHINE inside the script. Any suggestion
would be greatly appreciated.

Thanks

-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
"..there are two kinds of people: those who work and those who take the credit...try
 to be in the first group;...less competition there."  - Indira Gandhi
list Henrik Størner · Fri, 18 Nov 2005 07:57:07 +0100 ·
quoted from Asif Iqbal
On Thu, Nov 17, 2005 at 07:45:24PM -0500, Asif Iqbal wrote:
I just started using bb-cpu2[1] on ~hobbit/client/ext of version 4.1.2.
I am noticing it $MACHINE has no value inside the script while I run a
test like this
	./bin/bbcmd sh -x ~hobbit/client/ext/bb-cpu2.sh
It *is* set when you run the script as a client extension, because 
$MACHINE is set by the "runclient.sh" script that starts up the client.
It sets these: MACHINE MACHINEDOTS BBOSTYPE HOBBITCLIENTHOME

But it would be nice if you could test client scripts just with bbcmd.
I'll see if I can make bbcmd pick up default settings for the
MACHINE, MACHINEDOTS and BBOSTYPE settings. Meanwhile, you can test
your script with

HOBBITCLIENTHOME=`pwd` \
MACHINEDOTS=my.local.hostname \
MACHINE=my,local,hostname \
BBOSTYPE=linux \
./bin/bbcmd --env=/usr/lib/hobbit/client/etc/hobbitclient.cfg \
-x ~hobbit/client/ext/bb-cpu2.sh


Henrik
list Richard Deal · Fri, 18 Nov 2005 08:45:33 -0500 ·
I don't have a problem with $MACHINE being set but I do set other
variables to get the list of ext's working in
client/etc/hobbitclient.cfg.  Here is my list, maybe it will be of some
help to you or others:

#
#from prtdiag script
#
UNAME="/sbin/uname"
#PLATFORM_SPEC=`${UNAME} -i`
#PRTDIAG_COMMAND="/usr/platform/${PLATFORM_SPEC}/sbin/prtdiag"
#    can't seem to use `` to set variables in hobbitclient.cfg so set
these 
#    in the script itself.
PRTDIAG_OPT="-v"
ZONENAME=/usr/bin/zonename
#Systems that don't support temperature checks
EXCLUDE_SYSTEMS="Ultra-1 Ultra-2 Ultra-5_10 Ultra-30 Ultra-60 Ultra-80
UltraAX-i2 UltraSPARC-IIi-cEngine Sun-Fire Netra-T4 UltraAX-e2
Ultra-Enterprise-10000"
PRTDIAG_IGNORE_ERRORS="No failures|Most recent AC Power Failure|Minimum
Available|CS Fail|No Hardware failures|^===|currently no Boards|Fault
Fan"
PRTDIAG_IGNORE_FAULTS="No Recent System Faults found|No System Faults
found|Fault Value|Fault LED|NO_FAULT|Power  Fault|Status
Fault|Fault           off"
LOM_COMMAND="/usr/sbin/lom"
LOM_OPT="-pfvt"
#
# from meta script
#
MDBIN="/usr/sbin"
METADB=${MDBIN}/metadb
METAHS=${MDBIN}/metahs
METASTAT=${MDBIN}/metastat
METASET=${MDBIN}/metaset
#
# for bb-cpu2
#
SWAP="/usr/sbin/swap"
PSRINFO="/usr/sbin/psrinfo"
MPSTAT="/usr/bin/mpstat"
#
# for bb-msgs.sh
#
BBMSGSTAB="${BBHOME}/etc/bb-msgstab" # Directory for the Hobbit client
files
#
# for bb-vxcheck.sh
#
VXDISK_LIST="/var/BB/bb/sbin/vxdisk list"
VXDISK_CHECK="/var/BB/bb/sbin/vxdisk check"
VXDG_LIST="/var/BB/bb/sbin/vxdg list"
VXIOD="/var/BB/bb/sbin/vxiod"


Many scripts also use some of the pre-defined variables in the file,
make sure they are defined with the correct path for your systems. 
Butch
quoted from Asif Iqbal
-----Original Message-----
From: Asif Iqbal [mailto:user-c8222abeff59@xymon.invalid]
Sent: Thursday, November 17, 2005 7:45 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] External Client scripts and MACHINE environment

Hi All

I just started using bb-cpu2[1] on ~hobbit/client/ext of version
4.1.2.
I am noticing it $MACHINE has no value inside the script while I run a
test like this
	./bin/bbcmd sh -x ~hobbit/client/ext/bb-cpu2.sh

Here is a google cache of the bb-cpu2 on deadcat.net since the site
seems kind a slow now.
http://66.102.7.104/search?q=cache:6p53UoHzUEcJ:www.deadcat.net/BB/e
xt/cpu2+cpu+site:deadcat.net&hl=en
quoted from Asif Iqbal

I checked all the emails upto Oct 5th and don't think saw a good
answer
to this problem.

I hate to declare the value of MACHINE inside the script. Any
suggestion
would be greatly appreciated.

Thanks

--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
"..there are two kinds of people: those who work and those who take
the
credit...try
 to be in the first group;...less competition there."  - Indira Gandhi