I'm trying to save historical bandwidth usage, in 15 minute blocks. To do this, I think I need to periodically (daily?) download the bandwidth.csv file and store it.
I'm having trouble accessing that file programatically.
I've tried using several different clients (a few that I know work with other sites) using basic authentication via http(s). Is this expected to work? I keep getting re-directed to the login page. For username, I've tried '', 'Admin', 'admin', 'root'.
Should I just use ssh instead? I'm less familiar with ssh, but could probably figure it out if bandwidth.csv exists as a file on the Gargoyle file system.
Any help is appreciated!
Thanks,
Kyle
Trouble programatically downloading bandwidth.csv
Moderator: Moderators
Re: Trouble programatically downloading bandwidth.csv
I solved this by switching to ssh. Had to do a some digging in these forums to find out how to do it ... but I ended up doing the following:
1) Changed /etc/init.d/bwmon_gargoyle
- For bdist2, changed the number of intervals from 24 to 96 (to get a whole 24 hrs worth of 15 minute intervals)
2) Re-booted gargoyle
3) Used the following command in ssh:
4) Used plink to get it from the command line:
4) Created a daily scheduled task in windows task scheduler to execute the plink command and store it to a file.
edit:ispy Just format
1) Changed /etc/init.d/bwmon_gargoyle
- For bdist2, changed the number of intervals from 24 to 96 (to get a whole 24 hrs worth of 15 minute intervals)
2) Re-booted gargoyle
3) Used the following command in ssh:
Code: Select all
"bw_get -i bdist2-upload-900-96 -h"
Code: Select all
plink root@192.168.1.1 -pw {PW} "bw_get -i bdist2-upload-900-96 -h"
edit:ispy Just format
Re: Trouble programatically downloading bandwidth.csv
Nice solution.
Thanks for sharing it
Thanks for sharing it
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
Please be respectful when posting. I do this in my free time on a volunteer basis.