0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-28 14:42:31 +00:00

minor status file annotation fixes ()

* minor status file annotation fixes

* avoid duplicate cause
This commit is contained in:
Costa Tsaousis 2025-02-26 23:07:13 +00:00 committed by GitHub
parent 46a0dd964f
commit dc8b731c47
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -711,16 +711,16 @@ void daemon_status_file_check_crash(void) {
msg = "The system was abnormally powered off while Netdata was starting";
pri = PRI_USER_SHOULD_FIX;
}
else if (last_session_status.exit_reason &= (EXIT_REASON_SIGBUS|EXIT_REASON_SIGFPE|EXIT_REASON_SIGILL|EXIT_REASON_SIGSEGV)) {
cause = "killed signal";
msg = "Netdata was last crashed while starting, with a signal indicating a bug";
pri = PRI_NETDATA_BUG;
}
else if (last_session_status.exit_reason &= EXIT_REASON_OUT_OF_MEMORY) {
else if (last_session_status.exit_reason & EXIT_REASON_OUT_OF_MEMORY) {
cause = "out of memory";
msg = "Netdata was last crashed while starting, because it couldn't allocate memory";
pri = PRI_USER_SHOULD_FIX;
}
else if (!is_exit_reason_normal(last_session_status.exit_reason)) {
cause = "fatal on start";
msg = "Netdata was last crashed while starting, because of a fatal error";
pri = PRI_NETDATA_BUG;
}
else {
cause = "crashed on start";
msg = "Netdata was last killed/crashed while starting";
@ -760,16 +760,16 @@ void daemon_status_file_check_crash(void) {
msg = "The system was abnormally powered off while Netdata was running";
pri = PRI_USER_SHOULD_FIX;
}
else if (last_session_status.exit_reason &= (EXIT_REASON_SIGBUS|EXIT_REASON_SIGFPE|EXIT_REASON_SIGILL|EXIT_REASON_SIGSEGV)) {
cause = "killed signal";
msg = "Netdata was last crashed with a signal indicating a bug";
pri = PRI_NETDATA_BUG;
}
else if (last_session_status.exit_reason &= EXIT_REASON_OUT_OF_MEMORY) {
else if (last_session_status.exit_reason & EXIT_REASON_OUT_OF_MEMORY) {
cause = "out of memory";
msg = "Netdata was last crashed because it couldn't allocate memory";
pri = PRI_USER_SHOULD_FIX;
}
else if (!is_exit_reason_normal(last_session_status.exit_reason)) {
cause = "killed fatal";
msg = "Netdata was last crashed due to a fatal error";
pri = PRI_NETDATA_BUG;
}
else {
cause = "killed hard";
msg = "Netdata was last killed/crashed while operating normally";