Great to see this! Are you planning to send a PR so this gets merged into upstream?
It is already merged into upstream, thanks! :-)
Yeah they were very responsive when I was upstreaming Fuchsia compatibility.
This is a nice effort, but one wonders why the author doesn’t want to use vmstat(8).
Side note: The author doesn’t seem to be too familiar with OpenBSD and its conventions. The man page was written in man(7), which is deprecated in favor of mdoc(7) on OpenBSD
Thanks for educating me about the distinction: https://github.com/blinkkin/blinkkin.github.com/wiki/man-vs-mdoc
I’d suggest Practical UNIX Manuals for introductionary reading for mdoc, too: https://manpages.bsd.lv/mdoc.html
Thanks very much for your pointing out to use mdoc!
Compared to vmstat(8), my simple toy has following differences:
(1) Add displaying swap space;
(2) Only consider active pages as “used” memory, others are all counted as “free” memory.IMHO, for the end user who doesn’t care the guts of Operating System, maybe this method is more plausible?
All in all, I just write a small tool for fun, and thanks very much again for giving pertinent advice!
Agreed. Sometimes you don’t really care about everything vmstat offers. free is dirty neat :)
P.S. After some testing, I modify the calculating free method just now: use free pages as “free” memory, then others are considered as “used” memory.
Next Year in Christchurch New Zealand! https://twitter.com/linuxconfau2019
I look forward to welcoming you in person!
New Zealand is a beautiful country. Hope I can get the opportunity to take part in linuxconfau2019.
While I’m sure there will be some activities associated with the conference, there is a lot more to see and do.
So if you do come, take a bit of vacation leave after the conf so you can do a few trips into the mountains or to the beaches.
Not really a lot of meat here. @nanxiao, I’m not sure if English is your first language but “cautious” is not really the right word to use here. This post is just describe some rules of the language, there isn’t much caution to be had. Perhaps “Be aware …” would be a slightly better title.
@apy Got it! Thanks for your comments!
Is it just me, or is the page only using half of the screen width, making it quite hard to read o a mobile device?
It’s not just you.
I fix the theme, thanks!
thanks, much better now
You mentioned missing some talks. Is there any official way to watch videos of all the presentations? It’d be nice to see them all recorded and posted as a playlist on YouTube, perhaps in their official channel. I looked around but can’t find a collection of them.
I think this is the official youtube channel: https://www.youtube.com/user/CppCon/playlists. It seems the videos for CppCon 2017 are still being uploaded.
Thanks. I’ll check again in a week and maybe they will be complete.
Ran on macOS just to see what happens:
Byte Order: Little Endian
Total CPU(s): 4
Model name: MacBookPro11,1
I appreciate graceful degradation!
I update the code, so it can run on macOS now:-). When you have time, you can try it, thanks!
Works as intended for me on Intel Pentium and Xeons with FreeBSD.
Feature request: also show frequencies (min, max, current).
Both OpenBSD and FreeBSD’ sysctl(3) interface lack mib code to get frequencies. CPUID instruction can’t take effect. So I need to consider other methods, thanks for your feedback!