Difference between revisions of "Platform Team/Usage Statistics"

From Sugar Labs
Jump to navigation Jump to search
m
 
(19 intermediate revisions by one other user not shown)
Line 2: Line 2:
  
 
Sugar usage statistics might be very useful from, e.g., an educational or research point of view. Statistics might be anonymous or personalized (by taking special efforts to keep information secure and local for use only by a particular deployment).
 
Sugar usage statistics might be very useful from, e.g., an educational or research point of view. Statistics might be anonymous or personalized (by taking special efforts to keep information secure and local for use only by a particular deployment).
 +
 +
== Counter types ==
 +
 +
[[#Statistics|Measured]] statistic values might be one of the following types:
 +
 +
* ''absolute''<br>value to use as-is, e.g., amount of free disk space;
 +
* ''uptime''<br>number of seconds since event start, e.g., how long window is active; if event is not active, value will be reset to zero;
 +
* ''gauge''<br>is for things like temperatures or number of people in a room, i.e., value can grow and fall in time;
 +
* ''counter''<br>a counter, number of times event was triggered during single time frame; value can be more or equal to zero.
  
 
== Statistics ==
 
== Statistics ==
Line 8: Line 17:
  
 
* '''''shell'''''<br>Shell related stats.
 
* '''''shell'''''<br>Shell related stats.
** '''''shell.session'''''<br>Running activity.
+
** '''shell.uptime''' ''uptime''<br>How long Shell is running.
*** '''shell.session.uptime'''<br>How long Shell is running.
+
** '''shell.active''' ''uptime''<br>How long Shell window is on top.
*** '''shell.session.ontop'''<br>How long Shell window is on top.
+
** '''shell.friends''' ''absolute''<br>Number of buddies in the Groups view.
*** '''shell.session.buddies'''<br>Number of buddies in the Neighborhood view.
+
* '''''journal'''''<br>Journal related activity.
*** '''shell.session.friends'''<br>Number of buddies in the Groups view.
+
** '''journal.uptime''' ''uptime''<br>How long Journal is running.
 +
** '''journal.active''' ''uptime''<br>How long Journal window is on top.
 +
** '''journal.creates''' ''counter''<br>Number of create requests sent from the Journal window.
 +
** '''journal.updates''' ''counter''<br>Number of update requests sent from the Journal window.
 +
** '''journal.deletes''' ''counter''<br>Number of delete requests sent from the Journal window.
 
* '''''activity'''''<br>Activities related stats; specified only for the particular activity.
 
* '''''activity'''''<br>Activities related stats; specified only for the particular activity.
** '''''activity.session'''''<br>Running activity.
+
** '''activity.uptime''' ''uptime''<br>How long Activity is running.
*** '''activity.session.uptime'''<br>How long Activity is running.
+
** '''activity.active''' ''uptime''<br>How long Activity window is on top.
*** '''activity.session.ontop'''<br>How long Activity window is on top.
+
** '''activity.instances''' ''gauge''<br>How many instances launched.
*** '''activity.session.instances'''<br>How many instances launched.
+
** '''activity.new''' ''counter''<br>How many running instances with new Journal entity.
*** '''activity.session.new'''<br>How many running instances with new Journal entity.
+
** '''activity.resumed''' ''counter''<br>How many running instances with resumed Journal entity.
*** '''activity.session.resumed'''<br>How many running instances with resumed Journal entity.
+
** '''activity.buddies''' ''gauge''<br>Number of buddies Activity is interacting with for all running instances.
*** '''activity.session.buddies'''<br>Number of buddies Activity is interacting with for all running instances.
+
* '''''application'''''<br>Applications related stats in non-Sugar mode; specified only for the particular application.
** '''''activity.journal'''''<br>Journal related Activity's activities.
+
** '''application.uptime''' ''uptime''<br>How long application is running.
*** '''activity.journal.total'''<br>Total number of Journal entries for the Activity.
+
** '''application.active''' ''uptime''<br>How long application window is on top.
*** '''activity.journal.shared'''<br>Number of Journal entries that where shared.
+
* '''''network'''''<br>Network related stats.
*** '''activity.journal.annotated'''<br>For how many Journal entities metadata was changed by user.
+
** '''network.uptime''' ''uptime''<br>How long client is connected to the Internet.
 +
** '''network.school''' ''uptime''<br>How long client is connected to school network.
 
* '''''system'''''<br>System related stats.
 
* '''''system'''''<br>System related stats.
** '''system.uptime'''<br>System uptime value.
+
** '''system.uptime''' ''uptime''<br>System uptime value.
 +
** '''system.diskfree''' ''absolute''<br>How many storage space is free, in kilobytes, for the home directory.
  
 
== Implementation ==
 
== Implementation ==
  
=== Monitor ===
+
* [[Platform_Team/sugar-stats|sugar-stats]] library.
 
+
* [[Platform_Team/Server_Kit/sugar-client|sugar-client]] starting from 1.2 version, Sugar client complex solution that uses [[Sugar_Server_Kit/sugar-stats|sugar-stats]] library.
The usage statistics will be gathered by sniffing DBus and X11 messages in the [[Sugar_Server_Kit/sugar-client|sugar-client]] program launched with the {{Code|monitor}} command. The {{Code|sugar-client}} will stay in daemon mode, and send collected and filtered data to the [[Sugar_Server_Kit/sugar-server#collector|sugar-server]], or, will keep it for later collection in server-less environments.
 
 
 
=== Journal crawler ===
 
 
 
In addition to the realtime monitoring, it might be useful to collect some stats from the Journal. It should be possible to run this code on a client side, or, on school servers using Journal backups.
 
 
 
This feature was implemented in [http://wiki.paraguayeduca.org/index.php/Analisis_de_Uso_de_Actividades Paraguay], but is not being used right now.
 
 
 
=== Collector ===
 
 
 
=== Analyzer ===
 
  
 
== See also ==
 
== See also ==
  
 
* Paraguayan Activity usage [http://wiki.paraguayeduca.org/index.php/Analisis_de_Uso_de_Actividades analysis] basing on Journal records.
 
* Paraguayan Activity usage [http://wiki.paraguayeduca.org/index.php/Analisis_de_Uso_de_Actividades analysis] basing on Journal records.
* Australian [https://dev.laptop.org.au/issues/59 request] for statistics gathering.
+
* Australian [https://sugardextrose.org/issues/59 request] for statistics gathering.

Latest revision as of 00:45, 25 October 2012

Summary

Sugar usage statistics might be very useful from, e.g., an educational or research point of view. Statistics might be anonymous or personalized (by taking special efforts to keep information secure and local for use only by a particular deployment).

Counter types

Measured statistic values might be one of the following types:

  • absolute
    value to use as-is, e.g., amount of free disk space;
  • uptime
    number of seconds since event start, e.g., how long window is active; if event is not active, value will be reset to zero;
  • gauge
    is for things like temperatures or number of people in a room, i.e., value can grow and fall in time;
  • counter
    a counter, number of times event was triggered during single time frame; value can be more or equal to zero.

Statistics

All types of statistics are identified by IDs in a dot separated hierarchy. This makes it possible to refer to the particular type or level of data.

  • shell
    Shell related stats.
    • shell.uptime uptime
      How long Shell is running.
    • shell.active uptime
      How long Shell window is on top.
    • shell.friends absolute
      Number of buddies in the Groups view.
  • journal
    Journal related activity.
    • journal.uptime uptime
      How long Journal is running.
    • journal.active uptime
      How long Journal window is on top.
    • journal.creates counter
      Number of create requests sent from the Journal window.
    • journal.updates counter
      Number of update requests sent from the Journal window.
    • journal.deletes counter
      Number of delete requests sent from the Journal window.
  • activity
    Activities related stats; specified only for the particular activity.
    • activity.uptime uptime
      How long Activity is running.
    • activity.active uptime
      How long Activity window is on top.
    • activity.instances gauge
      How many instances launched.
    • activity.new counter
      How many running instances with new Journal entity.
    • activity.resumed counter
      How many running instances with resumed Journal entity.
    • activity.buddies gauge
      Number of buddies Activity is interacting with for all running instances.
  • application
    Applications related stats in non-Sugar mode; specified only for the particular application.
    • application.uptime uptime
      How long application is running.
    • application.active uptime
      How long application window is on top.
  • network
    Network related stats.
    • network.uptime uptime
      How long client is connected to the Internet.
    • network.school uptime
      How long client is connected to school network.
  • system
    System related stats.
    • system.uptime uptime
      System uptime value.
    • system.diskfree absolute
      How many storage space is free, in kilobytes, for the home directory.

Implementation

See also

  • Paraguayan Activity usage analysis basing on Journal records.
  • Australian request for statistics gathering.