YAMon v4... usage totals by device

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Goto page Previous  1, 2, 3 ... 9, 10, 11 ... 16, 17, 18  Next
Author Message
al_c
DD-WRT Guru


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

PostPosted: Sat Mar 21, 2020 23:11    Post subject: Re: Data File Transfer Reply with quote
WinterBlues wrote:
The data files transferred from YAMon3 are renamed but their file format is not the same as that of the YAMon4 data files.


Yup - that is OK (in fact, it is as designed). When the data files are loaded, they call JS functions which (AFAIK) still work with the old functions.

Al

_________________
Thanks to everyone for supporting YAMon!

If you use and like YAMon and have not done so recently, please consider making a donation - thanks!
YAMon GitHub Repository
Sponsor
WinterBlues
DD-WRT Novice


Joined: 26 Jan 2020
Posts: 4

PostPosted: Sun Mar 22, 2020 17:20    Post subject: YAMon3 Data Files Not Read With YAMon4 Reply with quote
Thanks for the quick reply Al. Still not able to read previous YAMon3 data files with YAMon4. Troubleshooting I cleared the iptables and then removed YAMon4 from the router. Ran a completely new YAMon4 install. Old YAMon3 data files were transferred to YAMon4 but data isn't accessible. Tried rebooting router. No luck.

Has anyone else been successful at transferring their YAMon3 data to YAMon4?
al_c
DD-WRT Guru


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

PostPosted: Sun Mar 22, 2020 17:26    Post subject: Re: YAMon3 Data Files Not Read With YAMon4 Reply with quote
WinterBlues wrote:
Thanks for the quick reply Al. Still not able to read previous YAMon3 data files with YAMon4. Troubleshooting I cleared the iptables and then removed YAMon4 from the router. Ran a completely new YAMon4 install. Old YAMon3 data files were transferred to YAMon4 but data isn't accessible. Tried rebooting router. No luck.

Has anyone else been successful at transferring their YAMon3 data to YAMon4?

I presume the error is in the reports, right? please send screenshots. Also, look for errors in the JS console (accessed via `F12` or <ctrl>+<shift>+`J` in Firefox & Chrome in Windows 10... you might use other keystrokes in other browsers/OSs)

Also, please send a screenshot of the contents of one of your data directories. I presume that you have things organized by month... right?

Al

_________________
Thanks to everyone for supporting YAMon!

If you use and like YAMon and have not done so recently, please consider making a donation - thanks!
YAMon GitHub Repository
WinterBlues
DD-WRT Novice


Joined: 26 Jan 2020
Posts: 4

PostPosted: Sun Mar 22, 2020 20:40    Post subject: Reply with quote
I hope this is what you're looking for.


Untitled1.png
 Description:
 Filesize:  99.83 KB
 Viewed:  6678 Time(s)

Untitled1.png



Untitled.png
 Description:
 Filesize:  162.95 KB
 Viewed:  6678 Time(s)

Untitled.png


al_c
DD-WRT Guru


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

PostPosted: Sun Mar 22, 2020 20:49    Post subject: Reply with quote
WinterBlues wrote:
I hope this is what you're looking for.

Yes - that is exactly what I hoped to see (and not to see).

Sorry - I have clearly broken things in the reports. The ball is entirely in my court as the error is in the JS files at usage-monitoring.com rather than on your router. I'll have to dig into that code to see where I've f*cked up.

I'll look into this right away

Al

_________________
Thanks to everyone for supporting YAMon!

If you use and like YAMon and have not done so recently, please consider making a donation - thanks!
YAMon GitHub Repository
BarkingSpider
DD-WRT User


Joined: 29 Jan 2014
Posts: 98

PostPosted: Tue Mar 24, 2020 19:58    Post subject: compare.sh no longer works? Reply with quote
in YAMon4, I tried to do the compare.sh (./compare.sh) and it fails:
root@Bo:/opt/YAMon4/Setup# ls -l comp*
-rwxrwx--- 1 root root 6381 Mar 24 12:44 compare.sh
root@Bo:/opt/YAMon4/Setup# ./compare.sh
-sh: ./compare.sh: not found

Looking into the script, there are ^M at the end of each line. Problem?

#!/bin/sh^M
^M
##########################################################################^M
# Yet Another Monitor (YAMon)^M
# Copyright (c) 2013-present Al Caughey^M
# All rights reserved.^M

_________________
Netgear R7800: DD-WRT v3.0-r47822 std (12/09/21)
Linksys wrt1900acsV2: DD-WRT v3.0-r47822 std (12/09/21)
ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1464

PostPosted: Fri Mar 27, 2020 18:35    Post subject: Re: compare.sh no longer works? Reply with quote
Those are simply carriage returns your editor is showing you. It's normal.

BarkingSpider wrote:
in YAMon4, I tried to do the compare.sh (./compare.sh) and it fails:
root@Bo:/opt/YAMon4/Setup# ls -l comp*
-rwxrwx--- 1 root root 6381 Mar 24 12:44 compare.sh
root@Bo:/opt/YAMon4/Setup# ./compare.sh
-sh: ./compare.sh: not found

Looking into the script, there are ^M at the end of each line. Problem?

#!/bin/sh^M
^M
##########################################################################^M
# Yet Another Monitor (YAMon)^M
# Copyright (c) 2013-present Al Caughey^M
# All rights reserved.^M

_________________
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
ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1464

PostPosted: Fri Mar 27, 2020 22:30    Post subject: Reply with quote
What is wrong with this picture?

# generated 2020-03-27 15:26:13

#Generic functions
_path2logs='/opt/logs4/'
_path2data='/opt/data4/'
dailyLogFile='/opt/YAMon4/logs/2020-03-27.html'

_________________
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: Mon Mar 30, 2020 21:06    Post subject: Re: compare.sh no longer works? Reply with quote
ddaniel51 wrote:
Those are simply carriage returns your editor is showing you. It's normal.

BarkingSpider wrote:
in YAMon4, I tried to do the compare.sh (./compare.sh) and it fails:
root@Bo:/opt/YAMon4/Setup# ls -l comp*
-rwxrwx--- 1 root root 6381 Mar 24 12:44 compare.sh
root@Bo:/opt/YAMon4/Setup# ./compare.sh
-sh: ./compare.sh: not found

Looking into the script, there are ^M at the end of each line. Problem?

#!/bin/sh^M
^M
##########################################################################^M
# Yet Another Monitor (YAMon)^M
# Copyright (c) 2013-present Al Caughey^M
# All rights reserved.^M


Actually, I've found that running compare sometimes fails if compare.sh is one of the files that has been updated. And, TBH, I don't know how to fix this yet.

If you run it again, the problem often goes away.

Also, scripts not run properly in PuTTY if they are saved with Windows CR/LF end-of-line markers... and you sometimes get weird error messages.
Open the file in NotePad++ and choose View-->Show Symbol-->Show end of line

If you see just `LF`, you're fine.
If you see `CR``LF` at the end of everyline, then things likely won't run properly.

To change things, choose Edit-->EOL Conversion-->Unix (LF) and then save the file. (you might want to turn off the show symbols option too)

If you've downloaded things in the last week or two, all files should have the proper EOL markers (I recently added code to ensure this).

Al

_________________
Thanks to everyone for supporting YAMon!

If you use and like YAMon and have not done so recently, please consider making a donation - thanks!
YAMon GitHub Repository
al_c
DD-WRT Guru


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

PostPosted: Mon Mar 30, 2020 21:10    Post subject: Reply with quote
ddaniel51 wrote:
What is wrong with this picture?

# generated 2020-03-27 15:26:13

#Generic functions
_path2logs='/opt/logs4/'
_path2data='/opt/data4/'
dailyLogFile='/opt/YAMon4/logs/2020-03-27.html'


How did you make it do that?!? When did this happen? On restart? At the end of the day? Does anything appear in the logs?

Thx.

_________________
Thanks to everyone for supporting YAMon!

If you use and like YAMon and have not done so recently, please consider making a donation - thanks!
YAMon GitHub Repository
al_c
DD-WRT Guru


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

PostPosted: Mon Mar 30, 2020 22:32    Post subject: Re: compare.sh no longer works? Reply with quote
BarkingSpider wrote:
in YAMon4, I tried to do the compare.sh (./compare.sh) and it fails:
root@Bo:/opt/YAMon4/Setup# ls -l comp*
-rwxrwx--- 1 root root 6381 Mar 24 12:44 compare.sh
root@Bo:/opt/YAMon4/Setup# ./compare.sh
-sh: ./compare.sh: not found

Looking into the script, there are ^M at the end of each line. Problem?

#!/bin/sh^M
^M
##########################################################################^M
# Yet Another Monitor (YAMon)^M
# Copyright (c) 2013-present Al Caughey^M
# All rights reserved.^M


The easiest way to run the compare function (other than opening a PuTTY window and entering /opt/YAMon/compare.sh) is to add the following line of code to your startup commands (in the Admin GUI-->Administration-->Commands (Startup field))
Code:
cp /opt/YAMon4/alias.sh $HOME/.profile ; . $HOME/.profile


NB - You can also just run that line of code in PuTTY but I like to have the aliases available at all times (and I would not remember the command properly).

Once the aliases are setup, when you open a PuTTY window, you should see the following lines of text below the ASCII art:
Code:
************************************************
************* Bash Aliases loaded **************
************************************************


And then you can enter just `comp` at the command prompt to run compare.sh or `sta` to run start, etc., etc. To see more about the aliases, go to http://usage-monitoring.com/help/?t=aliases

One of my current favourites is `unblock...` because every night at 9:30PM, my access restrictions kick in and I have to unblock my tablet... yeah, I could put my tablet into another group but I want to ensure things work.

Al

_________________
Thanks to everyone for supporting YAMon!

If you use and like YAMon and have not done so recently, please consider making a donation - thanks!
YAMon GitHub Repository
BarkingSpider
DD-WRT User


Joined: 29 Jan 2014
Posts: 98

PostPosted: Thu Apr 02, 2020 1:50    Post subject: Reply with quote
Does YAMon4 require the OPKG package that has the "ip" command since busybox does not work?
_________________
Netgear R7800: DD-WRT v3.0-r47822 std (12/09/21)
Linksys wrt1900acsV2: DD-WRT v3.0-r47822 std (12/09/21)
al_c
DD-WRT Guru


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

PostPosted: Thu Apr 02, 2020 2:20    Post subject: Reply with quote
BarkingSpider wrote:
Does YAMon4 require the OPKG package that has the "ip" command since busybox does not work?


No... It is not required

If the full version of 'ip' is *not* available, YAMon uses just 'arp'. If the full version *is*available, it uses both.

Al

_________________
Thanks to everyone for supporting YAMon!

If you use and like YAMon and have not done so recently, please consider making a donation - thanks!
YAMon GitHub Repository
al_c
DD-WRT Guru


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

PostPosted: Thu Apr 02, 2020 2:22    Post subject: Reply with quote
al_c wrote:
BarkingSpider wrote:
Does YAMon4 require the OPKG package that has the "ip" command since busybox does not work?


No... It is not required

If the full version of 'ip' is *not* available, YAMon uses just 'arp'. If the full version *is*available, it uses both.

Al


And, BTW, there was a critical vulnerability found in OpenWrt/opkg recently...

_________________
Thanks to everyone for supporting YAMon!

If you use and like YAMon and have not done so recently, please consider making a donation - thanks!
YAMon GitHub Repository
slippypete
DD-WRT Novice


Joined: 15 Jan 2020
Posts: 6

PostPosted: Thu Apr 02, 2020 6:49    Post subject: Reply with quote
The Daily Usage Report tab is only displaying the information for a single hour. I tracked down the bug - there is an extraneous line in the yamon4.0.js::Totals() routine that causes it to except out of the loaded hourly .js file and not execute any of the subsequent logic - in bold:

var mem=(arr.memory).replace(/[{}]/g,"").split(',')
hourly_totals.memory[hr]=mem
$("#sp-freeMem").text(mem[0])
disk_utilization=arr.disk_utilization
drawSummaryGauges(arr.disk_utilization, arr.memory )
$('#uptime').text(sec2text(arr.uptime))

The bolded line is missing a "var". The variable isn't used anyway (uses arr.disk_utilizaiton directly instead in the line below it), so I assume it's extraneous. If I remove the line then all the hours are properly rendered.
Goto page Previous  1, 2, 3 ... 9, 10, 11 ... 16, 17, 18  Next Display posts from previous:    Page 10 of 18
Post new topic   Reply to topic    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