- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Is there a documented limit on shm_nattach?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2004 04:16 AM
05-05-2004 04:16 AM
Is there a documented limit on shm_nattach?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2004 04:28 AM
05-05-2004 04:28 AM
Re: Is there a documented limit on shm_nattach?
Another "gotcha" is trying to attach a shmseg that was originally created in 64-bit land to a 32-bit process. This can be made to work but you have to play by a very strict set of rules.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2004 04:33 AM
05-05-2004 04:33 AM
Re: Is there a documented limit on shm_nattach?
More likely that there's another reason you can't attach... at the least the error you get back from shmat() would help. Posting the pertinent sections of the code would be better (in case there's a typo in how you're getting the id or something).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2004 04:35 AM
05-05-2004 04:35 AM
Re: Is there a documented limit on shm_nattach?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2004 05:37 AM
05-05-2004 05:37 AM
Re: Is there a documented limit on shm_nattach?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2004 05:48 AM
05-05-2004 05:48 AM
Re: Is there a documented limit on shm_nattach?
shmid = shmget(key, SHMSZ, 0666)
Output of my test program follows:
------------------------------------
Current status for shmid 27678:
PID of Creator = 5890
PID 5890 is running
Command:bptm
Owner = bob
Key = 0
Size = 1048576
Current Attaches = 4
Last Change Time = Tue May 4 15:37:11 2004
Permissions: -rw------- (0x8180)
First 16 bytes of shared memory ID=35
0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
Current status for shmid 30731:
PID of Creator = 4371
PID 4371 is running
Command:shmtest
Owner = bob
Key = 0x207c16e9
Size = 769470464
Current Attaches = 6
Last Change Time = Sun May 2 08:57:37 2004
Permissions: -rw------- (0x8180)
shmtest(0x207c16e9): errno=2 for shmget(), No such file or directory
----------------------------------------
As you can see I own (bob does) both segments but the second attach fails.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2004 06:39 AM
05-05-2004 06:39 AM
Re: Is there a documented limit on shm_nattach?
One that I note is that you are not using a zero size (unless your SHMSZ constant is zero) to get an existing shm segment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2004 06:39 AM
05-05-2004 06:39 AM
Re: Is there a documented limit on shm_nattach?
One thing that I note is that you are not using a zero size (unless your SHMSZ constant is zero) to get an existing shm segment.