Skip to content
Natalie Wagenbrenner edited this page Sep 1, 2021 · 1 revision

Statistics

WindNinja mobile statistics are displayed here.

The statistics are assimilated and processed via scripts on the mobile server and the fire lab "wind" machine. The logging scripts can be found on the mobile server under /home/ubuntu/scripts and the log files are stored in /home/ubuntu/logs. The wind machine pulls the log files from /home/ubuntu/logs and generates graphics for display on the fire lab machine "breezy" (our windninja webpage server). There are README files in all directories explaining the workflow. Briefly, on the mobile server:

  1. recordStats.sh runs in a tmux session and constantly updates stats.log via an inotifywait command that watches for new jobs on the server.
  2. updateRegistrationsLog.sh (updates registrations.log with new user registrations), cleanUpOldJobs.sh (deletes jobs older than 2 days in job and queue), and mailFeedback.sh (forwards user feedback from the app to wind.ninja.support email; this may duplicate functionality now on the server and may no longer be needed) are running as cron jobs.

The "wind" machine has a script called mobileStats.R running as a cron job. This script scp's over registrations.log and stats.log from the mobile server, does some data processing, and generates a number of figures which are then scp'd to "breezy" for display on the WindNinja webpage.

Clone this wiki locally