1. Pierre Bourdon
  2. smstats


smstats /

Filename Size Date modified Message
96 B
34.5 KB
1.5 KB
6.1 KB
1.3 KB
3.0 KB

smstats is a simple analytics tool I  created  to  see  how  much  EPITA  ING1
students are currently connected and working at school.  Starting as a  simple
global graph approximately showing the total number of students,  it  has  now
evolved to show the proportion of students in the  several  computer  labs  in
school and also generates daily and weekly graphs  for  each  of  these  labs.

The main production version of smstats is currently available on  my  website,
http://smstats.delroth.net/ .

Currently the code is dirty and very specific and it won't be of much  use  to
most people. However, it is going to be cleaned up soon.


This utility is mostly based on rrdtool, the round-robin database manipulation
framework.  smstats uses rrdtool to store the graph data and  generate  graphs
with the requested data.

The rrd_create.sh is used to create the initial RRD datastore, which  contains
several counters which are kept for two weeks. This datastore is then updated
by the stats.py script every minute.

stats.py is a Python script which connects to the EPITA Netsoul server to  get
the list of connected users, the IP address from where they are connected  and
their UNIX group.  It then counts all users from the  right  group  which  are
connected from inside the school  and  updates  the  RRD  datastore  with  the
according data.  Finally, it calls gen_site.sh which is a simple shell  script
generating the graphs and the static HTML webpages.