Forum Discussion

kwkyiu_53019's avatar
kwkyiu_53019
Icon for Nimbostratus rankNimbostratus
Nov 08, 2011

Query system status in TMSH

Just a short and stupid question.

 

 

How can I query the system status (Active/Standby) in TMSH script?

 

  • Mark_Crosland_2's avatar
    Mark_Crosland_2
    Historic F5 Account
    One way would be to look at the failover.state DB variable. The "value" property will contain one of "active forced_offline offline standby"

     

     

    tmsh list sys db failover.state

     

    sys db failover.state {

     

    value "active"

     

    }

     

     

    tmsh list sys db failover.state all-properties

     

    sys db failover.state {

     

    default-value "offline"

     

    scf-config "false"

     

    value "active"

     

    value-range "active forced_offline offline standby"

     

    }

     

  • Mark_Crosland_2's avatar
    Mark_Crosland_2
    Historic F5 Account
    And in v11

     

     

    tmsh show cm traffic-group field-fmt

     

     

    In a script

     

    tmsh::get_status cm traffic-group ...

     

     

    has a failover-state property, which will be set to either active standby, offline or force_offline