webbw is back
[hcoop/portal.git] / stats.sig
CommitLineData
b6e23181
AC
1signature STATS =
2sig
3 type host = {ssl : bool, (* Is it HTTPS? *)
4 hostname : string, (* Internet hostname *)
5 id : string} (* Name of stats directory *)
6
b13a9a37
AC
7 val getWebbw : int -> {total : int,
8 vhosts: {host : host, size : int} list,
9 users : {user : string, hosts : host list, size : int} list}
b6e23181
AC
10 (* Get web bandwidth usage stats. The argument tells how many months ago
11 * to look for the data. The return gives the total b/w usage, a mapping from
12 * vhosts to kilobytes, and a mapping from usernames to their vhosts and bandwidth
13 * totals. *)
14
15 type disk = {uname : string, (* UNIX username *)
16 blocks : int, (* Number of disk blocks used *)
17 files : int} (* Number of files used *)
18
19 val getDiskUsage : unit -> disk list
20 (* Get /home disk usage statistics, in descending blocks order. *)
21end