Monday, March 27, 2017

Concurrent Users in Peoplesoft

This article is all about counting number of concurrent users connected to People soft.

We all know each and every login will make an entry in PSACCESSLOG table with Login & Logout Date and Time.But its not that accurate , because when the user closed the session without signing out then logout time will never be captured.

So to over come this issue I got an idea to get the session details from Web server as this will give you the live data.

Step:1 Create the script called Session.py as mentioned below

#File Name : 'Session.py'
# Author : Velu
import sys
import datetime
now = datetime.datetime.now()
filecsv = open("$PS_HOME/webserv/psofthr/applications/peoplesoft/PORTAL.war/session.csv", "a")
file = open("$PS_HOME/webserv/psofthr/applications/peoplesoft/PORTAL.war/session.log", "a")
print >>file, "Current date and time:",now.strftime("%Y-%m-%d %H:%M")
connect('system','Password1!','t3://WEBSERVERHOST:PORT')
serverRuntime()
cd ('ApplicationRuntimes/peoplesoft/ComponentRuntimes/PIA_')
currentsession1= get('OpenSessionsCurrentCount')
print >>file, "=========================================="
print >>file, "Number of session in Peoplesoft Webserver  :" ,currentsession1

Step:2 Create a script called sessionmonitor.ksh as mentioned below.

#File Name :'sessionmonitor.ksh'
#Author : Velu
#!/bin/ksh
cd $WL_HOME/oracle_common/common/bin
./config.sh
cd $WL_HOME/oracle_common/common/bin
./wlst.sh /global/site/vendor/psofthr/scripts/sessionmonitor.py

Step 3: Schedule a sessionmonitor.ksh for every 5 minutes in cron .

Step 4: Now access the below URL to get the live data.

       http:/webserverhost:port/session.log


Step 5: As we are generating the output in CSV format as well ,so you can get the graphical way to get the concurrent users. I used Qlik sense tool and this tool will accept http url and here is the snapshot.

http://webserverhost:port/session.csv



Appendix:

  You can also get more information from WLST . if you would like to get the user details follow the below command.




Hope this helps!!!!

Please comment for any issue/Questions.





4 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Between 10:20-10:25 am, 201 concurrent users are connecting to web server 1 and 180 concurrent users are connecting to web server 1.
    1. Do I have correct understanding of this number?

    Date Time Web1 Web2
    2017-10-25 10:20 201 180
    2017-10-25 10:25 209 180

    2. Does this number include web service inbound to PeopleSoft?

    3. How do we interpret this number differently from active connections to the app server? Especially when the number is not matching.

    hostname USER ip.ip.ip.ip 0:42:39 IDLE/W 0/0/0
    hostname USER ip.ip.ip.ip 0:09:36 IDLE/W 0/0/0
    hostname USER computername 0:59:43 IDLE/W 0/0/0
    hostname GUEST ip.ip.ip.ip 0:30:31 BUSY/W 0/0/0
    hostname USER computername 0:54:44 IDLE/W 0/0/0
    hostname USER ip.ip.ip.ip 0:02:28 IDLE/W 0/0/0

    Thank you in advance!

    ReplyDelete
  3. Velu : Very innovative idea to find concurrent users , very much appreciated.

    ReplyDelete

Peoplesoft Downtime Notification in Header

  Often we recycle Non prod server or even prod server during business hours. ideally we send email to users but not all the time users will...