How to find the current active users in PGP
search cancel

How to find the current active users in PGP

book

Article ID: 375548

calendar_today

Updated On:

Products

Encryption Management Server

Issue/Introduction

How to find the current active users in PGP using a query?

Resolution

You can use the below query once you root to the pgp server:

psql oviddb ovidr -o /tmp/consumers.csv -c "COPY(SELECT co.uuid consumer_uuid, co.name, primary_email_address, cg.name policy_group, to_char(last_access, 'YYYY-MM-DD') last_access
FROM consumer co
JOIN consumer_group_member_cache_entry cache on cache.consumer_uuid = co.uuid
JOIN consumer_group cg ON cg.uuid = cache.group_uuid
JOIN internal_user iu ON iu.consumer_uuid = co.uuid
ORDER BY co.name) TO STDOUT WITH CSV HEADER"
 
You can download /tmp/consumers.csv import into Excel and sort by last_seen