Warning: session_start(): open(/var/lib/php/sessions/sess_uuuo4j04u8qklfonv3v1hana8m, 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
set flag OshiNotSticky.
cmodule MemoryTrayIcon > DynPrintLog {
transient S value; // OS size in MB + free memory
transient JLabel lbl;
transient bool _startMinimized = true;
switchable bool countSwap = true;
switchable double interval = 10.0; // restart to take effect
switchable bool showOSSizeInTray = true; // otherwise only free mem, full specs in tooltip
transient long processSize;
start {
dm_addTrayIcon(onLeftClick(rThread dm_verboseGC,
lbl = dm_fieldLabel_noAutoToolTip('value)));
componentPopupMenuItems(lbl,
"Garbage Collect", rThread { dm_gc(); actualUpdate(); },
"Show Module", rThread dm_showModule,
"Remove", rThread dm_deleteModule);
doEveryAndNow(interval, r actualUpdate);
dm_registerAs_direct processSize();
}
void actualUpdate {
processSize = oshi_currentProcessResidentSize();
long mb = toM(processSize);
GlobalMemory mem = oshi_systemMemory();
long mb2 = freeSystemMemory(mem);
if (countSwap) mb2 -= mem.getSwapUsed();
mb2 = toM(mb2);
if (set_trueIfChanged(this, value := (showOSSizeInTray ? mb + " / " : "") + mb2)) {
fireChangeWithoutPersisting();
vmBus_send processSize(processSize);
}
toolTip(lbl, "OS size in memory: " + mb + " MB, free system memory: " + mb2 + " MB");
}
}