diff --git a/src/main.d b/src/main.d index f50f7a4a..0d1ab311 100644 --- a/src/main.d +++ b/src/main.d @@ -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); diff --git a/src/monitor.d b/src/monitor.d index beb6baff..adad5be5 100644 --- a/src/monitor.d +++ b/src/monitor.d @@ -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.");