Update maxInotifyWatches location

* Update maxInotifyWatches location
This commit is contained in:
abraunegg 2023-10-05 19:40:05 +11:00
parent c44ad963a6
commit c7cc45d95c
2 changed files with 4 additions and 4 deletions

View file

@ -526,13 +526,13 @@ int main(string[] cliArgs) {
// Max number of open files /proc/sys/fs/file-max
string maxOpenFiles = strip(readText("/proc/sys/fs/file-max"));
// What is the currently configured maximum inotify watches that can be used
// /proc/sys/user/max_inotify_watches
string maxInotifyWatches = strip(readText("/proc/sys/user/max_inotify_watches"));
// /proc/sys/fs/inotify/max_user_watches
string maxInotifyWatches = strip(readText("/proc/sys/fs/inotify/max_user_watches"));
// Start the monitor process
log.log("OneDrive synchronisation interval (seconds): ", appConfig.getValueLong("monitor_interval"));
log.vlog("Maximum allowed open files: ", maxOpenFiles);
log.vlog("Maximum allowed inotify watches: ", maxInotifyWatches);
log.vlog("Maximum allowed inotify user watches: ", maxInotifyWatches);
// Configure the monitor class
Monitor filesystemMonitor = new Monitor(appConfig, selectiveSync);

View file

@ -199,7 +199,7 @@ final class Monitor {
if (wd < 0) {
if (errno() == ENOSPC) {
// Get the current value
ulong maxInotifyWatches = to!int(strip(readText("/proc/sys/user/max_inotify_watches")));
ulong maxInotifyWatches = to!int(strip(readText("/proc/sys/fs/inotify/max_user_watches")));
log.log("The user limit on the total number of inotify watches has been reached.");
log.log("Your current limit of inotify watches is: ", maxInotifyWatches);
log.log("It is recommended that you change the max number of inotify watches to at least double your existing value.");