How to get a list of users, devices and the last connection time for the devices

  • 7009826
  • 30-Nov-2011
  • 10-Dec-2013

Environment

Novell Data Synchronizer Mobility Pack

Situation

How to get a list of users, device types and the last connection time for the devices
How to export a list of users, devices and the last connection time for the devices

Resolution

The last connection time for the devices can be found by hovering the mouse over the Device on the WebAdmin page and it should show the last time the device connected. However, to get a list of users, device types and last connection time, please follow the steps listed below
  1. Type psql -U datasync_user mobility -c "select users.userid,devices.deviceid,devices.devicetype,devices.identifierstring,devices.tstamp from devices INNER JOIN users on devices.userid = users.guid" and press Enter
  2. Type in the password
    This will output the User ID, Device ID, Identifier String, and Last Date/Time the device connected
To output it in a file, replace the command in step 1 with
psql -U datasync_user mobility -c "select users.userid,devices.deviceid,devices.devicetype,devices.identifierstring,devices.tstamp from devices INNER JOIN users on devices.userid = users.guid"> /tmp/output
 
To output in an HTML format, replace the command in step 1 with
psql -U datasync_user mobility -c "select users.userid,devices.deviceid,devices.devicetype,devices.identifierstring,devices.tstamp from devices INNER JOIN users on devices.userid = users.guid" -H > /tmp/output.html