Progress Application Server - pasman sessions - Forum - OpenEdge Development - Progress Community

Progress Application Server - pasman sessions

 Forum

Progress Application Server - pasman sessions

This question is not answered

I am trying to get the number of users actively connected to a Progress Application Server to control concurrent access to an application. The backend database is SQL Server, using the SQL Dataserver. There are a mix of users using the application from normal windows desktop Prowin sessions (which I can already count and do not use the PAS) and Mobile access via the Progress Application Server.


Given the output:(below) from pasman, is there a way to get the session count (value from <1 minutes) without issuing a pasman command?

proenv>pasman sessions -I Test -u user:pswd WebApp
OK - Session information for application at context path /WebApp
Default maximum session inactive interval 30 minutes
<1 minutes: 2 sessions
12 - <13 minutes: 1 sessions
13 - <14 minutes: 1 sessions

All Replies
  • How would you want to get them (what client)?
     
  • When the mobile app signs into the application I want to get a session count of active sessions.

    The call needs to be from a progress procedure to get the number of active sessions on the PAS instance.

    We are doing this to ensure the customers comply with the license counts they are licensed for.

  • Are you interested to run JMX query from command line, write that to a output to a file in JSON and read it from there? All this can be done from ABL(if you like to run the JMX query from OS-COMMAND).

    Regards,

    Irfan

  • I am wide open to suggestions, it will be the PAS instance that will execute the code.

    If you could provide a sample of the JMX query and how to run it from ABL to get the active sessions that would certainly be something I would be interested in.

    Thanks,

    Derek

  • You should be able to get this via REST call from an ABL session
    - you will need the oemanager webapp deployed
    - there’s an example of making a call to the oemanager stuff at github.com/.../get_applications.p
     
     
  • The one you are looking for is a manager (tomcat)  API, so you cannot have access for its REST API. To run it from JMX, you can run the following query

    {"O":"Catalina:type=Manager,host=localhost,context=/","A":"activeSessions"}

    This should be written to file(any name and extension) and then run the following command

     oejmx.bat|sh -R -Q <your query file> -O <Absolute PATH of output file>

    It should dump the json output in the file you have mentioned.

    if you are running 11.7.2 then you have to change the oejmx script to pick the right JDK. You do not have to do anything with 11.7.3.

    Regards,

    Irfan

  • I am using OE 11.7.1, where do I find oejmx.bat?

  • The article: knowledgebase.progress.com/.../How-to-get-an-OEPas-Session-Agent-Stack

    Seems to indicate it should be <PASOE Instance>/bin: oejmx.bat

    I do not have that bat file in either my dev instance folder, or a test production environment.

  • We started shipping oejmx from 11.7.2.

    Regards,

    Irfan

  • Is it available for 11.7.1, can I install it somehow other than going to 11.7.2?

  • And how would I call that from a Windows desktop prowin session that does not have access to the Instance/bin folder?

  • If /oemanager web app is installed you can use the ABL HTTP client to fetch the URL.  If not, then you need to use JMX which requires a java client.

  • What would the URL be to get the activeSessions?

  • This seems to give me what I want from a URL:

    http://<server>:<port>/manager/jmxproxy/?get=Catalina:type=Manager,host=localhost,context=/WebApp&att=activeSessions

    Result:

    OK - Attribute get 'Catalina:type=Manager,host=localhost,context=/LumberTrack' - activeSessions = 1

  • "LumberTrack".... Looks like we have something in common. Our version of it originates about 20 years ago, and we still run ours on HP-UX!

    I think the difference between your "manager" url and the "oemanager" URL (that Matt suggested) is that the first one is a REST interface that is focused on tomcat HTTP sessions and the latter is for OE ABL sessions.

    "Session" is a term that is way over-utilized, especially within the context of PASOE. Here is a KB that describes the variety of things that are named "session" in PASOE. https://knowledgebase.progress.com/articles/Article/What-are-the-types-of-OpenEdge-sessions . So it might be helpful if we could start by clarifying which type of session you want to monitor.

    More importantly, it sounds like Progress sold you DataServer licenses for concurrent ABL users. Couldn't you ask Progress to sell you the same type of licensing model as you have for PASOE (ie. probably core licensing for both?) It seems a pain to self-audit with home-grown code.  I'm eager to hear how things turn out.