Update PR

* Update PR
This commit is contained in:
abraunegg 2025-11-04 09:59:06 +11:00
commit 3b46ffb310
2 changed files with 5 additions and 3 deletions

View file

@ -1008,7 +1008,8 @@ int main(string[] cliArgs) {
}
// What are the current values for the platform we are running on
string maxOpenFiles = strip(getMaxOpenFiles());
string maxOpenFilesSoft = strip(to!string(getSoftOpenFilesLimit()));
string maxOpenFilesHard = strip(getMaxOpenFiles());
// What is the currently configured maximum inotify watches that can be used
string maxInotifyWatches = strip(getMaxInotifyWatches());
@ -1018,7 +1019,8 @@ int main(string[] cliArgs) {
// If we are in a --download-only method of operation, the output of these is not required
if (!appConfig.getValueBool("download_only")) {
if (verboseLogging) {
addLogEntry("Maximum allowed open files: " ~ maxOpenFiles, ["verbose"]);
addLogEntry("Maximum allowed open files (soft): " ~ maxOpenFilesSoft, ["verbose"]);
addLogEntry("Maximum allowed open files (hard): " ~ maxOpenFilesHard, ["verbose"]);
addLogEntry("Maximum allowed inotify user watches: " ~ maxInotifyWatches, ["verbose"]);
}
}

View file

@ -1632,7 +1632,7 @@ ulong getHardOpenFilesLimit() {
}
// Get resource limit in POSIX portable manner (soft limit max open files)
ulong softOpenFilesLimit() {
ulong getSoftOpenFilesLimit() {
rlimit lim;
if (getrlimit(RLIMIT_NOFILE, &lim) == 0)
return cast(ulong) lim.rlim_cur; // soft limit