Forum Discussion

Chris_Olson_172's avatar
Chris_Olson_172
Icon for Altostratus rankAltostratus
Jul 11, 2017

tmsh command to list client-ssl profiles - Name only

I've searched this forum for a tmsh command to get a list of client-ssl profiles by name only. I don't need all the properties. I tried the one-line option but it still gives me all the detail. It must be something simple but I'm not getting it. I know how to grep out individual profiles based on the properties but can't seem to find a way to just get a list of all them by name only.

 

  • You can combine both tmsh & a grep

    tmsh list ltm profile client-ssl | grep "ltm profile"

    Hope it helps

    • MichellePhipps's avatar
      MichellePhipps
      Icon for Nimbostratus rankNimbostratus

      how to you list for all partitions? 

      I'm trying to list virtual servers that are using name2_clientssl profile  which is not in the common partition

      I've tried various ways and keep getting an errors

      tmsh list ltm profile client-ssl one-line | grep name1_clientssl - works only for common partition

      tmsh list ltm profile client-ssl one-line /partition/* | grep name2_clientssl - error Syntax Error: unexpected argument "/partition/*"

      tmsh list ltm profile client-ssl one-line | grep /*/* name2_clientssl - grep: Invalid regular expression
      tmsh list ltm profile client-ssl one-line /*/* raw | grep "name2_clientssl -Syntax Error: unexpected argument "/bin/["

  • P_K's avatar
    P_K
    Icon for Altostratus rankAltostratus

    This should work!

     

    tmsh show ltm profile client-ssl | grep ClientSSL

     

    • jaikumar_f5's avatar
      jaikumar_f5
      Icon for MVP rankMVP

      Im a fan of Mr.Robot, so here for you,

      It captures the number of clientssl that's present, from it it looks on the virtuals, if the profile is matching it will show

      virtual-name,clientssl
      , if the profile is not bound, it will be
      ,clientssl-name

      for x in `tmsh list ltm profile client-ssl one-line |awk -F" " '{ print $4 }'` ; do virtual=`tmsh list ltm virtual one-line |grep $x |awk -F" " '{ print $3 }'`; echo $virtual,$x ; done