Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenVZ w/ UBC (User Bean Counters) - meminfo Buffers: not defined #10

Open
Cyth opened this issue Mar 31, 2014 · 1 comment
Open

OpenVZ w/ UBC (User Bean Counters) - meminfo Buffers: not defined #10

Cyth opened this issue Mar 31, 2014 · 1 comment

Comments

@Cyth
Copy link

Cyth commented Mar 31, 2014

Identified by; Existence of /proc/user_beancounters file.
Reproducible; Always
Workaround; Possibly upgrading to OpenVZ w/ VSwap, CentOS 6 on hardware node, or silencing error in file;

/opt/linode/longview/Linode/Longview/DataGetter/Memory.pm

Line 50;

( $dataref->{LONGTERM}->{'Memory.real.buffers'} ) = ( $meminfo =~ /Buffers:\s+(\d+)/ )[0] + 0;

Effect; (Every 30-31 seconds, or 5 minutes, a error is written in file:)

/var/log/linode/longview.log;
03/31 11:05:28 WARN Longview[22508] - Use of uninitialized value in addition (+) at /opt/linode/longview/Linode/Longview/DataGetter/Memory.pm line 50.

Steps to Authenticate; (Free shows 0 Buffers, but meminfo doesn't show Buffers.)

free -m
             total       used       free     shared    buffers     cached
Mem:           192        148         43          0          0         66
-/+ buffers/cache:         81        110
Swap:          192         45        146

cat /proc/meminfo
MemTotal:         196608 kB
MemFree:           44860 kB
Cached:            68152 kB
Active:            68708 kB
Inactive:          31604 kB
Active(anon):      16040 kB
Inactive(anon):    16120 kB
Active(file):      52668 kB
Inactive(file):    15484 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:        196608 kB
SwapFree:         150000 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:         32160 kB
Shmem:              6140 kB
Slab:              51420 kB
SReclaimable:      45048 kB
SUnreclaim:         6372 kB
@Cyth Cyth changed the title OpenVZ w/ UBC (User Bean Counters) OpenVZ w/ UBC (User Bean Counters) - meminfo Buffers: not defined Mar 31, 2014
@Cyth
Copy link
Author

Cyth commented Mar 31, 2014

I fixed the error myself;

    {
    no warnings 'uninitialized';
    ( $dataref->{LONGTERM}->{'Memory.real.buffers'} ) = ( $meminfo =~ /Buffers:\s+(\d+)/ )[0] + 0;
    }

Suppresses the uninitialized error. It no longer beeps uninitialized error in the log file. I suppose this is not the most desirable solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant