According to the documentation Greengrass Nucleus should rotate logs every hour (https://docs.aws.amazon.com/greengrass/v2/developerguide/log-manager-component.html). So I suppose no matter of the log size I should see a new file every hour. So the maximum delay of logs uploaded with LogManager would be 1 hour. I see some "random" rotations however. My configuration of Nucleus is default. Example of my rotations:
-rw-r--r-- 1 root root 31953 Jun 6 07:32 greengrass.log
-rw-r--r-- 1 root root 212 May 30 22:40 greengrass_2022_05_30_22_0.log
-rw-r--r-- 1 root root 212 Jun 2 12:12 greengrass_2022_06_02_12_0.log
-rw-r--r-- 1 root root 736 Jun 2 14:21 greengrass_2022_06_02_14_0.log
-rw-r--r-- 1 root root 126334 Jun 2 20:40 greengrass_2022_06_02_20_0.log
-rw-r--r-- 1 root root 53873 Jun 3 12:30 greengrass_2022_06_03_12_0.log
-rw-r--r-- 1 root root 467 Jun 3 17:54 greengrass_2022_06_03_17_0.log
-rw-r--r-- 1 root root 13527 Jun 3 19:20 greengrass_2022_06_03_19_0.log
-rw-r--r-- 1 root root 212 Jun 6 06:10 greengrass_2022_06_06_06_0.log
Here are some details about greengrass log rotation you might find helpful:
Greengrass logs rotate every hour or when the file reaches a size limit, whichever is sooner. The default file size limit is 1,024 KB (1 MB) and is configurable as fileSizeKB here: https://docs.aws.amazon.com/greengrass/v2/developerguide/greengrass-nucleus-component.html#:~:text=Default%3A%20FILE-,fileSizeKB,-(Optional)%20The%20maximum
The logs do not rotate if there has been no activity in the log since the last rotation.
Logs will be deleted (earliest first) when the logs hit a disk space limit. The default limit for the greengrass log and each component log is 10,240 KB (10 MB), and is configurable as totalLogsSizeKB here: https://docs.aws.amazon.com/greengrass/v2/developerguide/greengrass-nucleus-component.html#:~:text=Default%3A%201024-,totalLogsSizeKB,-(Optional)%20The%20maximum