improvements for service status display#1263
Merged
endelwar merged 4 commits intomailwatch:1.2from Dec 12, 2022
Merged
Conversation
|
I'll take a look at this and let you know my feedback |
endelwar
reviewed
Nov 11, 2022
|
This looks good, I tested it on my instance. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unfortunately I messed up my first PR, sorry for that!
So here are my further reworked improvements for the service status again.
This should now be compatible with BSD and Linux.
When Mailscanner is in milter mode (MTA = msmail) the service status only counted the postfix master process (so the count was always just showing 1).
For consistency I suggest to use the same logic as without milter mode and display the total postfix process count including its child procs.
On Linux systems (e.g. Ubuntu 22.04.1 LTS) by default there is a header line in the 'ps' output.
Therefore postfix was reported as running when it wasn't because the process count was always too high by 1.
Also, with Mailscanner's "Milter Dispatcher = postfork" and the system idling, the status displays:
"MSMilter: YES | 0 children", which is confusing.
I suggest to always just display the total process count (and to not subtract 1 for a display of child count).