mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-16 22:13:01 +02:00
collectd: fix collectd on machines without rtc.
collectd hangs with 100% cpu usage if there is a very old entry in the database. This was created at the first start without internet so ntp cannot set the time.
This commit is contained in:
@@ -86,9 +86,14 @@ case "$1" in
|
||||
sed -i -e "s|^#LoadPlugin swap|LoadPlugin swap|g" /etc/collectd.conf
|
||||
fi
|
||||
|
||||
boot_mesg "Starting Collection daemon..."
|
||||
/usr/sbin/collectd -C /etc/collectd.conf
|
||||
evaluate_retval
|
||||
if [ $(date +%Y) -gt 2011 ]; then
|
||||
boot_mesg "Starting Collection daemon..."
|
||||
/usr/sbin/collectd -C /etc/collectd.conf
|
||||
evaluate_retval
|
||||
else
|
||||
boot_mesg "collectd: cannot start with incorrect time ($(date))."
|
||||
echo_warning;
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
boot_mesg "Stopping Collection daemon..."
|
||||
|
||||
Reference in New Issue
Block a user