Update drawio file

This commit is contained in:
Mark Nellemann 2022-12-20 08:51:16 +01:00
parent 425cf54d6a
commit 12b1ca4724
4 changed files with 775 additions and 17 deletions

File diff suppressed because one or more lines are too long

View file

@ -30,16 +30,22 @@ public class CapacityToDoubleConverter extends StdConverter<String, Double> {
log.debug("Input: {} {}", input, unit); log.debug("Input: {} {}", input, unit);
double output = input; double output = input;
if(unit.equals("PB")) { switch (unit) {
case "PB":
output = input * 1000; output = input * 1000;
} else if(unit.equals("TB")) { break;
case "TB":
output = input; output = input;
} else if(unit.equals("GB")) { break;
case "GB":
output = input / 1000; output = input / 1000;
} else if(unit.equals("MB")) { break;
case "MB":
output = input / 1_000_000; output = input / 1_000_000;
} else { break;
default:
log.warn("convert() - Unit {} not supported.", unit); log.warn("convert() - Unit {} not supported.", unit);
break;
} }
log.debug("Output: {} TB", output); log.debug("Output: {} TB", output);

View file

@ -22,10 +22,10 @@ class DeserializationTest extends Specification {
} }
void "lssystem"() { void "lssystem v8_4"() {
when: when:
Path testConfigurationFile = Paths.get(getClass().getResource('/json/lssystem.json').toURI()) Path testConfigurationFile = Paths.get(getClass().getResource('/json/v8.4/lssystem.json').toURI())
System system = mapper.readerFor(System.class).readValue(testConfigurationFile.toFile()) System system = mapper.readerFor(System.class).readValue(testConfigurationFile.toFile())
then: then:
@ -38,10 +38,10 @@ class DeserializationTest extends Specification {
} }
void "lsnodestat"() { void "lsnodestat v8_4"() {
when: when:
Path testConfigurationFile = Paths.get(getClass().getResource('/json/lsnodestats.json').toURI()) Path testConfigurationFile = Paths.get(getClass().getResource('/json/v8.4/lsnodestats.json').toURI())
List<NodeStat> nodeStats = Arrays.asList(mapper.readerFor(NodeStat[].class).readValue(testConfigurationFile.toFile())) List<NodeStat> nodeStats = Arrays.asList(mapper.readerFor(NodeStat[].class).readValue(testConfigurationFile.toFile()))
then: then:
@ -52,10 +52,24 @@ class DeserializationTest extends Specification {
} }
void "lsenclosurestats"() { void "lsnodestat v8_5"() {
when: when:
Path testConfigurationFile = Paths.get(getClass().getResource('/json/lsenclosurestats.json').toURI()) Path testConfigurationFile = Paths.get(getClass().getResource('/json/v8.5/lsnodestats_8.5.2.2.json').toURI())
List<NodeStat> nodeStats = Arrays.asList(mapper.readerFor(NodeStat[].class).readValue(testConfigurationFile.toFile()))
then:
nodeStats.size() == 92
nodeStats.get(3).nodeName == "node1"
nodeStats.get(3).statName == "fc_io"
nodeStats.get(3).statCurrent == 2115
}
void "lsenclosurestats v8_4"() {
when:
Path testConfigurationFile = Paths.get(getClass().getResource('/json/v8.4/lsenclosurestats.json').toURI())
List<EnclosureStat> enclosureStats = Arrays.asList(mapper.readerFor(EnclosureStat[].class).readValue(testConfigurationFile.toFile())) List<EnclosureStat> enclosureStats = Arrays.asList(mapper.readerFor(EnclosureStat[].class).readValue(testConfigurationFile.toFile()))
then: then:

View file

@ -0,0 +1,738 @@
[
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "compression_cpu_pc",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "6",
"stat_name" : "cpu_pc",
"stat_peak" : "6",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "fc_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "2115",
"stat_name" : "fc_io",
"stat_peak" : "2172",
"stat_peak_time" : "221218114529"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "sas_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "sas_io",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "iscsi_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "iscsi_io",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "write_cache_pc",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "79",
"stat_name" : "total_cache_pc",
"stat_peak" : "79",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "vdisk_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "vdisk_io",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0.000",
"stat_name" : "vdisk_ms",
"stat_peak" : "0.000",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "mdisk_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "mdisk_io",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0.000",
"stat_name" : "mdisk_ms",
"stat_peak" : "0.000",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "397",
"stat_name" : "drive_mb",
"stat_peak" : "459",
"stat_peak_time" : "221218114449"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "1581",
"stat_name" : "drive_io",
"stat_peak" : "1829",
"stat_peak_time" : "221218114449"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0.379",
"stat_name" : "drive_ms",
"stat_peak" : "0.536",
"stat_peak_time" : "221218114800"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "vdisk_r_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "vdisk_r_io",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0.000",
"stat_name" : "vdisk_r_ms",
"stat_peak" : "0.000",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "vdisk_w_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "vdisk_w_io",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0.000",
"stat_name" : "vdisk_w_ms",
"stat_peak" : "0.000",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "mdisk_r_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "mdisk_r_io",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0.000",
"stat_name" : "mdisk_r_ms",
"stat_peak" : "0.000",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "mdisk_w_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "mdisk_w_io",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0.000",
"stat_name" : "mdisk_w_ms",
"stat_peak" : "0.000",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "397",
"stat_name" : "drive_r_mb",
"stat_peak" : "459",
"stat_peak_time" : "221218114449"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "1581",
"stat_name" : "drive_r_io",
"stat_peak" : "1829",
"stat_peak_time" : "221218114449"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0.379",
"stat_name" : "drive_r_ms",
"stat_peak" : "0.536",
"stat_peak_time" : "221218114800"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "drive_w_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "drive_w_io",
"stat_peak" : "5",
"stat_peak_time" : "221218114830"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0.000",
"stat_name" : "drive_w_ms",
"stat_peak" : "0.055",
"stat_peak_time" : "221218114800"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "iplink_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "120",
"stat_name" : "iplink_io",
"stat_peak" : "444",
"stat_peak_time" : "221218114504"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "iplink_comp_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "cloud_up_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "cloud_up_ms",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "cloud_down_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "cloud_down_ms",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "iser_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "1",
"node_name" : "node1",
"stat_current" : "0",
"stat_name" : "iser_io",
"stat_peak" : "0",
"stat_peak_time" : "221218114920"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "compression_cpu_pc",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "5",
"stat_name" : "cpu_pc",
"stat_peak" : "6",
"stat_peak_time" : "221218114541"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "fc_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "1924",
"stat_name" : "fc_io",
"stat_peak" : "2130",
"stat_peak_time" : "221218114826"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "sas_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "sas_io",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "iscsi_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "iscsi_io",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "write_cache_pc",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "79",
"stat_name" : "total_cache_pc",
"stat_peak" : "79",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "vdisk_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "vdisk_io",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0.000",
"stat_name" : "vdisk_ms",
"stat_peak" : "0.000",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "mdisk_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "mdisk_io",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0.000",
"stat_name" : "mdisk_ms",
"stat_peak" : "0.000",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "drive_mb",
"stat_peak" : "50",
"stat_peak_time" : "221218114546"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "drive_io",
"stat_peak" : "202",
"stat_peak_time" : "221218114546"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0.000",
"stat_name" : "drive_ms",
"stat_peak" : "0.606",
"stat_peak_time" : "221218114821"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "vdisk_r_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "vdisk_r_io",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0.000",
"stat_name" : "vdisk_r_ms",
"stat_peak" : "0.000",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "vdisk_w_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "vdisk_w_io",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0.000",
"stat_name" : "vdisk_w_ms",
"stat_peak" : "0.000",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "mdisk_r_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "mdisk_r_io",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0.000",
"stat_name" : "mdisk_r_ms",
"stat_peak" : "0.000",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "mdisk_w_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "mdisk_w_io",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0.000",
"stat_name" : "mdisk_w_ms",
"stat_peak" : "0.000",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "drive_r_mb",
"stat_peak" : "50",
"stat_peak_time" : "221218114546"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "drive_r_io",
"stat_peak" : "202",
"stat_peak_time" : "221218114546"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0.000",
"stat_name" : "drive_r_ms",
"stat_peak" : "0.606",
"stat_peak_time" : "221218114821"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "drive_w_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "drive_w_io",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0.000",
"stat_name" : "drive_w_ms",
"stat_peak" : "0.000",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "iplink_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "470",
"stat_name" : "iplink_io",
"stat_peak" : "620",
"stat_peak_time" : "221218114516"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "iplink_comp_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "cloud_up_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "cloud_up_ms",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "cloud_down_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "cloud_down_ms",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "iser_mb",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
},
{
"node_id" : "2",
"node_name" : "node2",
"stat_current" : "0",
"stat_name" : "iser_io",
"stat_peak" : "0",
"stat_peak_time" : "221218114921"
}
]