[pve-devel] [PATCH pve-manager 3/3] pvestatd: host: broadcast rrd ksm metric
Alexandre Derumier
aderumier at odiso.com
Wed May 25 08:52:20 CEST 2022
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
PVE/Service/pvestatd.pm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/PVE/Service/pvestatd.pm b/PVE/Service/pvestatd.pm
index 7ed12504..1e7400e0 100755
--- a/PVE/Service/pvestatd.pm
+++ b/PVE/Service/pvestatd.pm
@@ -170,12 +170,16 @@ sub update_node_status {
blockstat => $dinfo,
nics => $netdev,
pressure => $pressure,
+ ksm => $meminfo->{memshared},
};
$node_metric->{cpustat}->@{qw(avg1 avg5 avg15)} = ($avg1, $avg5, $avg15);
$node_metric->{cpustat}->{cpus} = $maxcpu;
broadcast_rrd_pressure($ctime, $node_metric, "pve2-metrics/nodes/$nodename");
+ my $single_metrics = ['ksm'];
+ broadcast_rrd_metrics($ctime, $node_metric, $single_metrics, "pve2-metrics/nodes/$nodename");
+
my $transactions = PVE::ExtMetric::transactions_start($status_cfg);
PVE::ExtMetric::update_all($transactions, 'node', $nodename, $node_metric, $ctime);
PVE::ExtMetric::transactions_finish($transactions);
--
2.30.2
More information about the pve-devel
mailing list