Update patches to use hw.cpuonline
ok jasper@ (maintainer)
This commit is contained in:
parent
12d2010186
commit
7d2cafe0aa
@ -1,10 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.9 2018/09/04 12:46:10 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.10 2018/09/07 20:19:48 danj Exp $
|
||||
|
||||
COMMENT= PostgreSQL performances monitoring and auditing tool
|
||||
|
||||
DISTNAME= pgcluu-2.7
|
||||
CATEGORIES= databases sysutils
|
||||
REVISION= 0
|
||||
REVISION= 1
|
||||
|
||||
HOMEPAGE= http://pgcluu.darold.net/
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-pgcluu,v 1.5 2018/07/27 19:14:59 jasper Exp $
|
||||
$OpenBSD: patch-pgcluu,v 1.6 2018/09/07 20:19:48 danj Exp $
|
||||
|
||||
- Set $sysinfo{"KERNEL"} and $sysinfo{"CPU"} (minus cache) values
|
||||
|
||||
@ -17,7 +17,7 @@ Index: pgcluu
|
||||
- $sysinfo{$section}{'cpu MHz'} = $1;
|
||||
- $sysinfo{$section}{$key} = $val;
|
||||
+ my ($key, $val) = split(/=/, $l);
|
||||
+ if ($key eq 'hw.ncpu') {
|
||||
+ if ($key eq 'hw.ncpuonline') {
|
||||
+ $sysinfo{$section}{'processor'} = $val;
|
||||
+ } elsif ($key eq 'hw.model') {
|
||||
+ $sysinfo{$section}{'model name'} = $val;
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-pgcluu_collectd,v 1.5 2018/07/27 19:14:59 jasper Exp $
|
||||
$OpenBSD: patch-pgcluu_collectd,v 1.6 2018/09/07 20:19:48 danj Exp $
|
||||
|
||||
- Set $sysinfo{"RELEASE"}, $sysinfo{"CPU"} (minus cache)
|
||||
|
||||
@ -10,7 +10,7 @@ Index: pgcluu_collectd
|
||||
|
||||
# Look at CPU informations
|
||||
- my $cmd = 'cat /proc/cpuinfo 2>/dev/null';
|
||||
+ my $cmd = 'sysctl hw.ncpu hw.model hw.cpuspeed 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`;
|
||||
|
Loading…
Reference in New Issue
Block a user