From the command line, how do I tell if a particular VPN connection is up?
If you know the network address range, you could use "ifconfig" and parse the output to see if an interface is up and running with an IP in the appropriate range.