Forum Discussion

khansafdarali1_'s avatar
khansafdarali1_
Icon for Nimbostratus rankNimbostratus
Oct 11, 2016
Solved

What is the command in tmsh to find out all the pools that are associated to monitor "tcp"?

What is the command in tmsh to find out all the pools that are associated to monitor "tcp"?

 

    1. (tmos)
      run util bash
      Go to Bash shell
    2. (bash)
      tmsh list ltm pool one-line | grep 'monitor tcp ' | awk '{ print $3 }'
      Print out names of all LTM pools associated with the 'tcp' health-check monitor

11 Replies

  • (tmos.ltm)show pool all | grep "Monitor\|Pool:"

    (tmos.ltm) list pool | grep "pool\|monitor "

    This should give you all the pools and the associated monitor. You can copy the output and utilize sed/awk/egrep to obtain the relevant information. You can also try to execute the tmsh command from bash and try and utilize sed/awk/egrep to obtain the output you desire.

    1. (tmos)
      run util bash
      Go to Bash shell
    2. (bash)
      tmsh list ltm pool one-line | grep 'monitor tcp ' | awk '{ print $3 }'
      Print out names of all LTM pools associated with the 'tcp' health-check monitor
    • khansafdarali1_'s avatar
      khansafdarali1_
      Icon for Nimbostratus rankNimbostratus

      Syntax Error: "awk", grep is currently the only filter that is supported

       

    • Hannes_Rapp_162's avatar
      Hannes_Rapp_162
      Icon for Nacreous rankNacreous

      You execute that command in Bash shell, not in TMOS. See command 1 to switch to Bash.

       

      If you don't have sufficient rights for Bash shell, you can't use the awk command to filter the output to just pool names.

       

    1. (tmos)
      run util bash
      Go to Bash shell
    2. (bash)
      tmsh list ltm pool one-line | grep 'monitor tcp ' | awk '{ print $3 }'
      Print out names of all LTM pools associated with the 'tcp' health-check monitor
    • khansafdarali1_'s avatar
      khansafdarali1_
      Icon for Nimbostratus rankNimbostratus

      Syntax Error: "awk", grep is currently the only filter that is supported

       

    • Hannes_Rapp's avatar
      Hannes_Rapp
      Icon for Nimbostratus rankNimbostratus

      You execute that command in Bash shell, not in TMOS. See command 1 to switch to Bash.

       

      If you don't have sufficient rights for Bash shell, you can't use the awk command to filter the output to just pool names.