IBM Support

Finding last login date

Question & Answer


Question

How do you find "last login date" ?

Answer

Prior to Release 4.6, NPS did not track last login date information in any system catalog table. The most reliable method for finding this data is to use the grep command to match a connection string with a specific username in all of the pg log files. (There will be many pg logs because they get rotated out.)

For example, if you were looking for a user by the name of ADMIN, run the following search:

    grep -i "connection:" /nz/kit/log/postgres/pg.log.* | grep -i ADMIN

As of NPS Release 4.6, if you enable the Query History Collection and Reporting features, you should be able to use an SQL query similar to the following:
    select max(connecttime) from "$hist_session_prolog_1" where sessionusername = 'WHOMEVER';

[{"Product":{"code":"SSULQD","label":"IBM PureData System"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":null,"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.0.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Historical Number

NZ962169

Document Information

Modified date:
17 October 2019

UID

swg21574678