6 ms·
Show HN: hazelnut – A pythonic library to parse /proc/meminfo
- deleted 11y ago[deleted]
- franciscop 11y agoI happened to have hazelnut.io until recently. Unfortunately I let it expire since the original project I was planning on using there was much more complex than anticipated. So now it's parked by someone else [1], otherwise it was yours [1] http://who.is/whois/hazelnut.io http://who.is/whois/hazelnut.io
- mrsmn 11y agoShame I didn't post this earlier, that TLD would have been awesome.
- tobltobs 11y agoWhat are those keys in your donate paragraph?
- mrsmn 11y agoThose are Worldcoin, Hobonickels and Dogecoin cryptocurrency addresses.
- ccannon 11y agoHow is this different than psutil?
- easytiger 11y agothis is `cat /proc/meminfo | grep Swap`
- Goopplesoft 11y agoThe API of this lib is probably surprising for the typical use-cases because a MemInfo object only represents a path and not a reading/snapshot of the file (each subsequent call to get() re-reads the meminfo file). > https://github.com/mrsmn/hazelnut/blob/master/hazelnut/core.py#L33 https://github.com/mrsmn/hazelnut/blob/master/hazelnut/core.... So usage like: snap_pre = MemInfo() # Do stuff here snap_post = MemInfo() snap_pre.get('Mem') snap_post.get('Mem') snap_post.get('Mem') # All three would likely give different values. I would suggest caching the read on instantiation or making them top level functions instead of using a class or MemInfoPath()?
- srcmap 11y agoYou can cross reference of /proc/meminfo output into the kernel source code here: http://www.srcmap.org/sd_share/7/28338946/Code_Trace_of_Linux_Kernel_proc_meminfo.html http://www.srcmap.org/sd_share/7/28338946/Code_Trace_of_Linu...