Forum Discussion

John_Ogle_45372's avatar
John_Ogle_45372
Icon for Nimbostratus rankNimbostratus
Mar 30, 2015

tmsh output issues - related to iAPP ??

Hello,

I need to solve two issues.

1) When I run the "tmsh list ltm pool" command, it only shows pools created manually. The pools created with an iApp don't show up. The manual pools are in /Common and the iApp created Exchange pools are in /Common/Exchange2013.iapp. The iapp created pools don't show up. How can I get all the pools to show up?

2) How can I run the "tmsh list ltm poo" command but only show the first and fourth lines of the config?

ltm pool foo {

active-member-cnt 1
        addr 200.200.200.101
        monitor-status up

ltm pool qux {

active-member-cnt 0
        addr 200.200.200.111
        monitor-status unchecked            

Basically, this would display the pool name and the monitor status only?

Thank you,

2 Replies

  • Hi John,

    there are two options (first one specifies the iApp folder), afaik:
    tmsh -q -c "cd /Common/iapp_web.app; list ltm pool"
    

    or parse all folders:

    tmsh -q -c "cd /; list ltm pool recursive"  
    

    This way you will run tmsh in command mode (-c) and override questions (-q).

    Thanks, Stephan

  • Hi John,

    was a bit in a hurry and overlooked 2nd part of your question.

    It´s a bit TMOS version dependent and I would recommend to use the output the the "show" command instead.

    TMOS v11 example:

     tmsh -q -c 'cd /;show ltm pool recursive members' | grep -iE '(ltm::pool|current active|(monitor|session) status)'
    Ltm::Pool: Common/iapp_web.app/iapp_web_pool
      Current Active Members : 2
      | Ltm::Pool Member: Common/10.131.131.105:80
      |   Monitor Status : up
      |   Session Status : enabled
      | Ltm::Pool Member: Common/10.131.131.106:80
      |   Monitor Status : up
      |   Session Status : enabled
      | Ltm::Pool Member: Common/10.131.131.107:80
      |   Monitor Status : down
      |   Session Status : enabled
    

    TMOS V10 example:

     tmsh show ltm pool members | grep -iE '(ltm::pool|availability|state)'
    Ltm::Pool: part_web_pool
      Availability : available
      State        : enabled
    Ltm::Pool Member: part_web_pool  10.131.131.105:80
      Availability : available
      State        : enabled
    Ltm::Pool Member: part_web_pool  10.131.131.106:80
      Availability : available
      State        : enabled
    Ltm::Pool Member: part_web_pool  10.131.131.107:80
      Availability : offline
      State        : enabled
    

    Thanks, Stephan