Hi mates,
i am trying to get a list of vs (without virtual switches/router) in cli including vs id and vs name as a table.
When just running vsx stat -v the names are truncated.
So i created a script including a loop.
#!/bin/sh
source /opt/CPshared/5.0/tmp/.CPprofile.sh
source /etc/profile.d/vsenv.sh
VSLIST=`fw vsx stat -v 2>&1 | grep Trust | grep -v '<Not Applicable>' | grep -v 'SIC Status' | awk -F\| '{print $1}'`
for i in $VSLIST ; do
VSNAME=$( vsx stat $i 2>&1| grep Name | awk '{print $2}' )
echo $i";"$VSNAME";"
done
output is e.g.
1;vs bla;
2;vs blubb;
This was fine until now but at several vsx systems we now have > 30 vs and this script takes too long. And other scripts waiting for the result are running into timeouts.
Any hints to speed up this script or maybe a complete different way to get this list would be appreciated 🙂
Cheers
VInce
and now to something completely different - CCVS, CCAS, CCTE, CCCS, CCSM elite