es-cli - kernel-reader setAttributes

Hello,

I'm trying to get the critical and warning values for the kernel-reader settings via the es-cli. The idea is that after I get the settings, check them and then if needed set them.

I've tried the following but I keep getting errors:

getAttributes a=HOST m=kernel-reader property=/filesystem/vxfsFileSystem/fileTable/fileEntry/kpctUsed mgtObj=/var

getAttributes a=HOST m=kernel-reader property=filesystem mgtObj=vxfsFileSystem/fileTable/fileEntry/kpctUsed propInst=var

getAttributes a=HOST m=kernel-reader+/var property=filesystem

getAttributes a=HOST m=kernel-reader+vxfsFileSystem mgtObj=fileTable/fileEntry/kpctUsed property=size propInst=/var

getAttributes a=HOST m=kernel-reader+vxfsFileSystem mgtObj=fileTable/fileEntry/kpctUsed property=filesystem propInst=/var

Here is the look at the actual kernel-reader.dat file.

-> more kernel-reader.dat

value:loadinfo = "sunmc @ Fri Oct 07 09:07:57 CEST 2005"

value:agentVersion = "30501"

value:generalGroups = "ANYGROUP"

value:adminUsers = "sunmc"

value:adminGroups = "esadm"

value:operatorGroups = "esops"

value:generalCommunities = "public"

filesystem = {

ufsFileSystem = {

fileTable = {

fileEntry = {

kpctUsed = {

alarmlimit:error-gt(/var) = "90.0"

alarmlimit:warning-gt(/var) = "80.0"

}

}

}

}

}

does anyone know the syntax for this?

[1479 byte] By [kona_kunst] at [2007-11-26 11:14:11]
# 1

It looks like I had to help myself, OK I had some help from a Sunny. Thanks.

for anyone that's interested here is a possible solution.

1) via cli login (sets the values for /var at 80 and 70.

login

set fg=on

set more=off

set a=hostname1,hostname2,hostname3,....

set m=kernel-reader

set mgtObj=filesystem/ufsFileSystem/fileTable/fileEntry

set property=kpctUsed

set propInst=/var

set attribute=alarmlimits.warning-gt,alarmlimits.error-gt

set value=70.0,80.0

setAttributes

quit

2) via script (set all vxfs directors in list_dir to 95 and 90)

SMC_HOST=`hostname`

CLI="su - sunmc -c "

MO="filesystem/vxfsFileSystem/fileTable/fileEntry"

M="kernel-reader"

PROP="kpctUsed"

FILE="list_dir"

HOST="hostname1,hostname2,hostname3,...)

for INST in `cat $FILE`; do

echo ${INST}

${CLI} "/opt/SUNWsymon/sbin/es-cli -i ./.sunmcParamFile serverHost=$SMC_HOST <<- FINE

login

set fg=on

set more=off

setAttributes a=${HOST} m=$M mgtObj=$MO property=$PROP propInst=$INST attribute=alarmlimits.error-gt,alarmlimits.warning-gt value=95.0,90.0

quit

FINE"

done

I hope this helps other Admins struggling with SMC.

I've still got 5 Duke dollars open on this post. Anyone that posts the best joke, horror story or tip about SMC by Friday 10.11. gets them.

aloha

kona_kunst

kona_kunst at 2007-7-7 3:29:04 > top of Java-index,Administration Tools,Sun Management Center...
# 2
guess we don't have anything to say...I'm also struggling with the cli feature and find your post very useful!
Quiksilver at 2007-7-7 3:29:04 > top of Java-index,Administration Tools,Sun Management Center...
# 3
What things are you doing with cli. I've got 2 or 3 tricks that have helped in the past. load modulesexport topologyLet me know, what you have and if you want so of those that I got. aloha
kona_kunst at 2007-7-7 3:29:04 > top of Java-index,Administration Tools,Sun Management Center...
# 4

what we are doing is:

after an agent installation by sps, we want sps to start es-cli to create the agent on the server.

accomplished to automatically report which servers (agents) are being monitored by our SunMC servers.

trying to make SunMC usable for a blind employee by using scripts with the es-cli command. Here we're still struggling with.

loading and unloading certain modules after an agent installation. Haven't got the time to look into this at the moment. Any help would be aprecated :-)

Quiksilver at 2007-7-7 3:29:04 > top of Java-index,Administration Tools,Sun Management Center...