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

Fixed memory reporting for Darwin and Linux systems. #131

Closed
wants to merge 2 commits into from

Conversation

subhachandrachandra
Copy link

hw.memsize is reported as bytes instead of pages.

@subhachandrachandra
Copy link
Author

Old and new reported values on my 8GB laptop

[] mem_total value=35184372088832

[] mem_total value=8589934592

/proc/meminfo reports memory in KiloBytes and so needs a multiplier of 1024 instead of 1000.
The kernel reports in terms of pages and the proc filesystem is left shifting by 2 for 4KB pages to get KB. Since this is a binary shift, Bytes will need to shift by 10 and so get multiplied by 1024.

From the kernel code. PAGE_SHIFT = 12 for 4KB pages
"MemTotal:       %8lu kB\n", K(i.totalram)
@subhachandrachandra subhachandrachandra changed the title Fixed total memory reporting for Darwin systems. Fixed memory reporting for Darwin and Linux systems. Aug 21, 2015
@sparrc
Copy link
Contributor

sparrc commented Aug 24, 2015

looks good, thank you @subhachandrachandra!

Could you please update the CHANGELOG with your change under bugfixes and you'll also need to sign the CLA, I'll send the details shortly

@sparrc
Copy link
Contributor

sparrc commented Aug 24, 2015

@subhachandrachandra, please sign the CLA via the google doc at the end of this page: https://influxdb.com/community/cla.html

After you do that and update the CHANGELOG, I will merge the PR, thanks!

@sparrc
Copy link
Contributor

sparrc commented Aug 25, 2015

@subhachandrachandra I'd like to get this merged, do you think you can sign the CLA? https://influxdb.com/community/cla.html

@sparrc sparrc closed this in 8d034f5 Aug 25, 2015
@subhachandrachandra
Copy link
Author

Hi Cameron,

Just waiting for someone to signoff on it. Will do it shortly.

Chandra
On Aug 25, 2015 1:07 PM, "Cameron Sparr" notifications@github.com wrote:

@subhachandrachandra https://github.com/subhachandrachandra I'd like to
get this merged, do you think you can sign the CLA?
https://influxdb.com/community/cla.html


Reply to this email directly or view it on GitHub
#131 (comment).

@subhachandrachandra
Copy link
Author

Hi Cameron,

I did sign the CLA and hopefully you received the submitted form.

Chandra

@sparrc
Copy link
Contributor

sparrc commented Aug 28, 2015

got it, thank you!

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