- Products
- Learn
- Local User Groups
- Partners
- More
MVP 2026: Submissions
Are Now Open!
What's New in R82.10?
10 December @ 5pm CET / 11am ET
Announcing Quantum R82.10!
Learn MoreOverlap in Security Validation
Help us to understand your needs better
CheckMates Go:
Maestro Madness
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
You could try to get the data directly from SNMP via something like this:
timeout 5 stattest gettable 1.3.6.1.4.1.2620.1.16.22.1 1 2 3 4 5 6 7 8 9 10
OID: 1.3.6.1.4.1.2620.1.16.22.1
Full path: checkpoint.products.vsx.vsxStatusTable
Sequences:
interesting approach. Did not know stattest gettable before.....thanks....
checking.....
# timeout 5 stattest gettable 1.3.6.1.4.1.2620.1.16.22.1 1 2 3 4 5 6 7
,,,,,,,
hmmmm 🙂
It's so easy 😄
for i in `vsx stat -v | grep " S "| awk '{print $1}'| grep '^[0-9]' | sort -n -k1,1`; do vsenv $i >/dev/null; echo -n $i";"; echo $vsname";" | cut -f 2 -d "_"; done
Glad you found a solution that you're happy with.
However, your code does still iterates through all the vsenv's just to fetch the full name of each specific VS. There should be a better way to do it as vsx stat -v already does what you want, though it truncates the names it probably reads in uncut.
And truncated is not what i want.
And that's why it's a good practice to check how vsx stat -v collects the data it is showing or just open a SR and ask TAC for it.
Leaderboard
Epsum factorial non deposit quid pro quo hic escorol.
| User | Count |
|---|---|
| 16 | |
| 13 | |
| 8 | |
| 7 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
Fri 12 Dec 2025 @ 10:00 AM (CET)
Check Mates Live Netherlands: #41 AI & Multi Context ProtocolFri 12 Dec 2025 @ 10:00 AM (CET)
Check Mates Live Netherlands: #41 AI & Multi Context ProtocolTue 16 Dec 2025 @ 05:00 PM (CET)
Under the Hood: CloudGuard Network Security for Oracle Cloud - Config and Autoscaling!About CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY