Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Using IPC::SharedMem to get nattch for a specific address?

by fairlite (Novice)
on Oct 02, 2018 at 17:57 UTC ( #1223418=note: print w/replies, xml ) Need Help??


in reply to Using IPC::SharedMem to get nattch for a specific address?

After doing a bunch more research, I've discovered that you can get this data from /proc/sysvipc/shm on Linux. You need to do the UID mapping yourself, but the key value in that file, presented as a signed int, is what you want to use. Don't ask me why ipcs doesn't provide this itself. I tried a hex to decimal conversion, but that gave a value far, far different than the file cited above. I've since attached to the shared memory segment in question, and via doing what I know triggers sessions to attach/detach, I've been able to determine without doubt that I'm getting the proper count for the proper segment.

I'll leave this here in case it helps someone else. Shared memory isn't very well-documented in general. I think I went through about 30 resources before stumbling onto the right area to search.

  • Comment on Re: Using IPC::SharedMem to get nattch for a specific address?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1223418]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2019-11-21 14:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (104 votes). Check out past polls.

    Notices?