Informix

 View Only
Expand all | Collapse all

flags (onstat -g ses)

  • 1.  flags (onstat -g ses)

    Posted Fri December 03, 2021 10:32 AM
    Hello 

    i have some sessions with status "running" and flags "---P---" , not doing or waiting for anything, other sessions are on "---PR--" (reading)

    what does "---P---" mean please ?

    Thanks



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


  • 2.  RE: flags (onstat -g ses)

    Posted Fri December 03, 2021 10:46 AM
    Primary thread for the session

    https://www.oninit.com/onstat/pda.php?id=onstat%20-g%20ses

    Cheers
    Paul

    Paul Watson
    Oninit LLC
    +1-913-387-7529
    www.oninit.com
    Oninit®️ is a registered trademark of Oninit LLC





  • 3.  RE: flags (onstat -g ses)

    Posted Fri December 03, 2021 11:01 AM
    Yes
    already checked, but i don"t where others flags are "-" !! there s only the 4th position "P" , so i'm wondering what is the session doing !!

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



  • 4.  RE: flags (onstat -g ses)

    Posted Fri December 03, 2021 11:17 AM
    What does the stack show, AFAIK it is no 'legal' to have a session without a thread 

    Cheers
    Paul

    Paul Watson
    Oninit LLC
    +1-913-387-7529
    www.oninit.com
    Oninit®️ is a registered trademark of Oninit LLC





  • 5.  RE: flags (onstat -g ses)

    Posted Fri December 03, 2021 11:37 AM
    I think the question is that is the flags show that there is a primary connection, but the session is not reading, not writing, and not waiting on a condition...then what's it doing?

    I think that you find that the session is sleeping.  If you run onstat -g ses <sid>, and look at the thread, it is likely to show "sleeping" - at least that's what I am seeing.  The dbworker thread seems to be in that state, which makes sense.

    ------------------------------
    Mike Walker
    xDB Systems, Inc
    www.xdbsystems.com
    ------------------------------



  • 6.  RE: flags (onstat -g ses)

    InnerCircle
    Posted Fri December 03, 2021 12:32 PM
    That's the same set of flags as in 'onstat -u' I'd say.
    For a session having multiple threads (PDQ), the 'P' thread would be the primary (sqlexec) one.

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



  • 7.  RE: flags (onstat -g ses)

    Posted Fri December 03, 2021 02:13 PM
    Run an onstat -g ath and look at the line for the thread (tid in the onstat -g ses <sid> report). You should see something like this:
    1520     4a8b10d0         46bfb388         1    cond wait  netnorm      8cpu         sqlexec

    This is an "sqlexec" thread, the main processing thread for a session. The status is "cond wait   netnorm" that means that the thread is waiting for a network connected client to tell it what to do. It has finished whatever it was doing. Either it is between SQL statements waiting for the client to execute another, or it is in the middle of returning a large data set and waiting for the client to FETCH again. I don't remember the details of what the output looks like for a shared memory connection.

    If the session is no longer there, which happens, for example, when a Windows app is close using the big "X" and doesn't trap that and close the connection to the database, the session will go away once the OS destroys the network connection when it times out. To get faster timeouts (they can take up to an hour on some OS's) set the keepalive setting in your SQLHOSTS file. Shared memory connections never timeout, but they also don't tend to hang when the client exits or crashes.

    Art

    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------