Difference between revisions of "AppSuite:Logincounter"

 
Line 1: Line 1:
 
= Login Counter =
 
= Login Counter =
  
Whenever a user is logged in through the login servlet, the context id, user id, client identification string and a time stamp is saved to the database. If a database entry for this combination of context, user and client is already present, only the timestamp is updated. This means that the database holds the information for the '''last''' login of a specific user with a specific client. This data can be retrieved again with the <code>logincounter</code> tool to show how many users logged in through which client(s) in a given timeframe.
+
The content on this page has moved to https://documentation.open-xchange.com/7.10.0/middleware/components/commandlinetools/logincounter.html.
  
Please note that only '''logins''' are counted. Depending on the server configuration and the client, sessions may be reused when a user re-accesses the system even after a few hours or days. In this case the login timestamp is not updated. This means that <tt>logincounter</tt> does not necessarily show the number of active users, especially if the request only covers a short timeframe.
+
Note: Open-Xchange is in the process of migrating all its technical documentation to a new and improved documentation system (https://documentation.open-xchange.com). Please note as the migration takes place more information will be available on the new system and less on this system. Thank you for your understanding during this period of transition.
 
 
The clients provided by Open-Xchange use the following client identification strings:
 
 
 
{|
 
|-
 
!Client
 
!client identification string
 
|-
 
|Open-Xchange AppSuite (Web UI)
 
|<tt>open-xchange-appsuite</tt>
 
|-
 
|Open-Xchange Server 6 (Web UI)
 
|<tt>com.openexchange.ox.gui.dhtml</tt>
 
|-
 
|Connector for Business Mobility (Active Sync)
 
|<tt>USM-EAS</tt>
 
|-
 
|Connector 2 for Microsoft Outlook
 
|<tt>USM-JSON</tt>
 
|-
 
|OX Notifier
 
|<tt>OpenXchange.HTTPClient.OXNotifier</tt>
 
|-
 
|CardDAV
 
|<tt>CARDDAV</tt>
 
|-
 
|CalDAV
 
|<tt>CALDAV</tt>
 
|-
 
|Mobile Web App (legacy, OX6 generation)
 
|<tt>com.openexchange.mobileapp</tt>
 
|-
 
|OX Drive (native iOS client)
 
|<tt>OpenXchange.iosClient.OXDrive</tt>
 
|-
 
|OX Drive (native Android client)
 
|<tt>OpenXchange.Android.OXDrive</tt>
 
|-
 
|OX Drive (native Mac OS X client)
 
|<tt>OSX.OXDrive</tt>
 
|-
 
|OX Drive (native Windows client)
 
|<tt>OpenXchange.HTTPClient.OXDrive</tt>
 
|}
 
 
 
A custom login page (see [[Open-Xchange_servlet_for_external_login_masks]]) may (and should) set a custom client identification string.
 
 
 
The output of <code>logincounter</code> can be filtered by client identification strings with the <code>-r</code> or <code>--regex</code> parameter followed by a regular expression matching the desired string(s).
 
 
 
== Using the <code>logincounter</code> tool ==
 
 
 
 
 
  # logincounter --help
 
  usage: logincounter
 
  -a,--aggregate    Optional. Aggregates the counts by users. Only the
 
                      total number of logins without duplicate counts
 
                      (caused by multiple clients per user) is returned.
 
  -e,--end <arg>    Required. Sets the end date for the detecting range.
 
                      Example: 2010-01-1 23:59:59
 
  -h,--help          Prints a help text
 
  -r,--regex <arg>  Optional. Limits the counter to login devices that
 
                      match regex.
 
  -s,--start <arg>  Required. Sets the start date for the detecting range.
 
                      Example: 2009-12-31 00:00:00
 
 
 
== Examples ==
 
 
 
Show all logins in the month of June 2014 by clients:
 
 
 
  $ /opt/open-xchange/sbin/logincounter -s "2014-06-01 00:00:00" -e "2014-06-30 23:59:59"
 
 
 
Show all logins in the month of June 2014, but remove duplicate logins from the "Total" count. (This means a user who logged in with two different clients is only counted once in the total count.)
 
 
 
  $ /opt/open-xchange/sbin/logincounter -s "2014-06-01 00:00:00" -e "2014-06-30 23:59:59" -a
 
 
 
Restrict output to logins through any OX Drive client:
 
 
 
  $ /opt/open-xchange/sbin/logincounter -s "2014-06-01 00:00:00" -e "2014-06-30 23:59:59" -r ".*OXDrive"
 
 
 
Same as above, but remove duplicates in the total count (i.e. users using OX Drive on two platforms are only counted once):
 
 
 
  $ /opt/open-xchange/sbin/logincounter -s "2014-06-01 00:00:00" -e "2014-06-30 23:59:59" -r ".*OXDrive" -a
 
 
 
Show all logins through the App Suite Web UI:
 
 
 
  $ logincounter -s "2014-06-01 00:00:00" -e "2014-06-30 23:59:59" -r "open-xchange-appsuite"
 
 
 
Show all logins through either the App Suite or the Open-Xchange Server 6 Web UI:
 
 
 
  $ logincounter -s "2014-06-01 00:00:00" -e "2014-06-30 23:59:59" -r "(open-xchange-appsuite|com.openexchange.ox.gui.dhtml)"
 

Latest revision as of 11:05, 9 July 2018

Login Counter

The content on this page has moved to https://documentation.open-xchange.com/7.10.0/middleware/components/commandlinetools/logincounter.html.

Note: Open-Xchange is in the process of migrating all its technical documentation to a new and improved documentation system (https://documentation.open-xchange.com). Please note as the migration takes place more information will be available on the new system and less on this system. Thank you for your understanding during this period of transition.