blob: 6b0ac9812d9f734e54c093b59ce0d8319c6fa19f (
plain) (
tree)
|
|
<?php
$cnt = SystemStatus::getUpgradableSecurityCount();
if ($cnt > 0) {
Message::addWarning('systemstatus.security-updates-available', true, $cnt);
}
$pkgs = SystemStatus::getPackagesRequiringReboot();
if (!empty($pkgs)) {
Message::addInfo('systemstatus.update-reboot-required', true, implode(', ', $pkgs));
}
$aptTs = SystemStatus::getAptLastDbUpdateTime();
if ($aptTs + 864000 < time()) {
// No update for 10 days
Message::addWarning('systemstatus.apt-db-out-of-date', true, Util::prettyTime($aptTs));
}
if (SystemStatus::diskStat($systemUsage, $storeUsage, $current, $wanted)) {
if ($current === $wanted && isset($storeUsage['freeKb']) && $storeUsage['freeKb'] < 60000000) { // 60GB
Message::addWarning('systemstatus.storage-low-vmstore', true, Util::readableFileSize($storeUsage['freeKb'], -1 , 1));
}
if (isset($systemUsage['freeKb']) && $systemUsage['freeKb'] < 600000) { // 600MB
Message::addWarning('systemstatus.storage-low-system', true, Util::readableFileSize($systemUsage['freeKb'], -1 , 1));
}
}
|