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
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.