开发者

How can I get the complete hostname from whence an Informix network connection has been made?

开发者 https://www.devze.com 2023-01-08 04:35 出处:网络
The output of onstat -g ses displays both hostname and tty columns. However, both of these are truncated to the first 8 chars.

The output of onstat -g ses displays both hostname and tty columns. However, both of these are truncated to the first 8 chars.

Is it possible to obtain the hostname or tty in full from any other variant of onstat? (For network connections - and my purposes - they are interchang开发者_如何转开发eable)

Background: we have a script executing onstat -g ses very frequently, which forms part of a load-balancing algorithm. The servers from whence these connections come now* have 9-character hostnames, and Murphy's Law dictates that the truncated digit is the one that identifies one from another. (ie they have names like ABC1DEFG1, ABC1DEFG2 and so on.)


.* Personally, I'm a great believer in the adage that "a standard that sucks is better than a constantly changing one". But this one has changed, and I must change with it...


Check what information is in the SMI syssessions table (in the sysmaster database). According to my reckoning, the value there for the hostname is in a CHAR(256) field, which should be able to hold your diddly little 9-character names without overflowing.

0

精彩评论

暂无评论...
验证码 换一张
取 消