- changed status to resolved
Message flooding in AIX with message Cannot test filesdescriptors ...
Hello Tildeslash,
a question of understanding or bug report, in src/process/sysdep_AIX.c a mask of the available statics information is set.
bool available_statistics(SystemInfo_T *si) {
si->statisticsAvailable = Statistics_CpuUser | Statistics_CpuSystem | Statistics_CpuIOWait;
return true;
}
The list does not contain Statistics_FiledescriptorsPerSystem. From my point of view monit should not collect the filedescriptors information for AIX therefore. Unfortunalety I find a warning every minute in the monit.log file.
[MESZ 2020 Jul 20 11:34:03] warning : Cannot test filesdescriptors usage as the statistics is not available on this system
[MESZ 2020 Jul 20 11:35:03] warning : Cannot test filesdescriptors usage as the statistics is not available on this system
[MESZ 2020 Jul 20 11:36:03] warning : Cannot test filesdescriptors usage as the statistics is not available on this system
[MESZ 2020 Jul 20 11:37:03] warning : Cannot test filesdescriptors usage as the statistics is not available on this system
[MESZ 2020 Jul 20 11:38:03] warning : Cannot test filesdescriptors usage as the statistics is not available on this system
[MESZ 2020 Jul 20 11:39:03] warning : Cannot test filesdescriptors usage as the statistics is not available on this system
[MESZ 2020 Jul 20 11:40:03] warning : Cannot test filesdescriptors usage as the statistics is not available on this system
[MESZ 2020 Jul 20 11:41:03] warning : Cannot test filesdescriptors usage as the statistics is not available on this system
[MESZ 2020 Jul 20 11:42:03] warning : Cannot test filesdescriptors usage as the statistics is not available on this system
[MESZ 2020 Jul 20 11:43:03] warning : Cannot test filesdescriptors usage as the statistics is not available on this system
[MESZ 2020 Jul 20 11:44:03] warning : Cannot test filesdescriptors usage as the statistics is not available on this system
[MESZ 2020 Jul 20 11:45:03] warning : Cannot test filesdescriptors usage as the statistics is not available on this system
[MESZ 2020 Jul 20 11:46:03] warning : Cannot test filesdescriptors usage as the statistics is not available on this system
[MESZ 2020 Jul 20 11:47:03] warning : Cannot test filesdescriptors usage as the statistics is not available on this system
[MESZ 2020 Jul 20 11:48:03] warning : Cannot test filesdescriptors usage as the statistics is not available on this system
[MESZ 2020 Jul 20 11:49:03] warning : Cannot test filesdescriptors usage as the statistics is not available on this system
It is nice to know this, but the information is useless, the statistics data is not available yet and should not gathered but monit try to do this every cycle and write a warning message to the log file.
In _checkSystemResources similar messages will be written to the log if something is going wrong only.
In a short form, in _checkSystemFiledescriptors the check for “systeminfo.statisticsAvailable & Statistics_FiledescriptorsPerSystem” does not fit well, I think.
With regards,
Lutz
p.s.
Unfortunaly, the maximum soft and hard file limits are available only, but not the used files.
Sample code:
bool used_system_filedescriptors_sysdep(SystemInfo_T *si) {
// Max number of open files.
struct rlimit limits;
getrlimit(RLIMIT_NOFILE, &limits);
// The values should be unsigned integers to be handled by _printStatus.
si->filedescriptors.allocated = limits.rlim_cur;
if (limits.rlim_max != RLIM_INFINITY) // RLIM_INFINITY is -1 to indicating no limit.
si->filedescriptors.maximum = limits.rlim_max;
else
si->filedescriptors.maximum = (unsigned int)INT_MAX; // The max value.
// Some symbolic constants used.
// RLIM_INFINITY is -1 for no limit.
// RLIM_SAVED_MAX is -2 for a unrepresentable saved hard limit.
// RLIM_SAVED_CUR is -3 for a unrepresentable saved soft limit.
return true;
}
Comments (3)
-
repo owner -
reporter Hello Tildeslash,
I add my changes to fix this problem in a additional pull request,
see https://bitbucket.org/tildeslash/monit/pull-requests/101Your suggestion is not the whole story I think.
With regards,
Lutz -
repo owner Issue
#934was marked as a duplicate of this issue. - Log in to comment
Fixed: Issue
#920→ <<cset 92121e272a79>>