Forum Discussion
CLI command to look search for a node on all partition
- Apr 20, 2023
Thanks Enes_Afsin_Al.
Your script works great. Sample output:
/rsync_load_balancer_vhn0wt_ste_prd/rsync_load_balancer_vhn0wt_ste_prd/serviceMain,/rsync_load_balancer_vhn0wt_ste_prd/172.30.13.91%709:ssh,/rsync_load_balancer_vhn0wt_ste_prd/rsync_load_balancer_vhn0wt_ste_prd/serverpool,172.30.13.85%709 172.30.13.87%709 172.30.13.88%709 172.30.13.89%709In the end, had two options, yours plus:
Command-1:
tmsh -c 'cd /; show ltm virtual detail recursive' | egrep "Virtual Server: | Destination | Ltm::Pool: | Ltm::Pool Member: | Ltm::ClientSSL Profile" | grep -v "Destination IP Bypasses" | sed 's/Ltm:://g;s/|//g;s/Destination\s*/Destination/g' >> /var/tmp/virtual.outCommand 2:
egrep -B 3 '172.30.13.85%|172.30.13.87%|172.30.13.88%|172.30.13.89%' virtual.outExample output:
Virtual Server: rsync_load_balancer_vhn0wt_ste_prd/rsync_load_balancer_vhn0wt_ste_prd/serviceMain
Destination: 172.30.13.91%709:22
Pool: rsync_load_balancer_vhn0wt_ste_prd/rsync_load_balancer_vhn0wt_ste_prd/serverpool
Pool Member: Common/172.30.13.85%709:22
Pool Member: Common/172.30.13.87%709:22
Pool Member: Common/172.30.13.88%709:22
Pool Member: Common/172.30.13.89%709:22Both outputs can be written to a file with the " > filename.csv " or " filename.txt "
Thanks Enes_Afsin_Al.
Your script works great. Sample output:
/rsync_load_balancer_vhn0wt_ste_prd/rsync_load_balancer_vhn0wt_ste_prd/serviceMain,/rsync_load_balancer_vhn0wt_ste_prd/172.30.13.91%709:ssh,/rsync_load_balancer_vhn0wt_ste_prd/rsync_load_balancer_vhn0wt_ste_prd/serverpool,172.30.13.85%709 172.30.13.87%709 172.30.13.88%709 172.30.13.89%709
In the end, had two options, yours plus:
Command-1:
tmsh -c 'cd /; show ltm virtual detail recursive' | egrep "Virtual Server: | Destination | Ltm::Pool: | Ltm::Pool Member: | Ltm::ClientSSL Profile" | grep -v "Destination IP Bypasses" | sed 's/Ltm:://g;s/|//g;s/Destination\s*/Destination/g' >> /var/tmp/virtual.out
Command 2:
egrep -B 3 '172.30.13.85%|172.30.13.87%|172.30.13.88%|172.30.13.89%' virtual.out
Example output:
Virtual Server: rsync_load_balancer_vhn0wt_ste_prd/rsync_load_balancer_vhn0wt_ste_prd/serviceMain
Destination: 172.30.13.91%709:22
Pool: rsync_load_balancer_vhn0wt_ste_prd/rsync_load_balancer_vhn0wt_ste_prd/serverpool
Pool Member: Common/172.30.13.85%709:22
Pool Member: Common/172.30.13.87%709:22
Pool Member: Common/172.30.13.88%709:22
Pool Member: Common/172.30.13.89%709:22
Both outputs can be written to a file with the " > filename.csv " or " filename.txt "
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com