$OpenBSD: patch-pgcluu_collectd,v 1.6 2018/09/07 20:19:48 danj Exp $

- Set $sysinfo{"RELEASE"}, $sysinfo{"CPU"} (minus cache)

Index: pgcluu_collectd
--- pgcluu_collectd.orig
+++ pgcluu_collectd
@@ -1523,9 +1523,9 @@ sub grab_os_information
 {
 
 	# Look at CPU informations
-	my $cmd = 'cat /proc/cpuinfo 2>/dev/null';
+	my $cmd = 'sysctl hw.ncpuonline hw.model hw.cpuspeed 2>/dev/null';
 	$cmd = $sshcmd . ' "' . $cmd . "\"" if ($sshcmd);
-	my @cpuinfo = `$cmd | grep -E "model name|cpu MHz|cache size|cpu cores|processor"`;
+	my @cpuinfo = `$cmd`;
 	# Look at kernel informations
 	$cmd = 'uname -a  2>/dev/null';
 	$cmd = $sshcmd . ' "' . $cmd . "\"" if ($sshcmd);
@@ -1551,8 +1551,7 @@ sub grab_os_information
 	$cmd = $sshcmd . ' "' . $cmd . "\"" if ($sshcmd);
 	my @pciinfo = `$cmd`;
 	# Release informations
-	$cmd = 'cat /etc/*release 2>/dev/null';
-	$cmd = $sshcmd . ' "' . $cmd . "\"" if ($sshcmd);
+	$cmd = 'uname -srv 2>/dev/null';
 	my @releaseinfo = `$cmd`;
 	# Process list
 	$cmd = 'ps -faux 2>/dev/null';
