Skip to content

Commit

Permalink
v2.11.6
Browse files Browse the repository at this point in the history
FIXED: WebUI charts using Day grouping wouldn't display data between midnight and 1am
FIXED: Database reset would incorrectly report disk space availability
  • Loading branch information
jackyaz authored Jun 22, 2021
2 parents 75ff171 + a35f0c1 commit 76895a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/91af8db9cd354643a8ef6a7117be90fb)](https://www.codacy.com/app/jackyaz/connmon?utm_source=github.com&utm_medium=referral&utm_content=jackyaz/connmon&utm_campaign=Badge_Grade)
![Shellcheck](https://github.com/jackyaz/connmon/actions/workflows/shellcheck.yml/badge.svg)

## v2.11.5
### Updated on 2021-06-20
## v2.11.6
### Updated on 2021-06-21
## About
connmon is an internet connection monitoring tool for AsusWRT Merlin with charts for daily, weekly and monthly summaries.

Expand Down
6 changes: 3 additions & 3 deletions connmon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

### Start of script variables ###
readonly SCRIPT_NAME="connmon"
readonly SCRIPT_VERSION="v2.11.5"
readonly SCRIPT_VERSION="v2.11.6"
SCRIPT_BRANCH="master"
SCRIPT_REPO="https://raw.githubusercontent.com/jackyaz/$SCRIPT_NAME/$SCRIPT_BRANCH"
readonly SCRIPT_DIR="/jffs/addons/$SCRIPT_NAME.d"
Expand Down Expand Up @@ -916,7 +916,7 @@ WriteSql_ToFile(){
echo ".mode csv"
echo ".headers on"
echo ".output ${5}_${6}.htm"
echo "SELECT '$1' Metric,Min(strftime('%s',datetime([Timestamp],'unixepoch','start of day'))) Time,IFNULL(Avg([$1]),'NaN') Value FROM $2 WHERE ([Timestamp] > strftime('%s',datetime($timenow,'unixepoch','start of day','+1 day','-$maxcount day'))) GROUP BY strftime('%m',datetime([Timestamp],'unixepoch')),strftime('%d',datetime([Timestamp],'unixepoch')) ORDER BY [Timestamp] DESC;"
echo "SELECT '$1' Metric,Max(strftime('%s',datetime([Timestamp],'unixepoch','localtime','start of day','utc'))) Time,IFNULL(Avg([$1]),'NaN') Value FROM $2 WHERE ([Timestamp] > strftime('%s',datetime($timenow,'unixepoch','localtime','start of day','utc','+1 day','-$maxcount day'))) GROUP BY strftime('%m',datetime([Timestamp],'unixepoch')),strftime('%d',datetime([Timestamp],'unixepoch','localtime')) ORDER BY [Timestamp] DESC;"
} > "$7"
fi
}
Expand Down Expand Up @@ -1187,7 +1187,7 @@ Generate_LastXResults(){
Reset_DB(){
SIZEAVAIL="$(df -P -k "$SCRIPT_STORAGE_DIR" | awk '{print $4}' | tail -n 1)"
SIZEDB="$(ls -l "$SCRIPT_STORAGE_DIR/connstats.db" | awk '{print $5}')"
if [ "$SIZEDB" -gt "$SIZEAVAIL" ]; then
if [ "$SIZEDB" -gt "$((SIZEAVAIL*1024))" ]; then
Print_Output true "Database size exceeds available space. $(ls -lh "$SCRIPT_STORAGE_DIR/connstats.db" | awk '{print $5}')B is required to create backup." "$ERR"
return 1
else
Expand Down

0 comments on commit 76895a6

Please sign in to comment.