如何获取建立 Informix 网络连接的完整主机名?

发布于 2024-09-10 17:04:18 字数 382 浏览 6 评论 0原文

onstat -g ses 的输出显示主机名和 tty 列。但是,这两个字符都被截断为前 8 个字符。

是否可以从 onstat 的任何其他变体获取完整的主机名或 tty? (对于网络连接 - 以及我的目的 - 它们是可以互换的)

背景:我们有一个非常频繁地执行 onstat -g ses 的脚本,它构成了负载平衡算法的一部分。这些连接所来自的服务器现在*具有 9 个字符的主机名,并且墨菲定律规定,截断的数字是识别彼此的数字。 (即它们的名称如 ABC1DEFG1、ABC1DEFG2 等。)


。* 就我个人而言,我非常相信这句格言:“糟糕的标准比不断变化的标准更好”。但这已经改变了,我也必须随之改变……

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 interchangeable)

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...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

依 靠 2024-09-17 17:04:18

检查 SMI syssessions 表(在 sysmaster 数据库中)中有哪些信息。根据我的计算,主机名的值位于 CHAR(256) 字段中,该字段应该能够保存您的 9 个字符的小名称而不会溢出。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文