Informix

nested-group-icon.png

DB2

Expand all | Collapse all

session from "::ffff:2"

  • 1.  session from "::ffff:2"

    Posted 18 days ago
    Hello to All

    How to find the host that is connected (IP Adress) for a session with hostname = ::ffff:2 ?

    Thanks

    ------------------------------
    John Smith
    ------------------------------


  • 2.  RE: session from "::ffff:2"

    Posted 18 days ago
    Looking to be an IPv6 address?

    ------------------------------
    Andreas Legner
    ------------------------------



  • 3.  RE: session from "::ffff:2"

    Posted 18 days ago
    But it looks like a badly formed address

    Cheers
    Paul

    > Looking to be an IPv6 address?
    >
    > ------------------------------
    > Andreas Legner
    > ------------------------------
    > -------------------------------------------
    > Original Message:
    > Sent: Mon November 09, 2020 08:16 AM
    > From: John Smith
    > Subject: session from "::ffff:2"
    >
    > Hello to All
    >
    > How to find the host that is connected (IP Adress) for a session with
    > hostname = ::ffff:2 ?
    >
    > Thanks
    >
    > ------------------------------
    > John Smith
    > ------------------------------
    >
    >
    > Reply to Sender :
    > https://community.ibm.com/eGroups/PostReply/?GroupId=4147&MID=201547&SenderKey=34569554-10a3-41e8-ad2d-91951079d303&MDATE=757546645%253e&UserKey=29a6c229-a98c-46da-9248-4df042a4a263&sKey=KeyRemoved
    >
    > Reply to Discussion :
    > https://community.ibm.com/eGroups/PostReply/?GroupId=4147&MID=201547&MDATE=757546645%253e&UserKey=29a6c229-a98c-46da-9248-4df042a4a263&sKey=KeyRemoved
    >
    >
    >
    > You are subscribed to "Informix" as paul@oninit.com. To change your
    > subscriptions, go to
    > http://community.ibm.com/community/user/preferences?section=Subscriptions&MDATE=757546645%253e&UserKey=29a6c229-a98c-46da-9248-4df042a4a263&sKey=KeyRemoved.
    > To unsubscribe from this community discussion, go to
    > http://community.ibm.com/HigherLogic/eGroups/Unsubscribe.aspx?UserKey=29a6c229-a98c-46da-9248-4df042a4a263&sKey=KeyRemoved&GroupKey=60eb97a2-57c0-4130-9b6d-57174f97d5a8.


    --
    Paul Watson
    Tel: +1 913-674-0360
    Mob: +1 913-387-7529
    Web: www.oninit.com

    Oninit? is a registered trademark of Oninit LLC

    Failure is not as frightening as regret.
    If you want to improve, be content to be thought foolish and stupid.
    What this country needs are more unemployed politicians




  • 4.  RE: session from "::ffff:2"

    Posted 16 days ago
    Edited by Ramon Rey 16 days ago
    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
    ------------------------------



  • 5.  RE: session from "::ffff:2"

    Posted 11 days ago
    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
    ------------------------------



  • 6.  RE: session from "::ffff:2"

    Posted 11 days ago
    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
    ------------------------------



  • 7.  RE: session from "::ffff:2"

    Posted 11 days ago
    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
    ------------------------------