Version 1.10.0 : New stable version with critical security fixes

The latest news about Gargoyle

Moderator: Moderators

rseiler
Posts: 197
Joined: Sun Dec 15, 2013 12:31 am

Re: Version 1.10.0 : New stable version with critical security fixes

Post by rseiler »

If you go to the Reboot menu and reboot, is it expected that the day's bandwidth tally resets? I thought it used to be retained before this release.

ispyisail
Moderator
Posts: 4809
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: Version 1.10.0 : New stable version with critical security fixes

Post by ispyisail »

rseiler wrote:If you go to the Reboot menu and reboot, is it expected that the day's bandwidth tally resets? I thought it used to be retained before this release.


I think it writes to the flash every 4 hours?

https://www.gargoyle-router.com/wiki/do ... _the_flash

rseiler
Posts: 197
Joined: Sun Dec 15, 2013 12:31 am

Re: Version 1.10.0 : New stable version with critical security fixes

Post by rseiler »

ispyisail wrote:I think it writes to the flash every 4 hours?

https://www.gargoyle-router.com/wiki/do ... _the_flash

Yes, I think so too, but that would be for unplanned reboots (power loss). I don't think it's working either though, since daily BW resets to zero any way you reboot. Worst-case should be from 4 hours ago. The page you linked to shows "backup_script," which doesn't seem to exist by that name (searched with WinSCP). Perhaps it's hidden in some way.

For planned reboots, the source of the reboot page suggests that reboot.sh is executed before the reboot. It contains, among other things, the "backup_quotas" command, which also doesn't seem to exist by that name. Perhaps also hidden, but without being able to view it, it's a little hard to tell what it's supposed to do.

My memory suggests though that there's no way things used to reset to zero.

Lantis
Moderator
Posts: 5533
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Version 1.10.0 : New stable version with critical security fixes

Post by Lantis »

Backup_quotas is a valid shell command. It’s a program not a script.
I think it is in /usr/bin or /sbin
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

d3fz
Posts: 269
Joined: Sun Aug 28, 2016 7:34 pm

Re: Version 1.10.0 : New stable version with critical security fixes

Post by d3fz »

rseiler wrote:The page you linked to shows "backup_script"/"backup_quotas" command which doesn't seem to exist by that name (searched with WinSCP). Perhaps it's hidden in some way.

The information data on the linked page is actually outdated. Both commands can be found in crontab's tasks, which contains the following:

Code: Select all

0 0,4,8,12,16,20 * * * /usr/bin/backup_quotas >/dev/null 2>&1
0 0,4,8,12,16,20 * * * /tmp/bw_backup/do_bw_backup.sh

Quick noob question about crontab's tasks:

Code: Select all

0 0,4,8,12,16,20 * * * /usr/bin/backup_quotas >/dev/null 2>&1
0 0,4,8,12,16,20 * * * /tmp/do_webmon_backup.sh
0 0,4,8,12,16,20 * * * /tmp/bw_backup/do_bw_backup.sh

Since they're all set to be executed at the exact same time, does one task interfere with the other ? (Heavier/lighter task, for example)
TP-Link Archer C7 v2 - Gargoyle 1.12.X
TP-Link WR842ND v2 - Gargoyle 1.10.X
TP-Link RE450 AC v2 - Stock FW 1.0.4
TP-Link WA850RE v1.2 - LEDE 17.01.1

rseiler
Posts: 197
Joined: Sun Dec 15, 2013 12:31 am

Re: Version 1.10.0 : New stable version with critical security fixes

Post by rseiler »

d3fz wrote:

Code: Select all

0 0,4,8,12,16,20 * * * /usr/bin/backup_quotas >/dev/null 2>&1
0 0,4,8,12,16,20 * * * /tmp/bw_backup/do_bw_backup.sh

Looking in /etc/crontabs/root on mine, the relevant lines are:

Code: Select all

0 0,4,8,12,16,20 * * * /tmp/do_webmon_backup.sh
0 0,4,8,12,16,20 * * * /tmp/bw_backup/do_bw_backup.sh

I wonder why the difference?

I didn't find backup_quotas earlier because when searching in Linux, apparently you don't want to search on something like "backup*.*" if what you want to find might not have an extension. Unlike DOS/Windows. Anyway, there it is in /usr/bin.

If it's meant to only backup quotas, then that would explain why executing a planned reboot (which invokes backup_quotas) does nothing for BW saving.

In that case, it would come down to the one that runs every 4 hours, do_bw_backup.sh. Can anyone confirm that today's BW (not past days) actually survives reboot, assuming you've had the router up for > 4 hours and have used BW in that time?

d3fz
Posts: 269
Joined: Sun Aug 28, 2016 7:34 pm

Re: Version 1.10.0 : New stable version with critical security fixes

Post by d3fz »

rseiler wrote:

Code: Select all

0 0,4,8,12,16,20 * * * /tmp/do_webmon_backup.sh
0 0,4,8,12,16,20 * * * /tmp/bw_backup/do_bw_backup.sh

I wonder why the difference?

What difference you're referring to ?
TP-Link Archer C7 v2 - Gargoyle 1.12.X
TP-Link WR842ND v2 - Gargoyle 1.10.X
TP-Link RE450 AC v2 - Stock FW 1.0.4
TP-Link WA850RE v1.2 - LEDE 17.01.1

rseiler
Posts: 197
Joined: Sun Dec 15, 2013 12:31 am

Re: Version 1.10.0 : New stable version with critical security fixes

Post by rseiler »

d3fz wrote:What difference you're referring to ?

Our first lines are completely different.

d3fz
Posts: 269
Joined: Sun Aug 28, 2016 7:34 pm

Re: Version 1.10.0 : New stable version with critical security fixes

Post by d3fz »

Do you use Quotas? This line only shows on crontab if you have at least one quota rule defined, but not necessarily active/enabled.

Code: Select all

0 0,4,8,12,16,20 * * * /usr/bin/backup_quotas >/dev/null 2>&1
TP-Link Archer C7 v2 - Gargoyle 1.12.X
TP-Link WR842ND v2 - Gargoyle 1.10.X
TP-Link RE450 AC v2 - Stock FW 1.0.4
TP-Link WA850RE v1.2 - LEDE 17.01.1

rseiler
Posts: 197
Joined: Sun Dec 15, 2013 12:31 am

Re: Version 1.10.0 : New stable version with critical security fixes

Post by rseiler »

d3fz wrote:Do you use Quotas? This line only shows on crontab if you have at least one quota rule defined, but not necessarily active/enabled.

I don't, so that explains it.

And the line of mine that you're missing, now that I think about it, suggests that I have Web monitoring enabled...and sure enough, the UI says that I do. I've never enabled it, but I have seen it enable itself before, and I wonder how long that it's been enabled this time. I'll have to keep an eye on it.

Now I only have one line in root related to what we're talking about.

Post Reply