[GH-ISSUE #46] Hourly Logs are not updating #37

Closed
opened 2026-05-05 15:01:07 -06:00 by gitea-mirror · 10 comments
Owner

Originally created by @shawnmyers on GitHub (Mar 10, 2017).
Original GitHub issue: https://github.com/darold/sendmailanalyzer/issues/46

Hi Darolnd,

I have installed SendmailAnalyzer on Centos7. But Hourly logs are not updating. What could be the issue?

Its showing no record for this period

Originally created by @shawnmyers on GitHub (Mar 10, 2017). Original GitHub issue: https://github.com/darold/sendmailanalyzer/issues/46 Hi Darolnd, I have installed SendmailAnalyzer on Centos7. But Hourly logs are not updating. What could be the issue? Its showing no record for this period
Author
Owner

@darold commented on GitHub (Mar 16, 2017):

Hi,

Sorry for the response delay. I think the reason is that maillog on CentOs 7 goes through journalctl. What is you sendmailanalyzer command? Are you using the --journalctl option to replace logfile?

Regards,

<!-- gh-comment-id:286996924 --> @darold commented on GitHub (Mar 16, 2017): Hi, Sorry for the response delay. I think the reason is that maillog on CentOs 7 goes through journalctl. What is you sendmailanalyzer command? Are you using the `--journalctl` option to replace logfile? Regards,
Author
Owner

@shawnmyers commented on GitHub (Mar 16, 2017):

Hi,

My sendmailanalyzer command is below in startup script. Moreover, stats don't update in real time, they update after one day

ExecStart=/usr/local/sendmailanalyzer/sendmailanalyzer -f

<!-- gh-comment-id:287001088 --> @shawnmyers commented on GitHub (Mar 16, 2017): Hi, My sendmailanalyzer command is below in startup script. Moreover, stats don't update in real time, they update after one day ExecStart=/usr/local/sendmailanalyzer/sendmailanalyzer -f
Author
Owner

@darold commented on GitHub (Mar 16, 2017):

Does the sendmailanalyzer daemon is running during the day? What is the result of command ps auwx | grep sendmailanalyzer | grep -v grep ?

<!-- gh-comment-id:287002868 --> @darold commented on GitHub (Mar 16, 2017): Does the sendmailanalyzer daemon is running during the day? What is the result of command `ps auwx | grep sendmailanalyzer | grep -v grep` ?
Author
Owner

@shawnmyers commented on GitHub (Mar 16, 2017):

Below is Output of command

root 12794 0.1 0.7 162616 27964 ? Ss 04:04 0:08 sendmailanalyzer
root 26426 0.0 0.2 141276 8940 ? Ss Mar10 0:52 sendmailanalyzer

Moreover, below is status of Systemctl command

systemctl status sendmailanalyzer
● sendmailanalyzer.service - SendmailAnalyzer
Loaded: loaded (/usr/lib/systemd/system/sendmailanalyzer.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2017-03-16 04:04:01 EDT; 1h 31min ago
Process: 12789 ExecStop=/bin/kill -TERM sendmailanalyzer (code=exited, status=1/FAILURE)
Process: 12792 ExecStart=/usr/local/sendmailanalyzer/sendmailanalyzer -f (code=exited, status=0/SUCCESS)
Main PID: 12794 (sendmailanalyze)
CGroup: /system.slice/sendmailanalyzer.service
├─12794 sendmailanalyzer
└─12796 /bin/tail -n 0 -F /var/log/maillog

Mar 16 04:04:01 systemd[1]: sendmailanalyzer.service: main process exited, code=exited, status=1/FAILURE
Mar 16 04:04:01 systemd[1]: Unit sendmailanalyzer.service entered failed state.
Mar 16 04:04:01 systemd[1]: sendmailanalyzer.service failed.
Mar 16 04:04:01 systemd[1]: Starting SendmailAnalyzer...
Mar 16 04:04:01 systemd[1]: Started SendmailAnalyzer.

<!-- gh-comment-id:287004190 --> @shawnmyers commented on GitHub (Mar 16, 2017): Below is Output of command root 12794 0.1 0.7 162616 27964 ? Ss 04:04 0:08 sendmailanalyzer root 26426 0.0 0.2 141276 8940 ? Ss Mar10 0:52 sendmailanalyzer Moreover, below is status of Systemctl command systemctl status sendmailanalyzer ● sendmailanalyzer.service - SendmailAnalyzer Loaded: loaded (/usr/lib/systemd/system/sendmailanalyzer.service; enabled; vendor preset: disabled) Active: active (running) since Thu 2017-03-16 04:04:01 EDT; 1h 31min ago Process: 12789 ExecStop=/bin/kill -TERM sendmailanalyzer (code=exited, status=1/FAILURE) Process: 12792 ExecStart=/usr/local/sendmailanalyzer/sendmailanalyzer -f (code=exited, status=0/SUCCESS) Main PID: 12794 (sendmailanalyze) CGroup: /system.slice/sendmailanalyzer.service ├─12794 sendmailanalyzer └─12796 /bin/tail -n 0 -F /var/log/maillog Mar 16 04:04:01 systemd[1]: sendmailanalyzer.service: main process exited, code=exited, status=1/FAILURE Mar 16 04:04:01 systemd[1]: Unit sendmailanalyzer.service entered failed state. Mar 16 04:04:01 systemd[1]: sendmailanalyzer.service failed. Mar 16 04:04:01 systemd[1]: Starting SendmailAnalyzer... Mar 16 04:04:01 systemd[1]: Started SendmailAnalyzer.
Author
Owner

@darold commented on GitHub (Mar 16, 2017):

Hum, you have two sendmailanalyzer running, this is not normal unless you have two different installation and logfile to process. If this is not the case, please kill both processes and restart sendmailanalyzer using systemctl start sendmailanalyzer then verify that you just have one process running.

<!-- gh-comment-id:287006483 --> @darold commented on GitHub (Mar 16, 2017): Hum, you have two sendmailanalyzer running, this is not normal unless you have two different installation and logfile to process. If this is not the case, please kill both processes and restart sendmailanalyzer using `systemctl start sendmailanalyzer` then verify that you just have one process running.
Author
Owner

@shawnmyers commented on GitHub (Mar 16, 2017):

Yes, two processes are running. Check details below

root 26426 0.0 0.2 141276 8940 ? Ss Mar10 0:52 sendmailanalyzer

The above started on March 10 and still running.

Other below process started today at 4AM using cron job from following cron task

Process: root 12794 0.1 0.7 162616 27964 ? Ss 04:04 0:08 sendmailanalyzer
Cron Task:

# Daemon restart after maillog logrotate (cron jobs at 4:04 every day)
# Feel free to replace this line by an entry in /etc/logrotate.d/syslog
4 4 * * *     root  /bin/systemctl restart sendmailanalyzer > /dev/null 2>&1

Cron Task File is /etc/cron.d/sendmailanalyzer

Should I disable this cron?

<!-- gh-comment-id:287007780 --> @shawnmyers commented on GitHub (Mar 16, 2017): Yes, two processes are running. Check details below ``` root 26426 0.0 0.2 141276 8940 ? Ss Mar10 0:52 sendmailanalyzer ``` The above started on March 10 and still running. Other below process started today at 4AM using cron job from following cron task Process: root 12794 0.1 0.7 162616 27964 ? Ss 04:04 0:08 sendmailanalyzer Cron Task: ``` # Daemon restart after maillog logrotate (cron jobs at 4:04 every day) # Feel free to replace this line by an entry in /etc/logrotate.d/syslog 4 4 * * * root /bin/systemctl restart sendmailanalyzer > /dev/null 2>&1 ``` Cron Task File is /etc/cron.d/sendmailanalyzer Should I disable this cron?
Author
Owner

@darold commented on GitHub (Mar 16, 2017):

Yes you have to remove it and use logrotate to restart sendmailanalyzer. In /etc/logrotate.d/syslog add this to the postrotate section:

/usr/bin/systemctl restart sendmailanalyzer.service > /dev/null 2>&1 || true
<!-- gh-comment-id:287010044 --> @darold commented on GitHub (Mar 16, 2017): Yes you have to remove it and use logrotate to restart sendmailanalyzer. In /etc/logrotate.d/syslog add this to the postrotate section: ``` /usr/bin/systemctl restart sendmailanalyzer.service > /dev/null 2>&1 || true ```
Author
Owner

@shawnmyers commented on GitHub (Mar 16, 2017):

Thanx. One more question, How much interval logs shows on sendmailanalyzer?

<!-- gh-comment-id:287011718 --> @shawnmyers commented on GitHub (Mar 16, 2017): Thanx. One more question, How much interval logs shows on sendmailanalyzer?
Author
Owner

@darold commented on GitHub (Mar 16, 2017):

By default sendmailanalyzer refresh the data files each five seconds so obviously it only depend of the number of entries in your log and at which frequency you are refreshing the report in the browser. There is no automatic refresh in the CGI.

But if you need speed in the CGI interface you have to run sa_cache frequently to constantly update the statistics. I recommend you to set the following in your crontab:

# On huge MTA you may want to have five minutes caching
*/5 * * * * /usr/local/sendmailanalyzer/sa_cache -a > /dev/null 2>&1

So in this case you will have a pre-calculated interval of five minutes.

<!-- gh-comment-id:287014643 --> @darold commented on GitHub (Mar 16, 2017): By default sendmailanalyzer refresh the data files each five seconds so obviously it only depend of the number of entries in your log and at which frequency you are refreshing the report in the browser. There is no automatic refresh in the CGI. But if you need speed in the CGI interface you have to run sa_cache frequently to constantly update the statistics. I recommend you to set the following in your crontab: ``` # On huge MTA you may want to have five minutes caching */5 * * * * /usr/local/sendmailanalyzer/sa_cache -a > /dev/null 2>&1 ``` So in this case you will have a pre-calculated interval of five minutes.
Author
Owner

@shawnmyers commented on GitHub (Mar 16, 2017):

Yeah It has already been set.

Thanks darold

<!-- gh-comment-id:287015198 --> @shawnmyers commented on GitHub (Mar 16, 2017): Yeah It has already been set. Thanks darold
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/sendmailanalyzer#37
No description provided.