It depends on the version of VSX. Versions of VSX up to R80.30 (I think) are based on some VRF extensions to the Linux kernel. R80.40 and later are based on Linux network namespaces.
For R80.40 and up, you can get a list of the namespace names using 'ip netns list', then you can run a command in a particular namespace by using 'ip netns exec <namespace name> <command>', like this:
[Expert@MyVsxCluster:0 STANDBY]# fw ver
This is Check Point's software version R80.40 - Build 135
[Expert@MyVsxCluster:0 STANDBY]# ip netns list
CTX00000 (id: 0)
CTX00001 (id: 1)
CTX00002 (id: 2)
...
[Expert@ MyVsxCluster:0 STANDBY]# ip netns exec CTX00002 netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 10.2.3.1 0.0.0.0 UG 0 0 0 wrp128
10.1.0.0 10.2.3.5 255.255.0.0 UG 0 0 0 bond1.234
10.2.0.0 10.2.3.5 255.255.255.0 UG 0 0 0 bond1.234
...
This ultimately allows you to run any command in any namespace you want from any namespace you want.