> uname -smrsv
HP-UX B.11.23 U ia64
I displayed similar information of shared memory segments via 'ipcs -
m' and struct pst_shminfo
> ipcs -mb
IPC status from /dev/kmem as of Thu Mar 13 07:49:12 2008
T ID KEY MODE OWNER GROUP SEGSZ
Shared Memory:
m 0 0x411c11f2 --rw-rw-rw- root root 348
m 1 0x4e0c0002 --rw-rw-rw- root root 61760
m 2 0x4128002f --rw-rw-rw- root root 8192
m 3 0x00a5c581 --rw------- user0 users 10469376
m 360452 0x0c6629c9 --rw-r----- root root 21968472
m 5 0x06347849 --rw-rw-rw- root root 65544
m 65542 0x491421e2 --rw-r--r-- root root 22908
m 1474567 0x41bd82ec --rw-r----- oracle dba 4211093504
m 24477704 0x00000000 D-rw------- -1 -1 46084
m 9 0x01300072 --rw-rw-rw- root root 1024
m 10 0x01300090 --rw-rw-rw- root root 1078
m 11 0x0130009f --rw-rw-rw- root root 1070
m 12 0x013000a3 --rw-rw-rw- root root 1034
m 13 0x013000aa --rw-rw-rw- root root 1036
m 14 0x013000a9 --rw-rw-rw- root root 1042
m 326139919 0x0072e930 --rw-rw---- user1 pm 4294967296
m 27394064 0x00000000 D-rw-rw---- user2 cc 4294967296
m 339607569 0x006cc104 --rw-rw---- user3 pm 4294967296
m 21430292 0x00006c98 --rw-rw---- user2 cc 4294967296
---> via struct pst_shminfo
First column in this table is pst_idx.
id owner key size cur # of
procs attached cur # attached
0 0 0x411c11f2
348 0 0
1 0 0x4e0c0002
61760 1 0
2 0 0x4128002f
8192 1 0
3 102 0xa5c581
10469376 1 0
4 0 0xc6629c9
21968472 2 2
5 0 0x6347849
65544 2 0
6 0 0x491421e2
22908 0 1
7 269 0x41bd82ec
4211093504 19 19
8 -1 0
46084 3 1
9 0 0x1300072
1024 2 0
10 0 0x1300090
1078 2 0
11 0 0x130009f
1070 2 0
12 0 0x13000a3
1034 2 0
13 0 0x13000aa
1036 2 0
14 0 0x13000a9
1042 2 0
15 75308 0x72e930
4294967296 0 2
16 278 0
4294967296 1 2
17 71273 0x6cc104
4294967296 0 2
20 278 0x6c98
4294967296 1 2
We can see that shm segment id
* via 'ipcs -m'
and
* via struct pst_shminfo
is not always the same value.
What is a reason for that difference?
Can we get the shm id (as in 'ipcs -m') via struct pst_shminfo?
-------------------
Another question.
What is the difference between pst_nattch and pst_cnattch in struct
pst_shminfo?
Thanks.
Alex Vinokur
email: alex DOT vinokur AT gmail DOT com
http://mathforum.org/library/view/10978.html http://sourceforge.net/users/alexvn