Forum Discussion

  • Hello,

     

    you can try this command

     

    Code >tmsh show ltm virtual "VS Name" policies | grep "asm_"

    or

     

    Code >tmsh list ltm virtual "VS Name" policies | grep asm

    Or directly from the tmsh

     

    Code >show ltm virtual "VS Name" policies | grep "asm_"

    or

     

    Code >list ltm virtual "VS Name" policies | grep asm

    Let me know if it works for you

     

    Regards

     

  • bsb's avatar
    bsb
    Icon for Nimbostratus rankNimbostratus

    I can get all the asm policies and corresponding virtual servers with below command.

     

    tmsh list asm policy virtual-servers | sed ':a;N;$!ba;s/\n/ /g' | sed 's/asm policy/\nasm policy/g'

     

    can you please let me know what would be the command to get backend servers with port numbers along with above output.

     

    as of now, i use below command to get VIP, backend server and port number. tmsh list ltm virtual one-line |awk '{for(i=0;i<=NF;i++)if($i=="pool"){p=$(i+1);break}; print $3,$6,p}' |awk '{cmd="tmsh list ltm pool " $3 " one-line"; cmd|getline r; print $1,$2,$3,r}' |awk '{printf "%s,%s,%s",$1,$2,$3} {for(j=3;j<=NF;j++)if($j~/:/){printf ",%s",$j} {print ""}}' >> $HOSTNAME