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

Enhancements to /proc/meminfo #1672

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

emkey1
Copy link
Contributor

@emkey1 emkey1 commented Dec 27, 2021

MemTotal:       68719476 kB
MemFree:         1210925 kB
MemAvailable:    3060908 kB
MemShared:       1210925 kB
Active:         20130316 kB
Inactive:       20031979 kB
SwapCached:            0 kB
Shmem:                 0 kB
Buffers:               0 kB
Cached:           104742 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:             0 kB
Mapped:                0 kB
Slab:                  0 kB
Swapins:               0 kB
Swapouts:              0 kB
WireCount:       4128555 kB

@emkey1
Copy link
Contributor Author

emkey1 commented Dec 28, 2021

I just wanted to note that the failures above appear to be issues with GitHub at the time the checks were run. The PR compiles and appears to work as intended.

Comment on lines +45 to +48
// Stuff that doesn't map elsehwere
show_kb(buf, "Swapins: ", usage.swapins);
show_kb(buf, "Swapouts: ", usage.swapouts);
show_kb(buf, "WireCount: ", usage.wirecount);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So one thing that concerns me is that procfs is part of the Linux kernel ABI, and adding arbitrary stuff to it may break things.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, as I recall, I was just replicating what I saw in /proc/meminfo on a 32 bit Intel VM I setup.

Or am I misunderstanding?

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

Successfully merging this pull request may close these issues.

None yet

2 participants