Posted: Sun Mar 22, 2020 17:20 Post subject: YAMon3 Data Files Not Read With YAMon4
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?
Posted: Sun Mar 22, 2020 17:26 Post subject: Re: YAMon3 Data Files Not Read With YAMon4
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
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
Posted: Tue Mar 24, 2020 19:58 Post subject: compare.sh no longer works?
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)
Posted: Fri Mar 27, 2020 18:35 Post subject: Re: compare.sh no longer works?
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
#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
Posted: Mon Mar 30, 2020 21:06 Post subject: Re: compare.sh no longer works?
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
Posted: Mon Mar 30, 2020 22:32 Post subject: Re: compare.sh no longer works?
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))
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:
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
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)
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.