@@ -394,7 +394,7 @@ private static String printCpu(CentralProcessor processor) {
394394 long steal = ticks [TickType .STEAL .getIndex ()] - prevTicks [TickType .STEAL .getIndex ()];
395395 long totalCpu = user + nice + sys + idle + iowait + irq + softirq + steal ;
396396
397- stringBuffer .append (String .format ("User : %.1f%% Nice: %.1f%% System: %.1f%% Idle: %.1f%% IOwait: %.1f%% IRQ: %.1f%% SoftIRQ: %.1f%% Steal: %.1f%%%n" ,
397+ stringBuffer .append (String .format ("\n User : %.1f%% Nice: %.1f%% System: %.1f%% Idle: %.1f%% IOwait: %.1f%% IRQ: %.1f%% SoftIRQ: %.1f%% Steal: %.1f%%%n" ,
398398 100d * user / totalCpu , 100d * nice / totalCpu , 100d * sys / totalCpu , 100d * idle / totalCpu ,
399399 100d * iowait / totalCpu , 100d * irq / totalCpu , 100d * softirq / totalCpu , 100d * steal / totalCpu ));
400400 stringBuffer .append (String .format ("CPU load: %.1f%% (counting ticks)%n" , processor .getSystemCpuLoadBetweenTicks () * 100 ));
@@ -433,9 +433,9 @@ private static String printProcesses(OperatingSystem os, GlobalMemory memory) {
433433 private static String printSensors (Sensors sensors ) {
434434 StringBuffer stringBuffer = new StringBuffer ();
435435 stringBuffer .append ("\n Sensors:" );
436- stringBuffer .append (String .format (" CPU Temperature: %.1f°C%n" , sensors .getCpuTemperature ()));
436+ stringBuffer .append (String .format ("\n CPU Temperature: %.1f°C%n" , sensors .getCpuTemperature ()));
437437// stringBuffer.append("\n Fan Speeds: " + Arrays.toString(sensors.getFanSpeeds()));
438- stringBuffer .append (String .format (" CPU Voltage: %.1fV%n" , sensors .getCpuVoltage ()));
438+ stringBuffer .append (String .format ("\n CPU Voltage: %.1fV%n" , sensors .getCpuVoltage ()));
439439 return stringBuffer .toString ();
440440 }
441441
0 commit comments