Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
John Smith asked how to find the host IP address for a session whose hostname showed as ::ffff:2. Andreas Legner and Paul Watson suggested it looked like a malformed IPv6 address. Ramon Rey said hostname comes from sysscblst via syssessions, with no other source in sysmaster, so only network tools would help. Andreas suggested checking netstat -a. Unresolved.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
John Smith — source: IBM Community (ConnectedCommunity.org) Informix forum
Hello to All
How to find the host that is connected (IP Adress) for a session with hostname = ::ffff:2 ?
Thanks
------------------------------
John Smith
------------------------------
#Informix
↪ replying to John Smith
Andreas Legner — source: IBM Community (ConnectedCommunity.org) Informix forum
Looking to be an IPv6 address?
------------------------------
Andreas Legner
------------------------------
↪ replying to Andreas Legner
Paul Watson — source: IBM Community (ConnectedCommunity.org) Informix forum
Ramon Rey — source: IBM Community (ConnectedCommunity.org) Informix forum
Hello John:
Not sure I understand your question. You want the hostname for a session with hostname =
::ffff:2? That seems to be a malformed address. Please clarify.
Nonetheless, you can get the session and host along with other goodies from the syssessions in the sysmaster.
https://www.ibm.com/support/knowledgecenter/SSGU8G_14.1.0/com.ibm.adref.doc/ids_adr_0255.htm
I use this query to get session, host, network times and query:
set isolation to dirty read;
select s.sid as session_id,
t.sqs_dbname db_name,
s.username,
s.hostname,
dbinfo('utc_to_datetime', n.net_open_time) as conn_opened,
dbinfo('utc_to_datetime', n.net_last_read) as last_read,
dbinfo('utc_to_datetime', n.net_last_write) as last_write,c.cbl_stmt as sql_stmt
from syssessions s, sysnetworkio n, syssqlstat t, sysconblock c
where s.sid = n.sid
and s.sid = t.sqs_sessionid
and s.sid = c.cbl_sessionid
and (c.cbl_stmt is not null or c.cbl_stmt not like ' %')
I hope this helps.
R
------------------------------
Ramon Rey
------------------------------
↪ replying to Ramon Rey
John Smith — source: IBM Community (ConnectedCommunity.org) Informix forum
Yes
I have the same info on syssessions table; that"s why i'm asking if there is a another way to find the host of this session
regards
------------------------------
John Smith
------------------------------
↪ replying to John Smith
Ramon Rey — source: IBM Community (ConnectedCommunity.org) Informix forum
John,
Syssessions is a view made off of the join of sysscblst and sysrstcb tables. The user host info comes from the sysscblst table. To my knowledge, there is no other place in the sysmaster that holds the hostname from the connecting session. As for sources outside the database, you could try chasing down network connections, but that would work with current sessions.
My 0.02... Cheers!
Ramón
------------------------------
Ramon Rey
------------------------------
↪ replying to John Smith
Andreas Legner — source: IBM Community (ConnectedCommunity.org) Informix forum
So just out of couriosity: are you seeing a similar thing in 'netstat -a' ?
If so this would indicate that also the OS isn't able to match this numeric thing with a host name...
------------------------------
Andreas Legner
------------------------------
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.