Commit 3fcc9c13 authored by Dietmar Maurer's avatar Dietmar Maurer

only log status update time if it takes more than 5 seconds

parent bfb51694
...@@ -312,7 +312,7 @@ for (;;) { # forever ...@@ -312,7 +312,7 @@ for (;;) { # forever
my ($ccsec, $cusec) = gettimeofday (); my ($ccsec, $cusec) = gettimeofday ();
eval { eval {
$reload_config = 0; $reload_config = 0;
syslog('info', "start status update"); # syslog('info', "start status update");
PVE::Cluster::cfs_update(); PVE::Cluster::cfs_update();
update_status(); update_status();
}; };
...@@ -325,7 +325,8 @@ for (;;) { # forever ...@@ -325,7 +325,8 @@ for (;;) { # forever
my ($ccsec_end, $cusec_end) = gettimeofday (); my ($ccsec_end, $cusec_end) = gettimeofday ();
my $cptime = ($ccsec_end-$ccsec) + ($cusec_end - $cusec)/1000000; my $cptime = ($ccsec_end-$ccsec) + ($cusec_end - $cusec)/1000000;
syslog('info', sprintf("status update finished (%.3f seconds)", $cptime)); syslog('info', sprintf("status update time (%.3f seconds)", $cptime))
if ($cptime > 5);
} }
$cycle++; $cycle++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment