WARNING: Use of uninitialized value $spages ?

moxfan

Active Member
Aug 28, 2013
69
3
28
Hi,

I've just installed PMG-5 in an openVZ container (PVE 3.4, the container template is debian stretch from openvz.org) and all seems to be working fine.

But, I am getting copious amounts of this error in the log files in /var/log/ .
Code:
WARNING: Use of uninitialized value $spages in int at /usr/share/perl5/PVE/ProcFSTools.pm line 212.
Checking that line:
Code:
root@pmg1:~# sed -n '212p' /usr/share/perl5/PVE/ProcFSTools.pm
    $res->{memshared} = int($spages) * 4096;
Will it be safe using PMG-5 regardless of those errors?

Thanks.

Note: Please don't keep advising me that I should be upgrading the PVE and using LXC. ;)
 
Last edited:

tom

Proxmox Staff Member
Staff member
Aug 29, 2006
14,094
502
133
Note: Please don't keep advising me that I should be upgrading the PVE and using LXC. ;)
Seems you already knows the answer. OpenVZ on Proxmox VE is end of support.
 

web2wire

New Member
Mar 19, 2018
2
0
1
56
I had this same error yesterday installing PMG v5 on a Linode Debian 9 virtual server. I got around it in the end by doing the following at around line 211.

#my $spages = PVE::Tools::file_read_firstline("/sys/kernel/mm/ksm/pages_sharing");
#$res->{memshared} = int($spages) * 4096;
$res->{memshared} = $res->{memtotal}+$res->{swaptotal};


Which seemed to get me further, though I can't guarantee it's a valid tweak. There is no /sys/kernel/mm/ksm directory present on these systems.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE and Proxmox Mail Gateway. We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!