eminence / procfs

Rust library for reading the Linux procfs filesystem
Other
367 stars 106 forks source link

/proc/sysvipc/shm #154

Closed tatref closed 2 years ago

tatref commented 2 years ago

This is related to my last commit to add /SYSV paths to the memory maps (#151)

Output of the example:

key: 0, shmid: 4
============
2262: ["/usr/bin/gnome-shell"]
2284: ["/usr/bin/Xwayland", ":0", "-rootless", "-terminate", "-accessx", "-core", "-listen", "4", "-listen", "5", "-displayfd", "6"]

I check with Oracle databases that make huge usage of shared memory, it works as expected.

This PR seems good to me, but I wouldn't mind somebody else checking the types of the fields in the Shm struct as I'm not very fluent in C.

I'll also try add comments to theses fields

eminence commented 2 years ago

With a quick skim, this looks OK to me. I would be nice to have all the fields of Shm documented, but it's not required for a first version.

tatref commented 2 years ago

I added doc for every items, hopefully it's correct!

eminence commented 2 years ago

Can you rebase this on top of the latest master branch?

eminence commented 2 years ago

What do you think is left for the PR? Is it still a "WIP" ?

tatref commented 2 years ago

I fixed some comments in the example file, I think this PR is finished. You can merge it if it's good for you.

pymongo commented 2 years ago

I think you should squash five commit to one commit

eminence commented 2 years ago

Thanks!