Skip to content

improvements for service status display#1263

Merged
endelwar merged 4 commits intomailwatch:1.2from
dneuhaeuser:status
Dec 12, 2022
Merged

improvements for service status display#1263
endelwar merged 4 commits intomailwatch:1.2from
dneuhaeuser:status

Conversation

@dneuhaeuser
Copy link
Copy Markdown
Contributor

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).

@dneuhaeuser dneuhaeuser marked this pull request as ready for review October 27, 2022 21:32
@ghost
Copy link
Copy Markdown

ghost commented Oct 31, 2022

I'll take a look at this and let you know my feedback

Comment thread mailscanner/functions.php Outdated
Comment thread mailscanner/functions.php Outdated
@ghost
Copy link
Copy Markdown

ghost commented Dec 10, 2022

This looks good, I tested it on my instance.

@endelwar endelwar merged commit 1833a5c into mailwatch:1.2 Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants