}
if (sigar == null) {
sigar = newSigar();
}
metricRegistry.registerAll(init(new CpuMetricSet(sigar, sigar.getCpuInfoList()[0])));
metricRegistry.registerAll(init(new MemoryMetricSet(sigar)));
metricRegistry.registerAll(init(new SwapMetricSet(sigar)));
for (String ifname : sigar.getNetInterfaceList()) {
metricRegistry.registerAll(init(new NetworkMetricSet(ifname, sigar)));
}