[tor-commits] [metrics-web/master] Create stats directory if it doesn't exist.
karsten at torproject.org
karsten at torproject.org
Wed Jan 22 16:09:29 UTC 2014
commit 28b2e308dc03ad349e70d44f43409b1c2d2f4ec0
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date: Wed Jan 22 13:43:03 2014 +0100
Create stats directory if it doesn't exist.
---
shared/bin/50-run-legacy-stats.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/shared/bin/50-run-legacy-stats.sh b/shared/bin/50-run-legacy-stats.sh
index cd9131f..b2b9f1a 100755
--- a/shared/bin/50-run-legacy-stats.sh
+++ b/shared/bin/50-run-legacy-stats.sh
@@ -2,6 +2,7 @@
cd modules/legacy/
ant | grep "\[java\]"
psql -U metrics tordir -c 'SELECT * FROM refresh_all();'
+mkdir -p stats
psql -c 'COPY (SELECT * FROM stats_servers) TO STDOUT WITH CSV HEADER;' tordir > stats/servers.csv
psql -c 'COPY (SELECT * FROM stats_bandwidth) TO STDOUT WITH CSV HEADER;' tordir > stats/bandwidth.csv
psql -c 'COPY (SELECT * FROM stats_torperf) TO STDOUT WITH CSV HEADER;' tordir > stats/torperf.csv
More information about the tor-commits
mailing list