Skip to content
New issue

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

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

Already on GitHub? # to your account

sysinfo virtualisation (totalram) #202

Closed
zerkms opened this issue Jul 16, 2017 · 7 comments
Closed

sysinfo virtualisation (totalram) #202

zerkms opened this issue Jul 16, 2017 · 7 comments

Comments

@zerkms
Copy link

zerkms commented Jul 16, 2017

I just posted #200 specifically about sysinfo.uptime, but now I found that at least some other fields are not virtualised either

#include <stdio.h>
#include <sys/sysinfo.h>

int main ()
{
 struct sysinfo si;
 sysinfo (&si);
 printf ("totalram %lu\n", si.totalram);
 return 0;
}

This outputs the total amount of memory the host machine has, not the container.

totalram 8369901568

/proc/meminfo has the correct numbers.

MemTotal:        1048576 kB
@hallyn
Copy link
Member

hallyn commented Aug 9, 2017

Sorry, sysinfo cannot be handled by lxcfs.

@hallyn hallyn closed this as completed Aug 9, 2017
@zerkms
Copy link
Author

zerkms commented Aug 9, 2017

@hallyn but openvz could do that, or am I confusing something?

@hallyn
Copy link
Member

hallyn commented Aug 9, 2017 via email

@zerkms
Copy link
Author

zerkms commented Aug 9, 2017

Oh, I see now. Thanks for the clarification!

@hallyn
Copy link
Member

hallyn commented Aug 9, 2017 via email

@zerkms
Copy link
Author

zerkms commented Aug 9, 2017

It actually is zabbix that does it, so I think it's time to report them when I have enough time to check what they have in the master branch.

@hallyn
Copy link
Member

hallyn commented Aug 9, 2017 via email

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

No branches or pull requests

2 participants