Your IP:

Our Forums Have Moved!

Visit our new forums at https://community.opendns.com/forums/ to post on topics and read the latest content. These forums are now read-only archives.

K-12 Forums

Talk with other K-12 network administrators in your state.

Or see all states.

Categories

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

This discussion has been inactive for longer than 30 days, and is thus closed.
  1.  permalink
    Had two main questions.
    I downloaded fetchstats bash shell script and ran it. Interesting data. How do I go about adding it to cron (or something like that?) to run either daily or weekly. Since I need to feed the script the date range, anyone have a way to pull the current date in a script?

    Second question - I went through the data and tried to graph blocked sites. Just tryoing to wrap my self around what the data presents, and how to make it easier to understand. Anyone messing with LibreOffice Calc? Any hints on basic reports using Calc?
    • CommentAuthorrosch
    • CommentTimeMar 24th 2012 edited
     permalink
    "How do I go about adding it to cron"
    Use this command in a terminal: crontab -e
    Then add a line like so:
    50 23 * * 1-7 /path/to/file/mystats.sh > /path/to/csv/$(date).csv

    This would run 10min to midnight every day. Your machine has to run at this time for this to happen. Don't forget to change the paths to your existing ones. Also, since you want to automize this, you have to comment out lines 39-43 and set the password on line 44 like so:
    PASSWORD=opendns_password

    Instead of using "crontab -e" you can also use anacron. More info on the net :)

    This is what mystats.sh can look like (pulls today's opendns stats):
    fetchstats username network_name $(date +%Y-%m-%d)

    For LibreOffice Calc you should be able to find documentation online.
    Thankful People: rotblitz, zelus
  2.  permalink
    Thanks! I made fetchstats executable, edited and ran it to test the password part. Worked like a champ. Set up mystats.sh and ran that. Worked great! I installed Scheduler in Ubuntu and just used the GUI to set up the task. Not sure hw to kick it off now to test it, so will check it after it is scheduled to run. I appreciate your pointers - they got it running.

This discussion has been inactive for longer than 30 days, and is thus closed.