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

From Sugar Labs
Jump to navigation Jump to search
Line 41: Line 41:
 
* Gitorious [http://git.sugarlabs.org/server/stats sources] repository.
 
* Gitorious [http://git.sugarlabs.org/server/stats sources] repository.
 
* Binary [http://download.sugarlabs.org/packages/Server:/Factory/ packages] build for distributions [[Sugar_Server_Kit#Supported_platforms|supported]] by SSK.
 
* Binary [http://download.sugarlabs.org/packages/Server:/Factory/ packages] build for distributions [[Sugar_Server_Kit#Supported_platforms|supported]] by SSK.
 +
 +
In use, the library does not require any building routines, just provide the full path to the {{Code|active_document/}} subdirectory via the {{Code|PYTHONPATH}} environment variable.
 +
 +
See the [http://git.sugarlabs.org/server/stats/trees/master/examples examples/] subdirectory in the sources tree for usage examples.
  
 
===Library requirements===
 
===Library requirements===
  
 
* RRDtool [http://oss.oetiker.ch/rrdtool/prog/rrdpython.en.html python binding].
 
* RRDtool [http://oss.oetiker.ch/rrdtool/prog/rrdpython.en.html python binding].
 
In use, the library does not require any building routines, just provide the full path to the {{Code|active_document/}} subdirectory via the {{Code|PYTHONPATH}} environment variable.
 
 
See the [http://git.sugarlabs.org/server/stats/trees/master/examples examples/] subdirectory in the sources tree for usage examples.
 
  
 
== See also ==
 
== See also ==

Revision as of 02:50, 29 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 versions might be added on demand.

Stats server

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

A standalone server might be launched using the sugar-stats-server command from project sources. The easiest way is using the binary package sugar-stats-server. The package contains these components:

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

For stats transferring from clients, it is useful to use secure, SSL connections. The server configuration needs to be tweaked (and 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 the client side by Sugar Shell. To let the server check client signatures, OpenSSH-5.6+ should be installed on the server side. For versions lower than 5.6, authentication needs to be disabled using the trust-users parameter.

Configuration

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

sugar-stats-server config

These important parameters need to be set before using the server. (When sugar-stats-server is installed from packages, they are initialized to meaningful values.):

  • stats/stats-root = /var/lib/sugar-stats/rrd
    Path to the root directory for placing stats;
  • active-document/data-root = /var/lib/sugar-stats/users
    Path to the root directory for placing users' metadata;

Getting the code

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

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

Library requirements

See also

Getting involved

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