Closed shawnmyers closed 6 years ago
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,
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
Does the sendmailanalyzer daemon is running during the day? What is the result of command ps auwx | grep sendmailanalyzer | grep -v grep
?
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.
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.
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?
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
Thanx. One more question, How much interval logs shows on sendmailanalyzer?
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.
Yeah It has already been set.
Thanks darold
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