mirror of
https://github.com/darold/sendmailanalyzer.git
synced 2026-05-15 22:02:32 -06:00
[GH-ISSUE #46] Hourly Logs are not updating #37
Labels
No labels
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/sendmailanalyzer#37
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
@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
--journalctloption to replace logfile?Regards,
@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
@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?@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.
@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 sendmailanalyzerthen verify that you just have one process running.@shawnmyers commented on GitHub (Mar 16, 2017):
Yes, two processes are running. Check details below
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:
Cron Task File is /etc/cron.d/sendmailanalyzer
Should I disable this cron?
@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:
@shawnmyers commented on GitHub (Mar 16, 2017):
Thanx. One more question, How much interval logs shows on sendmailanalyzer?
@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:
So in this case you will have a pre-calculated interval of five minutes.
@shawnmyers commented on GitHub (Mar 16, 2017):
Yeah It has already been set.
Thanks darold