Forum Discussion
Tim_Walter_6225
Nimbostratus
Mar 10, 2014tmsh::get_field_value does not work
LTM VE 11.4.1 608.0
what is wrong?
create script watch_pool {
proc script::run { } {
set pool "p0106"
set obj [tmsh::get_status /ltm pool $pool raw]
puts $obj
set bitin [tmsh::get_field_value $obj "serverside.bits-in" ]
}
proc script::init { } {
}
proc script::help { } {
}
proc script::tabc { } {
}
}
root@(vrootlb02)(cfg-sync Changes Pending)(Active)(/Common)(tmos) run cli script watch_pools
{ltm pool p0106 {
active-member-cnt 0
connq-all.age-edm 0
connq-all.age-ema 0
connq-all.age-head 0
connq-all.age-max 0
connq-all.depth 0
connq-all.serviced 0
connq.age-edm 0
connq.age-ema 0
connq.age-head 0
connq.age-max 0
connq.depth 0
connq.serviced 0
cur-sessions 0
min-active-members 0
monitor-rule none
name p0106
serverside.bits-in 1670970736
serverside.bits-out 3890998664
serverside.cur-conns 0
serverside.max-conns 10
serverside.pkts-in 328368
serverside.pkts-out 430197
serverside.tot-conns 6005
status.availability-state unknown
status.enabled-state enabled
status.status-reason The children pool member(s) either don't have service checking enabled, or service check results are not available yet
tot-requests 0
}}
watch_pools: script failed to complete:
can't eval proc: "script::run"
unexpected TCL object type
while executing
"tmsh::get_field_value $obj "serverside.bits-in" "
(procedure "script::run" line 6)
invoked from within
"script::run" line:1
script did not successfully complete, status:1
2 Replies
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects