Logging User Signons

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
pjshuey
Experienced User
Posts: 119
Joined: Wed May 25, 2016 11:58 am
First Name: Patti
Last Name: Shuey
Company Name: Conestoga Wood Specialties
Phone: 7174452886
Address 1: 645 Reading Road
City: East Earl
State / Province: Pennsylvania
Zip / Postal Code: 17519
Country: United States
Contact:

Logging User Signons

Post by pjshuey »

On the IBMi we store user logon time by pulling the information from QHST based on msgid. When our users only use Atruim we lose this information (I think). Is there any way to find this information for our Atrium users?
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Logging User Signons

Post by Scott Klement »

I'm guessing that your QHST is showing the job start/end times, is that correct?

Atrium works by signing on to the IBM HTTP Server (powered by Apache) using HTTP authentication. The browser then saves these credentials in memory, and automatically re-sends them every time you interact with something (meaning, click a link, button, etc... anything that submits a screen, opens a new tab, etc.)

When a Rich Display application is launched, it is creating a new job. I'm thinking these woudl be in QHST as well, wouldn't they? I'm certainly no expert on QHST, but I thought it had all of the job start/ends.

Likewise, if Atrium runs a Genie macro or starts a Genie session, this is still a 5250 session like other tools create, so it should have the same entries in QHST.

So it seems to me that QHST should still work, but there will be a big difference in that it shows each time the user launches a tab rather than just when they sign on. So that's pretty different, but if you think about it, its no different than what would happen if they opened many 5250 windows at the same time.

Obviously, if you launch a PC command, or open a new web page, these aren't necessarily on the IBM i partition that's hosting Atrium, so they couldn't be logged to QHST.
DanD
Profound User
Posts: 42
Joined: Wed Jun 14, 2017 12:06 pm
First Name: Dan
Last Name: Devoe
Company Name: Boston Warehouse Trading
State / Province: Massachusetts
Zip / Postal Code: 02062
Country: United States
Contact:

Re: Logging User Signons

Post by DanD »

pjshuey wrote:On the IBMi we store user logon time by pulling the information from QHST based on msgid. When our users only use Atruim we lose this information (I think). Is there any way to find this information for our Atrium users?
Perhaps a solution is when you launch Atrium, write a record out to a table that stores the user signon information. When connectivity is lost (the job is no longer in the system), update the record.

I did a similar approach when using VisualAge for RPG applications.

The table could contain the User ID, System job number, start timestamp & end timestamp.

You could even take it one step further & for each program launched thru Atritum, write a record (add Program ID as a column in the table).
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Logging User Signons

Post by Scott Klement »

How would she write a record when someone signs on to Atrium?

I suppose you could modify the sign on screen (this is customer-modifyable) to call your own AJAX routine. That routine could write a record... but that ajax request would only last for a moment (fraction of a second), it'd basically write the record and immediately end. There isn't any way that I'm aware of to tell when someone "ends" the whole Atrium portal.

Atrium is a stateless web application. So when you sign on, it's just sending a quick message to IBM i, and then ending. There isn't really any sort of "sign off" that occurs at all. The Atrium jobs are only active for a moment to get the data from the database, then they end.

The tabs you open for either Rich Displays or Genie sessions will keep a job running while they are open -- but you may have dozens or hundreds of these open during the lifetime of the session as users open/close different tabs.
DanD
Profound User
Posts: 42
Joined: Wed Jun 14, 2017 12:06 pm
First Name: Dan
Last Name: Devoe
Company Name: Boston Warehouse Trading
State / Province: Massachusetts
Zip / Postal Code: 02062
Country: United States
Contact:

Re: Logging User Signons

Post by DanD »

Scott Klement wrote:How would she write a record when someone signs on to Atrium?
Perhaps it wouldn't be done when Atrium itself is launched - at the program / module level, call a procedure (ie. LogStartOfJob(UserID: ProgramID);) that would write the table entry for that program being launched.

And then have the on-exit opcode to call a procedure that'll update the table record, showing when the program has ended.

Of course, this would require modifying every top-level program that is launched by Atrium (not drill-down programs), and yes, it could result in many records being written as opposed to simply when the user logged in & logged out.

Just an idea...
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Logging User Signons

Post by Scott Klement »

For Rich DIsplays, there's an exit program that can be run each time one is launched. https://docs.profoundlogic.com/x/BAHdAQ This exit program was intended to be used to allow someone to control whether a program was launched or not based on their own coding logic. But, you could simply always allow it, and write your own logic to log the program start somewhere.

Using that, you wouldn't have to modify each program -- at least not for program startups.

There's nothing equivalent to "on-exit", I'm afraid.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests