|
|
@@ -405,7 +405,7 @@ bool snfLOGmgr::do_SecondReport() { |
|
|
|
|
|
|
|
Report << "\t<timers>" << endl; |
|
|
|
Report << "\t\t<run started=\'" << Timestamp(StartupTime) << "\' " |
|
|
|
<< "elapsed=\'" << (int) difftime(Timestamp(), StartupTime) << "\'/>" << endl; |
|
|
|
<< "elapsed=\'" << SecsSinceStartup() << "\'/>" << endl; |
|
|
|
|
|
|
|
Report << "\t\t<sync latest=\'" << Timestamp(Status.LastSyncTime) << "\' " |
|
|
|
<< "elapsed=\'" << SecsSinceLastSync() << "\'/>" << endl; |
|
|
@@ -573,7 +573,7 @@ bool snfLOGmgr::do_MinuteReport() { |
|
|
|
|
|
|
|
Report << "\t<timers>" << endl; |
|
|
|
Report << "\t\t<run started=\'" << Timestamp(StartupTime) << "\' " |
|
|
|
<< "elapsed=\'" << (int) difftime(Timestamp(), StartupTime) << "\'/>" << endl; |
|
|
|
<< "elapsed=\'" << SecsSinceStartup() << "\'/>" << endl; |
|
|
|
|
|
|
|
Report << "\t\t<sync latest=\'" << Timestamp(Status.LastSyncTime) << "\' " |
|
|
|
<< "elapsed=\'" << SecsSinceLastSync() << "\'/>" << endl; |
|
|
@@ -740,7 +740,7 @@ bool snfLOGmgr::do_HourReport() { |
|
|
|
|
|
|
|
Report << "\t<timers>" << endl; |
|
|
|
Report << "\t\t<run started=\'" << Timestamp(StartupTime) << "\' " |
|
|
|
<< "elapsed=\'" << (int) difftime(Timestamp(), StartupTime) << "\'/>" << endl; |
|
|
|
<< "elapsed=\'" << SecsSinceStartup() << "\'/>" << endl; |
|
|
|
|
|
|
|
Report << "\t\t<sync latest=\'" << Timestamp(Status.LastSyncTime) << "\' " |
|
|
|
<< "elapsed=\'" << SecsSinceLastSync() << "\'/>" << endl; |
|
|
@@ -1731,7 +1731,7 @@ bool snfLOGmgr::OkToSample(int SampleOneInX) { |
|
|
|
|
|
|
|
time_t snfLOGmgr::Timestamp() { // Get an ordinary timestamp. |
|
|
|
time_t rawtime; |
|
|
|
time(&rawtime); |
|
|
|
rawtime = time(NULL); |
|
|
|
return rawtime; |
|
|
|
} |
|
|
|
|
|
|
@@ -1840,6 +1840,10 @@ void snfLOGPersistentState::restore(string& FileNameToRestore) { |
|
|
|
// 20090730_M - Moved persistent state aux saves to RecordSyncEvent. It makes
|
|
|
|
// sense for the persistent state to match the latext external record of state
|
|
|
|
// info. If SNFServer dies uncerimoneusly that is what we will remember.
|
|
|
|
|
|
|
|
int snfLOGmgr::SecsSinceStartup() {
|
|
|
|
return (int) difftime(Timestamp(), StartupTime);
|
|
|
|
}
|
|
|
|
|
|
|
|
void snfLOGmgr::RecordSyncEvent() { // Sets timestamp of latest Sync. |
|
|
|
Status.LastSyncTime = Timestamp(); // Set the Sync time.
|
|
|
@@ -1863,7 +1867,7 @@ void snfLOGmgr::RecordCondenseEvent() { |
|
|
|
} |
|
|
|
|
|
|
|
int snfLOGmgr::SecsSinceLastCondense() { // Gets seconds since latest Condense. |
|
|
|
return (int) difftime(Timestamp(), Status.LastCondenseTime); |
|
|
|
return (int) difftime(Timestamp(), Status.LastCondenseTime);
|
|
|
|
} |
|
|
|
|
|
|
|
// Data in the multi-range sliding window is tracked in circular buffers. |