Informix

 View Only
  • 1.  session(s) taking the most cpu ressources

    Posted Fri January 28, 2022 11:56 AM
    Hello

    please, is there a way to identify sessions that taking the most part of a CPU ressources ?

    regards

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

    #Informix


  • 2.  RE: session(s) taking the most cpu ressources

    Posted Fri January 28, 2022 12:09 PM
    Edited by System Test Fri January 20, 2023 04:10 PM

    Current server:

    onstat -g top

    ( see 'https://www.ibm.com/docs/en/informix-servers/14.10?topic=ogmo-onstat-g-top-command-print-top-consumers-resources' )

    Previous - in real time you can use "onstat -g cpu", or observe / filter (continuous) "ath" output (UNIX/Linux):

    onstat -g ath -r 3 | egrep 'Informix|running'

    I am sure someone here has a script/sql for SMI tables too ...



    ------------------------------
    Vladimir Kolobrodov
    ------------------------------



  • 3.  RE: session(s) taking the most cpu ressources

    Posted Fri January 28, 2022 12:11 PM
    Depends on your Informix version, but try this:

    dbaccess sysmaster <<!

    select first 10
    s.sid ,
    s.username ,
    s.uid ,
    s.pid ,
    s.hostname ,
    t.tid,
    t.name,
    t.statedesc ,
    t.statedetail,
    t.cpu_time
    from syssessions s,
    systcblst t,
    sysrstcb r
    where t.tid = r.tid AND s.sid = r.sid
    order by t.cpu_time desc;

    !


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



  • 4.  RE: session(s) taking the most cpu ressources

    Posted Fri January 28, 2022 12:22 PM
    Thank you so much :)

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