RAM usage +
Introduced a new field to track memory usage in the backend status structure, allowing the server to report memory utilization as a percentage Implemented a Linux-specific routine to read /proc/meminfo and calculate the memory usage percentage, and integrated this into the status query Added serialization for the memory usage field so it is included in JSON responses Updated the frontend class to deserialize and display memory usage alongside CPU usage on the status readout
This commit is contained in:
@@ -68,6 +68,7 @@ export default class JackHostStatus {
|
||||
this.errorMessage = input.errorMessage;
|
||||
this.underruns = input.underruns;
|
||||
this.cpuUsage = input.cpuUsage;
|
||||
this.memoryUsage = input.memoryUsage;
|
||||
this.msSinceLastUnderrun = input.msSinceLastUnderrun;
|
||||
this.temperaturemC = input.temperaturemC;
|
||||
this.cpuFreqMax = input.cpuFreqMax;
|
||||
@@ -84,6 +85,7 @@ export default class JackHostStatus {
|
||||
restarting: boolean = false;
|
||||
underruns: number = 0;
|
||||
cpuUsage: number = 0;
|
||||
memoryUsage: number = 0;
|
||||
msSinceLastUnderrun: number = -5000 * 1000;
|
||||
temperaturemC: number = -1000000;
|
||||
cpuFreqMax: number = 0;
|
||||
@@ -177,6 +179,11 @@ export default class JackHostStatus {
|
||||
CPU: {cpuDisplay(status.cpuUsage)}
|
||||
</Typography>
|
||||
</span>
|
||||
<span style={{ color: underrunError ? RED_COLOR : GREEN_COLOR }}>
|
||||
<Typography variant="caption" color="inherit">
|
||||
MEM: {cpuDisplay(status.memoryUsage)}
|
||||
</Typography>
|
||||
</span>
|
||||
|
||||
<span style={{ color: GREEN_COLOR }}>
|
||||
<Typography variant="caption" color="inherit">{tempDisplay(status.temperaturemC)}</Typography>
|
||||
|
||||
Reference in New Issue
Block a user