GPU사용율수정
This commit is contained in:
@@ -514,7 +514,8 @@ public class InferenceResultDto {
|
|||||||
@JsonIgnore private float cpu_system;
|
@JsonIgnore private float cpu_system;
|
||||||
@JsonIgnore private float memused;
|
@JsonIgnore private float memused;
|
||||||
private Long kbmemused;
|
private Long kbmemused;
|
||||||
private float gpuUtil;
|
@JsonIgnore private float gpuMemUsed;
|
||||||
|
@JsonIgnore private float gpuMemTotal;
|
||||||
|
|
||||||
// private String cpuStatusName;
|
// private String cpuStatusName;
|
||||||
// private String memStatusName;
|
// private String memStatusName;
|
||||||
@@ -526,6 +527,9 @@ public class InferenceResultDto {
|
|||||||
public float getCpuUseRate() {
|
public float getCpuUseRate() {
|
||||||
return this.cpu_user + this.cpu_system;
|
return this.cpu_user + this.cpu_system;
|
||||||
}
|
}
|
||||||
|
public double getGpuUtil() {
|
||||||
|
return (this.gpuMemUsed / this.gpuMemTotal ) * 100.0;
|
||||||
|
}
|
||||||
|
|
||||||
public String getServerStatus() {
|
public String getServerStatus() {
|
||||||
String enumId = "SAFETY";
|
String enumId = "SAFETY";
|
||||||
@@ -549,7 +553,8 @@ public class InferenceResultDto {
|
|||||||
|
|
||||||
public String getGpuStatus() {
|
public String getGpuStatus() {
|
||||||
String enumId = "SAFETY";
|
String enumId = "SAFETY";
|
||||||
if (this.gpuUtil >= 80) {
|
|
||||||
|
if (this.getGpuUtil() >= 80L) {
|
||||||
enumId = "CAUTION";
|
enumId = "CAUTION";
|
||||||
}
|
}
|
||||||
return enumId;
|
return enumId;
|
||||||
@@ -571,7 +576,7 @@ public class InferenceResultDto {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getGpuStatusName() {
|
public String getGpuStatusName() {
|
||||||
if (this.gpuUtil >= 80) {
|
if (this.getGpuUtil() >= 80) {
|
||||||
return ServerStatus.CAUTION.getText();
|
return ServerStatus.CAUTION.getText();
|
||||||
}
|
}
|
||||||
return ServerStatus.SAFETY.getText();
|
return ServerStatus.SAFETY.getText();
|
||||||
|
|||||||
@@ -135,7 +135,10 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
systemMetricEntity.cpuSystem,
|
systemMetricEntity.cpuSystem,
|
||||||
systemMetricEntity.memused,
|
systemMetricEntity.memused,
|
||||||
systemMetricEntity.kbmemused,
|
systemMetricEntity.kbmemused,
|
||||||
gpuMetricEntity.gpuUtil))
|
//gpuMetricEntity.gpuUtil,
|
||||||
|
gpuMetricEntity.gpuMemUsed,
|
||||||
|
gpuMetricEntity.gpuMemTotal
|
||||||
|
))
|
||||||
.from(systemMetricEntity)
|
.from(systemMetricEntity)
|
||||||
.leftJoin(gpuMetricEntity)
|
.leftJoin(gpuMetricEntity)
|
||||||
.on(
|
.on(
|
||||||
|
|||||||
Reference in New Issue
Block a user