@Martinski, have now given 3.2.9_26013023 development a pretty good thrash and it seems to be working as advertised in terms of the uiScribe "buckets" populating retrospectively after the scribe startup delay. I've culled all my (now) superfluous logtrotate.d files and done a couple of reboots.
Nice work and thank you!
Thank you for testing and providing feedback. Glad the latest code is working well for you.
I'm sure you had valid reasons for deciding on the 150 second delay, perhaps you can elucidate further why your investigations led you to that?
I can see the sleepSecsMIN=120, minSleepSecs=150 and sleepSecsMAX=210 constants and i can see you are waiting for 3 nvram variables to be "true", but maybe you can tell us why you picked those values and what the script is looking for before firing up?
You can find the initial description of the 2 problems I was trying to address in
post #141.
Essentially, during the reboot process, there is a deluge of log messages that get generated while all the kernel and built-in OS services are initialized & started up, along with other optional services the user may have selected (e.g. Samba, Media Server, FTP, Traffic Analyzer, AiProtection, etc.). This is followed by an unknown number of Entware services the user may have installed.
Based on testing/debugging I ran on 3 separate routers, plus reports from a debug version run by a friend of mine, this period during which a very high volume of syslog messages is generated may last anywhere between 100 and 180 seconds, depending on various factors.
Under those initial circumstances, the goal was to make the transition from using the built-in system loggers (klogd and syslogd) to starting syslog-ng as smoothly as possible and to minimize, as much as possible, the chances of log messages getting lost. Eventually, after some testing and fine-tuning, I arrived at what appears to be the "goldilocks zone" of 120-160 seconds, where the deluge of syslog messages has decreased enough so that the switch over to syslog-ng can happen smoothly.
The NVRAM variables are checked to make sure the system clock has synced, and all system services have been started.
The minimum of 120 seconds and the maximum of 210 seconds represent the range under which the debug tests were run to find the average "sweet spot" of 150 seconds that would (hopefully) apply to the largest number of router configurations.
Is it tunable at all for those of us that like to tinker further, or is that not advisable?
I suppose you could try to fine-tune the number of seconds used for the delay to fit your specific router model and current configuration, and at whatever point the switch over to syslog-ng no longer happens smoothly or starts losing more than a handful of log messages, you need to add a "cushion" of 15 to 20 seconds.
However, I would not recommend anything less than 120 seconds for the delay. Any value below that would be considered an unsupported setting/configuration, and I will not spend any time debugging or troubleshooting it.
HTH.