I wrote a little monitoring script that gives me a web page with server stats. One thing it lists is the KH node since I like to know if my VPS's were moved as well as to know when I should pay attention to network announcements.
I use the following php to get the node.
Returns just the node name. e.g. "VZ47-WA" or "SSD15-TX"
I use the following php to get the node.
PHP:
$vz = exec('traceroute 8.8.4.4 -m 1');
$vps = substr($vz,4,(strpos($vz, ".")-4));
Returns just the node name. e.g. "VZ47-WA" or "SSD15-TX"