Difference between revisions of "Platform Team/sugar-stats"

From Sugar Labs
Jump to navigation Jump to search
Line 25: Line 25:
  
 
Server will authenticate clients using SSH keys generated on client side by Sugar Shell. To let server check client signatures, OpenSSH-5.6+ should be installed on server side. For less than 5.6 versions, authentication needs to be disabled using {{Code|trust-users}} parameter.
 
Server will authenticate clients using SSH keys generated on client side by Sugar Shell. To let server check client signatures, OpenSSH-5.6+ should be installed on server side. For less than 5.6 versions, authentication needs to be disabled using {{Code|trust-users}} parameter.
 +
 +
=== Configuration ===
 +
 +
Read the {{Code|/etc/sugar-stats.conf}} for explanation or run the following command to get current configuration with comments:
 +
 +
sugar-stats-server config
 +
 +
The important parameters that need to be set before using the server (for sugar-stats-server installed from packages there are initialized by meaningful values):
 +
 +
* {{Code|stats/stats-root = /var/lib/sugar-stats/rrd}}<br>Path to the root directory to place stats;
 +
* {{Code|active-document/data-root = /var/lib/sugar-stats/users}}<br>Path to the root directory to place documents' data and indexes;
  
 
== Getting the code ==
 
== Getting the code ==

Revision as of 15:17, 28 January 2012

Summary

Library to gather Sugar usage statistics. The gathering method is based on sniffing DBus and X11 events.

Supported Sugars

  • 0.94

More (0.86+) Sugar version might be added on demand.

Stats server

Project contains also a server which is based on active-document and restful-document and designed to be a part of Sugar Network and sugar-server implementations.

Standalone server might be launched using sugar-stats-server command from project sources. The easiest way is using binary package sugar-stats-server. The package contains:

  • sugar-stats-server command,
  • /etc/sugar-stats.conf default configuration,
  • /etc/init.d/sugar-stats daemon.

For stats transfering from clients, it is useful to use secure SSL connection. Server configuration needs to be tweaked (the client should use the same certificate):

  • stats-keyfile, path to server's private key,
  • stats-certificate, path to server's certificate file.

Server will authenticate clients using SSH keys generated on client side by Sugar Shell. To let server check client signatures, OpenSSH-5.6+ should be installed on server side. For less than 5.6 versions, authentication needs to be disabled using trust-users parameter.

Configuration

Read the /etc/sugar-stats.conf for explanation or run the following command to get current configuration with comments:

sugar-stats-server config

The important parameters that need to be set before using the server (for sugar-stats-server installed from packages there are initialized by meaningful values):

  • {{{1}}}
    Path to the root directory to place stats;
  • {{{1}}}
    Path to the root directory to place documents' data and indexes;

Getting the code

Library requires:

For using, library does not require any building routines, just provide full path to the active_document/ subdirectory via PYTHONPATH environment variable.

See examples/ subdirectory in the sources tree for usage examples.

See also

Getting involved

  • Report on bugs.
  • Read the HACKING file to know how to contribute with code.