YAMon 3.0... Usage Reporting by device per hr/day/mo

Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> General Questions
Goto page Previous  1, 2, 3 ... 71, 72, 73 ... 149, 150, 151  Next
Author Message
al_c
DD-WRT Guru


Joined: 13 Apr 2013
Posts: 2134
Location: Ottawa Canada

PostPosted: Sun Feb 12, 2017 3:44    Post subject: Re: USB Mount - YaMon Install Issues Reply with quote
TrisTheDog wrote:
Hi,

Hoping someone can shed some light on what I'm doing wrong in a YaMon install.

Here's the specifics...
Buffalo WZR-600DHP Router
Firmware: DD-WRT v3.0-r29660 std (05/12/16)

I have a 16GB USB stick formatted as Ext4 (as opt) and plugged into the router.

USB support enabled in the router setup.

I see the USB in the Disk Info section as follows:

--- /dev/sda1
Block device, size 14.59 GiB (15663628288 bytes)
Ext4 file system
Volume name "opt"
UUID 159DCE72-CAE4-4FE1-97BA-3957AA6578D3 (DCE, v4)
Volume size 14.59 GiB (15663628288 bytes, 3824128 blocks of 4 KiB)
/dev/sda1 mounted to /opt

However - when I connect (putty) to the router, I don't think I see the usb under the existing /opt directory.

If I issue "df -h", should I not see the 16GB of space available?

/opt does exist with a directory structure /opt/lib/iptables

Any idea what I'm missing? I've put the UUID in the "Mount this partition to /opt" field and rebooted with no change.

Don't want to proceed with install until I know the mount is as it should be.

Any ideas? Any other info I can provide?

Thanks,
Steve

steve - short answer... I'm stumped

I just re-flashed my backup router (TP-Link TL-WR1043ND) from OpenWrt to DD-WRT. I used MiniTool Partition Wizard (https://www.partitionwizard.com/) to format a new drive to ext4 with partition named `opt`.

The drive mounted no muss no fuss.

(BTW - MTPW is just a free tool that seems to work. I'm happy to promote something else if it works better.)


Al
Sponsor
ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1464

PostPosted: Wed Feb 15, 2017 7:34    Post subject: Reply with quote
I FOUND IT!

2017-02-14 00:00:01 0 === updateHourly2Monthly ===
2017-02-14 00:00:01 1 >>> Daily stats: day-> 14 #iterations--> 2760 total runtime--> 2967 Ave--> 1.075 min-> 0 max--> 2
2017-02-14 00:00:01 2 *** Hourly usage file not found (/opt/YAMon3//opt/data/2017/01/2017-02-14-hourly_data.js) (_organizeData:2)


_dataDir='/opt/data/'

_________________
Segment 1 XR700 10Gb LAN, 1Gb WAN ISP BS
Wired AP 1 Unifi Wifi 6 LR US 1Gb LAN
Wired AP 2 Unifi Wifi 6 LR US 1Gb LAN
Wired AP 3 Unifi Wifi 6 LR US 1Gb LAN
Syslog Services Asustor 7110T NAS 10GB
NetGear XS716T 10GB Switch
download1.dd-wrt.com/dd-wrtv2/downloads/betas/ (Brain Slayer)
YAMon https://usage-monitoring.com/index.php
al_c
DD-WRT Guru


Joined: 13 Apr 2013
Posts: 2134
Location: Ottawa Canada

PostPosted: Wed Feb 15, 2017 13:47    Post subject: Reply with quote
ddaniel51 wrote:
I FOUND IT!

2017-02-14 00:00:01 0 === updateHourly2Monthly ===
2017-02-14 00:00:01 1 >>> Daily stats: day-> 14 #iterations--> 2760 total runtime--> 2967 Ave--> 1.075 min-> 0 max--> 2
2017-02-14 00:00:01 2 *** Hourly usage file not found (/opt/YAMon3//opt/data/2017/01/2017-02-14-hourly_data.js) (_organizeData:2)


_dataDir='/opt/data/'


Dave - it looks you have specified an absolute path to the data directory (i.e., your data is in /opt/data/ rather than /opt/YAMon3/data/)... is that deliberate?

Did that change recently? If no, I have no idea how you were getting data in the past because there *is* a bug in /includes/hourly2monthly.sh - it does not properly account for absolute paths to the data directory - but that bug has been there for a long long time... likely since I created the separate file?!?

I will get a new version to you shortly for testing and then bump out v3.2.3

Sorry for the grief! Thanks for your persistence and assistance to track this down.

Al
ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1464

PostPosted: Wed Feb 15, 2017 15:04    Post subject: Reply with quote
Yes, /opt/data/ is deliberate and has been working fine for everything else.

I wanted to move my logs and data out of YAMon3 for those times when I just blow away the entire directory.

_________________
Segment 1 XR700 10Gb LAN, 1Gb WAN ISP BS
Wired AP 1 Unifi Wifi 6 LR US 1Gb LAN
Wired AP 2 Unifi Wifi 6 LR US 1Gb LAN
Wired AP 3 Unifi Wifi 6 LR US 1Gb LAN
Syslog Services Asustor 7110T NAS 10GB
NetGear XS716T 10GB Switch
download1.dd-wrt.com/dd-wrtv2/downloads/betas/ (Brain Slayer)
YAMon https://usage-monitoring.com/index.php
al_c
DD-WRT Guru


Joined: 13 Apr 2013
Posts: 2134
Location: Ottawa Canada

PostPosted: Wed Feb 15, 2017 16:04    Post subject: Reply with quote
ddaniel51 wrote:
Yes, /opt/data/ is deliberate and has been working fine for everything else.

I wanted to move my logs and data out of YAMon3 for those times when I just blow away the entire directory.


OK... I've got an update running on my test server and it seems to be fine with an absolute path for the data directory. I'll get that to you later this PM.

Al
sgniwder
DD-WRT Novice


Joined: 13 Nov 2008
Posts: 24

PostPosted: Wed Feb 15, 2017 17:02    Post subject: Reply with quote
al_c wrote:
ROfu wrote:
Question which i think relates to a previous post about bridging routers.
I currently have 2 routers setup - one in bridge mode (routed) and other as normal router.
YAMon and dd-wrt sees all devices on the bridged router as a single mac address (the bridging routers Mac address) all of the individual IPs are visible, but their mac addresses aren't.
Is there a way for YAMon to see these IPs as individual devices rather than assuming they are all the same device with multiple IPs ?

setting Bridge to 1 in the config including the IP doesn't split the devices, as I'm guessing because it still sees them as a single mac address ?

Alternatively does anyone know a way to allow the bridged router to pass through the mac addresses (much like apples routers in bridged mode do).

Cheers
ROfu


It appears that I broke the bridge functionality somewhere along the line...

All data tracking is done by MAC address because (in theory, at least) that should never change (however that is not entirely true... my son quickly figured out how to spoof his MACs to bypass access restrictions... the little rotter... but I digress)

So, as I was saying, the daily & monthly data files use the MAC as the primary key and `users.js` adds the IP as a secondary key...

On a bridged network, I expect the bridge itself should generate little or no traffic of its own. So in theory, if there is traffic matching the bridge MAC, I should be able to identify the originating device through it's IP address... presuming that
a) the device previously connected via the main router (so there is an entry in users.js), and
b) the device's IP address has not changed

I've added code that *should* make this change - i.e., if the mac matches the bridge and there is a unique match in users.js, the mac will be swapped - however, it does not quite seem to be working yet. And I don't have the time to modify my home network to test this configuration. So I'm counting on you and others in this situation to be the debugging team.

I just added some new debugging code to yamon3.1.8.sh and posted it to the web site (NB - I did not up-rev the version). The code will now dump the contents of two important variables to the log (but just once per hour to prevent your logs from becoming huge!)

The update can be obtained by running install.sh again or manually at http://usage-monitoring.com/manualInstall.php

Your help is appreciated!

Al


I am still unable to get this working so that the bridge doesn't add other devices. I have an Apple TV plugged in to the bridge and it still shows up as the router (both IP and traffic). When my other devices are in the vicinity and using that WAP, then these devices show as bridge data as well. I do have include Bridge with the MAC of the bridge in the config file and have adjusted the users file while stopped, but it still reverts back. Do I need to change something or can I help test this?

_________________
Netgear R8000 - r50814 std - Main Router
Asus RT-AC68R -r46329 std - AP
Asus RT-AC68R -r46329 std - AP
TEW811DRU -r50595 mini - AP
TEW811DRU -r50595 mini - AP
al_c
DD-WRT Guru


Joined: 13 Apr 2013
Posts: 2134
Location: Ottawa Canada

PostPosted: Thu Feb 16, 2017 6:11    Post subject: I just posted YAMon v3.2.3 Reply with quote
al_c wrote:
ddaniel51 wrote:
Yes, /opt/data/ is deliberate and has been working fine for everything else.

I wanted to move my logs and data out of YAMon3 for those times when I just blow away the entire directory.


OK... I've got an update running on my test server and it seems to be fine with an absolute path for the data directory. I'll get that to you later this PM.

Al


YAMon v3.2.3 is now available for download from the usual location.

Among other things, I fixed the issue with absolute paths to the data directory and related issues in a couple of other files.

Also included in this release is a new `compare.sh` script which will (oddly enough) compare or synchronize the files on your router with those at usage-monitoring.com.

Run the script by entering `/opt/YAMon3/compare.sh`
Enter `s` to sync the files or anything else to just compare.

If you choose `s` at the prompt, any missing or differing files will be copied to your router and you will be prompted to restart the script.


Let me know if you have any questions or concerns.

All the best.
ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1464

PostPosted: Thu Feb 16, 2017 15:11    Post subject: Reply with quote
Thanks Al.

Today is the start of my new month so it'll be a couple of days to check it.

_________________
Segment 1 XR700 10Gb LAN, 1Gb WAN ISP BS
Wired AP 1 Unifi Wifi 6 LR US 1Gb LAN
Wired AP 2 Unifi Wifi 6 LR US 1Gb LAN
Wired AP 3 Unifi Wifi 6 LR US 1Gb LAN
Syslog Services Asustor 7110T NAS 10GB
NetGear XS716T 10GB Switch
download1.dd-wrt.com/dd-wrtv2/downloads/betas/ (Brain Slayer)
YAMon https://usage-monitoring.com/index.php
al_c
DD-WRT Guru


Joined: 13 Apr 2013
Posts: 2134
Location: Ottawa Canada

PostPosted: Thu Feb 16, 2017 15:47    Post subject: Reply with quote
ddaniel51 wrote:
Thanks Al.

Today is the start of my new month so it'll be a couple of days to check it.
Good timing by me then Smile

Let me know how it goes.

Al
al_c
DD-WRT Guru


Joined: 13 Apr 2013
Posts: 2134
Location: Ottawa Canada

PostPosted: Fri Feb 17, 2017 4:11    Post subject: Reply with quote
The following question can to me via usage-monitoring.com
dan wrote:

Hi Al,

In the recent installations, I can see my files piling up in my YAMon3 direcotry full of every old release after i update. Would it be possible to delete this without affecting my existing data (monthly download data)?

Thanks,

It's a good question... one that I probably should've addressed previously.

The answer is yes, you can safely delete (or remove) the files from previous reasons from your router (e.g., yamon3.2.1.sh, includes/util3.2.1.sh, etc.). The only reason for keeping them around is in case you want to roll back to an earlier version (which you can now do by simply changing the version number in versions.sh).

At some point in the future, I might add a new function to install.sh or setup.sh that zips up the no longer relevant files and moves them to a backup folder.

As always, thanks for the feedback.

Al
ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1464

PostPosted: Fri Feb 17, 2017 16:30    Post subject: Reply with quote
al_c wrote:
ddaniel51 wrote:
Thanks Al.

Today is the start of my new month so it'll be a couple of days to check it.
Good timing by me then Smile

Let me know how it goes.

Al


Appears to be ok picking up multiple days.

Tnx

_________________
Segment 1 XR700 10Gb LAN, 1Gb WAN ISP BS
Wired AP 1 Unifi Wifi 6 LR US 1Gb LAN
Wired AP 2 Unifi Wifi 6 LR US 1Gb LAN
Wired AP 3 Unifi Wifi 6 LR US 1Gb LAN
Syslog Services Asustor 7110T NAS 10GB
NetGear XS716T 10GB Switch
download1.dd-wrt.com/dd-wrtv2/downloads/betas/ (Brain Slayer)
YAMon https://usage-monitoring.com/index.php
al_c
DD-WRT Guru


Joined: 13 Apr 2013
Posts: 2134
Location: Ottawa Canada

PostPosted: Fri Feb 17, 2017 16:50    Post subject: Reply with quote
ddaniel51 wrote:
al_c wrote:
ddaniel51 wrote:
Thanks Al.

Today is the start of my new month so it'll be a couple of days to check it.
Good timing by me then Smile

Let me know how it goes.

Al


Appears to be ok picking up multiple days.

Tnx
Yeah!!!!
promoguy
DD-WRT Novice


Joined: 17 Feb 2017
Posts: 4

PostPosted: Fri Feb 17, 2017 17:01    Post subject: Reply with quote
Just installed yamon. Everything seems fine but it is only showing the router as being connected and none of the other devices. Do I add the macs or static ips somewhere? Literally just installed and cant find anything related.

Any ideas? Thank you
al_c
DD-WRT Guru


Joined: 13 Apr 2013
Posts: 2134
Location: Ottawa Canada

PostPosted: Fri Feb 17, 2017 18:13    Post subject: Reply with quote
promoguy wrote:
Just installed yamon. Everything seems fine but it is only showing the router as being connected and none of the other devices. Do I add the macs or static ips somewhere? Literally just installed and cant find anything related.

Any ideas? Thank you


Is your router the DHCP server on your network?
promoguy
DD-WRT Novice


Joined: 17 Feb 2017
Posts: 4

PostPosted: Fri Feb 17, 2017 18:14    Post subject: Reply with quote
al_c wrote:
promoguy wrote:
Just installed yamon. Everything seems fine but it is only showing the router as being connected and none of the other devices. Do I add the macs or static ips somewhere? Literally just installed and cant find anything related.

Any ideas? Thank you


Is your router the DHCP server on your network?


Correct, using Netgear WNDR4300 DD-WRT v3.0-r30880 std with DHCP set to automatic. Would I change that to static?

I have no problem donating for support. Tried a bunch of things but no luck thus far.

Edit: Data isnt being updated anymore either.

More info

Model: Netgear WNDR4300

Firmware Version: DD-WRT v3.0-r30880 std (11/14/16)

Kernel Version: Linux 3.18.42 #2681 Mon Nov 14 07:24:26 CET 2016 mips

DHCP Set to Automatic Configuration

DHCP Type: Sever

DHCP Server: Enabled
Goto page Previous  1, 2, 3 ... 71, 72, 73 ... 149, 150, 151  Next Display posts from previous:    Page 72 of 151
Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum