Topic
6 replies Latest Post - ‏2013-05-14T16:26:41Z by schhokar
MDCYP
MDCYP
31 Posts
ACCEPTED ANSWER

Pinned topic Script for Checking Maximum Floating User / Concurrent Sessions

‏2011-10-24T09:39:28Z |
Hello,

i could need help for creating a script or SQL statement for checking the peaks of monthlys
floating users or concurrent users.
We think that we need to add some licences but i am still searching how to cheak if we reach our "license" peak with concurrent session - or newly named: floating users.

We are using for all connections the same datebase user.

Any ideas? At the moment i am using:




while 

true ; 

do conns=$($
{ONSTAT
} -g sql | tail -n +6 | head -n -1 | wc -l) 

if [ $conns -gt $maxcons ] ; then maxcons=$conns fi echo $(date 
"+%Y-%m-%d %H:%M:%S") \; 
"Max Connections: " $
{maxcons
} 
" Connections: " $
{conns
} sleep 3 done > $
{OUTFILE
}
Updated on 2011-10-27T22:24:31Z at 2011-10-27T22:24:31Z by SystemAdmin
  • andreasl
    andreasl
    368 Posts
    ACCEPTED ANSWER

    Re: Script for Checking Maximum Floating User / Concurrent Sessions

    ‏2011-10-24T12:32:17Z  in response to MDCYP
    Wouldn't the "Maximum server connections <n>" information, printed to the server's message log with every checkpoint, do for this purpose?

    There also is an internal (read-only) table sysmaster:syslicenseinfo, with weekly license usage infos.

    HTH,
    Andreas
  • MDCYP
    MDCYP
    31 Posts
    ACCEPTED ANSWER

    Re: Script for Checking Maximum Floating User / Concurrent Sessions

    ‏2011-10-24T12:42:21Z  in response to MDCYP
    Hello,

    does IBMs Informix License count the "max_conns" as data for the License ? I mean.. if you payed for 100 liceneses and max_conns shows "110" does it mean we need more licences ?

    We have the concurrent users license model
  • SystemAdmin
    SystemAdmin
    1143 Posts
    ACCEPTED ANSWER

    Re: Script for Checking Maximum Floating User / Concurrent Sessions

    ‏2011-10-27T03:25:52Z  in response to MDCYP
    Hi.

    We have recently been through an IBM licensing review and were asked to run the following query every half hour via dbaccess to identify our concurrent session count.

    select count(*) concurrentsessions
    from sysmaster:sysrstcb
    where sysmaster:bitval(flags,1)>0 { only count busy threads }
    and sysmaster:bitval(flags,'0x80000')!=0 { only count primary threads }
    and sysmaster:bitval(flags,'0x200')==0 { remove daemon threads}
    and sysmaster:bitval(flags,'0x40')==0 { remove log backup users }
    and sysmaster:bitval(flags,'0x80')==0 { remove onmonitor users }
    and sysmaster:bitval(flags,'0x2000')==0 { remove page cleaners}
    and sysmaster:bitval(flags,'0x00000400')==0 { remove archive threads}
    and sysmaster:bitval(flags,'0x00004000')==0 { remove recovery threads}
    and sysmaster:bitval(flags,'0x00100000')==0 { remove idx blder }
    and sysmaster:bitval(flags,'0x00200000')==0 { remove btree scanner }
    and sysmaster:bitval(flags,'0x04000000')==0 { remove main loop}
    and flags < 0x20000000; {add quotes around 0x20000000 (e.g. flags < '0x20000000';). If I add quotes here it doesn't display the value in the browser, bizarre ???}
    • MDCYP
      MDCYP
      31 Posts
      ACCEPTED ANSWER

      Re: Script for Checking Maximum Floating User / Concurrent Sessions

      ‏2011-10-27T07:00:01Z  in response to SystemAdmin
      Thank you very much.. thats excatly what we needed - a script/statement that IBM itself uses for license checks.
      • SystemAdmin
        SystemAdmin
        1143 Posts
        ACCEPTED ANSWER

        Re: Script for Checking Maximum Floating User / Concurrent Sessions

        ‏2011-10-27T22:24:31Z  in response to MDCYP
        Hi.

        For clarification, the script was provided to us by KPMG who were engaged by IBM to perform the IBM software licensing review.

        Regards.
        • schhokar
          schhokar
          1 Post
          ACCEPTED ANSWER

          Re: Script for Checking Maximum Floating User / Concurrent Sessions

          ‏2013-05-14T16:26:41Z  in response to SystemAdmin

          Hello,

          Would it be possible to provide what the output would look like and how to appropriately count the number of concurrent sessions? We will be using this script on our IDS machines (running WIndows) and want to understand what the output should look like and how concurrent sessions will be counted.

           

          Thank you for any help.

           

          Best,