mirror of
git://git.proxmox.com/git/pve-common.git
synced 2025-01-06 21:17:37 +03:00
memory info: add regex anchor to avoid false positives
if arcstat gets re-ordered or new field that includes 'size' gets added at the top Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
c153bf020f
commit
52620f86bd
@ -309,7 +309,7 @@ sub read_meminfo {
|
||||
$res->{memshared} = int($spages) * 4096;
|
||||
|
||||
my $arc_stats = eval { PVE::Tools::file_get_contents("/proc/spl/kstat/zfs/arcstats") };
|
||||
if ($arc_stats && $arc_stats =~ m/size\s+\d+\s+(\d+)/m) {
|
||||
if ($arc_stats && $arc_stats =~ m/^size\s+\d+\s+(\d+)$/m) {
|
||||
$res->{arcsize} = int($1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user