Warning: session_start(): open(/var/lib/php/sessions/sess_l3h7jikgh9iafg0ldipt1bo1sl, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
cmodule RebootConsciousness > DynPrintLogAndEnabled {
start-thread {
theTest();
}
void theTest {
LS lastLines = unquoteAll(lastNLines(2, rebootLogFile()));
pnl(lastLines);
if (empty(lastLines)) ret;
if (l(lastLines) == 1) ret with confused("Only one event: " + lastLines);
S line1 = first(lastLines), line2 = second(lastLines);
new Matches m;
new Matches m2;
if (match("* Rebooting computer", line1, m)
&& match("* Boot timestamp changed from * to *", line2, m2)) {
long ts1 = parseLong(m.get(0)), ts2 = parseLong(m2.get(1));
if (ts2 > ts1)
notConfused("All OK! Reboot followed my reboot command");
else
confused("Timestamps are weird: " + lastLines);
} else
confused("Was expecting reboot cmd & then reboot effect: " + lastLines);
}
void confused(S msg) {
print("Confused: " + msg);
}
void notConfused(S msg) {
print("I am very satisfied. " + msg);
}
}