diff --git a/README.md b/README.md index 64ccf4e..4b79d32 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ **scribe** is a **syslog-ng** and **logrotate** installer for ASUS routers running **Asuswrt-Merlin** ## v3.2.7 -### Updated on 2026-Jan-03 +### Updated on 2026-Jan-04 ## Getting Started diff --git a/scribe.sh b/scribe.sh index 31bbbc5..1b2c869 100644 --- a/scribe.sh +++ b/scribe.sh @@ -18,7 +18,7 @@ # curl --retry 3 "https://raw.githubusercontent.com/AMTM-OSR/scribe/master/scribe.h" -o "/jffs/scripts/scribe" && chmod 0755 /jffs/scripts/scribe && /jffs/scripts/scribe install # ################################################################## -# Last Modified: 2026-Jan-03 +# Last Modified: 2026-Jan-04 #----------------------------------------------------------------- ################ Shellcheck directives ################ @@ -35,7 +35,7 @@ readonly script_name="scribe" readonly scribe_ver="v3.2.7" -readonly scriptVer_TAG="26010323" +readonly scriptVer_TAG="26010400" scribe_branch="develop" script_branch="$scribe_branch" @@ -186,8 +186,8 @@ readonly LR_FLock_FName="/tmp/scribeLogRotate.flock" readonly logFilesRegExp="${optVarLogDir}/.*([.]log)?" readonly filteredLogList="${config_d}/.filteredlogs" readonly noConfigLogList="${config_d}/.noconfiglogs" -readonly sysLogMsgSizeMAX=10240 -readonly sysLogFiFoSizeMIN=1024 +sysLogMsgSizeMAX=10240 +sysLogFiFoSizeMIN=1024 # color constants # readonly red="\033[1;31m" @@ -1195,6 +1195,19 @@ _AcquireFLock_() _ReleaseFLock_() { flock -u "$LR_FLock_FD" ; } +##-------------------------------------## +## Added by Martinski W. [2026-Jan-04] ## +##-------------------------------------## +_HasRouterMoreThan512MBtotalRAM_() +{ + local totalRAM_KB + totalRAM_KB="$(awk -F ' ' '/^MemTotal:/{print $2}' /proc/meminfo)" + if [ -n "$totalRAM_KB" ] && [ "$totalRAM_KB" -gt 524288 ] + then return 0 + else return 1 + fi +} + ##-------------------------------------## ## Added by Martinski W. [2025-Dec-05] ## ##-------------------------------------## @@ -2400,6 +2413,12 @@ scribe_menu() SetUpRepoBranchVars +## Increase FIFO queue size if 1GB RAM or more ## +if _HasRouterMoreThan512MBtotalRAM_ +then sysLogFiFoSizeMIN=2048 +else sysLogFiFoSizeMIN=1024 +fi + if ! SyslogDm_Running && ! SyslogNg_Running then printf "\n\n${red} *WARNING*: $white No system logger was running!!\n"