* Process <-> Shared Memory
@ 2001-03-14 19:19 Mario Stargard
2001-03-15 1:42 ` David Singleton
2001-03-19 13:02 ` Jörg Bochert
0 siblings, 2 replies; 8+ messages in thread
From: Mario Stargard @ 2001-03-14 19:19 UTC (permalink / raw)
How can I find out what processes are attached to a shared memory
segment? I'm on Tru64 4.0f.
Thanks,
Mario
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Process <-> Shared Memory
2001-03-14 19:19 Process <-> Shared Memory Mario Stargard
@ 2001-03-15 1:42 ` David Singleton
2001-03-16 17:39 ` Mario Stargard
2001-03-19 13:02 ` Jörg Bochert
1 sibling, 1 reply; 8+ messages in thread
From: David Singleton @ 2001-03-15 1:42 UTC (permalink / raw)
Mario Stargard <mstargard@hotmail.com> wrote:
> How can I find out what processes are attached to a shared memory
> segment? I'm on Tru64 4.0f.
I have exactly the same question (but for 5.1) - please let me know if
you get an answer.
------
David.Singleton@anu.edu.au ANU Supercomputer Facility
Phone: +61 2 6125 4389 Australian National University
Fax: +61 2 6125 8199 Canberra, ACT, 0200, Australia
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Process <-> Shared Memory
2001-03-15 1:42 ` David Singleton
@ 2001-03-16 17:39 ` Mario Stargard
2001-03-18 13:03 ` Vic Abell
0 siblings, 1 reply; 8+ messages in thread
From: Mario Stargard @ 2001-03-16 17:39 UTC (permalink / raw)
There a function called table(2) that looks promising. Wish I knew how
to get this using kdbx. I'm surprised there isn't a standard utility
for this. Smells like something lsof should be able to get.
Mario
David Singleton wrote:
>
> Mario Stargard <mstargard@hotmail.com> wrote:
> > How can I find out what processes are attached to a shared memory
> > segment? I'm on Tru64 4.0f.
>
> I have exactly the same question (but for 5.1) - please let me know if
> you get an answer.
>
> ------
> David.Singleton@anu.edu.au ANU Supercomputer Facility
> Phone: +61 2 6125 4389 Australian National University
> Fax: +61 2 6125 8199 Canberra, ACT, 0200, Australia
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Process <-> Shared Memory
2001-03-16 17:39 ` Mario Stargard
@ 2001-03-18 13:03 ` Vic Abell
0 siblings, 0 replies; 8+ messages in thread
From: Vic Abell @ 2001-03-18 13:03 UTC (permalink / raw)
Mario Stargard <mstargard@hotmail.com> writes:
> There a function called table(2) that looks promising. Wish I knew how
>to get this using kdbx. I'm surprised there isn't a standard utility
>for this. Smells like something lsof should be able to get.
Reporting on shared memory segments is not appropriate for a tool
designed to LiSt Open Files (lsof). That question has been asked of me
several times and I politely submit that a new tool to do that job is
more appropriate than adding more baggage to lsof.
Vic Abell <abe@purdue.edu>, lsof author
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Process <-> Shared Memory
2001-03-14 19:19 Process <-> Shared Memory Mario Stargard
2001-03-15 1:42 ` David Singleton
@ 2001-03-19 13:02 ` Jörg Bochert
2001-03-19 17:20 ` Mario Stargard
2001-03-19 17:35 ` Serguei Patchkovskii
1 sibling, 2 replies; 8+ messages in thread
From: Jörg Bochert @ 2001-03-19 13:02 UTC (permalink / raw)
Hi admins,
ipcs -a ist the answer.
Current Kernel parameters for the ipc subsystem
on ES40 with 4GB memory:
ipc:
msg-max = 8192
msg-mnb = 16384
msg-mni = 2048
msg-tql = 1000
shm-max = 4194304
shm-min = 1
shm-mni = 512
shm-seg = 160
sem-mni = 1024
sem-msl = 200
sem-opm = 10
sem-ume = 10
sem-vmx = 32767
sem-aem = 16384
num-of-sems = 60
max-kernel-ports = 93911
port-hash-max-num = 4695550
port-reserved-max-num = 93911
set-max-num = 24837
ssm-threshold = 8388608
ssm-enable-core-dump = 1
Mario Stargard wrote:
> How can I find out what processes are attached to a shared memory
> segment? I'm on Tru64 4.0f.
>
> Thanks,
> Mario
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Process <-> Shared Memory
2001-03-19 13:02 ` Jörg Bochert
@ 2001-03-19 17:20 ` Mario Stargard
2001-03-19 22:22 ` David Singleton
2001-03-19 17:35 ` Serguei Patchkovskii
1 sibling, 1 reply; 8+ messages in thread
From: Mario Stargard @ 2001-03-19 17:20 UTC (permalink / raw)
ipcs -a tells you how many processes are attached (NATTCH) to the
shared memory segment, who the creating pid (CPID) was and the last pid
(LPID) to attach to the segment. This doesn't tell you the pids of the
currently attached processes, which is what I'm looking for.
Thanks, though.
Mario
J�rg Bochert wrote:
>
> Hi admins,
> ipcs -a ist the answer.
>
> Current Kernel parameters for the ipc subsystem
> on ES40 with 4GB memory:
>
> ipc:
> msg-max = 8192
> msg-mnb = 16384
> msg-mni = 2048
> msg-tql = 1000
> shm-max = 4194304
> shm-min = 1
> shm-mni = 512
> shm-seg = 160
> sem-mni = 1024
> sem-msl = 200
> sem-opm = 10
> sem-ume = 10
> sem-vmx = 32767
> sem-aem = 16384
> num-of-sems = 60
> max-kernel-ports = 93911
> port-hash-max-num = 4695550
> port-reserved-max-num = 93911
> set-max-num = 24837
> ssm-threshold = 8388608
> ssm-enable-core-dump = 1
>
> Mario Stargard wrote:
>
> > How can I find out what processes are attached to a shared memory
> > segment? I'm on Tru64 4.0f.
> >
> > Thanks,
> > Mario
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Process <-> Shared Memory
2001-03-19 13:02 ` Jörg Bochert
2001-03-19 17:20 ` Mario Stargard
@ 2001-03-19 17:35 ` Serguei Patchkovskii
1 sibling, 0 replies; 8+ messages in thread
From: Serguei Patchkovskii @ 2001-03-19 17:35 UTC (permalink / raw)
=?iso-8859-1?Q?J=F6rg?= Bochert (joerg.bochert@t-online.de) wrote:
: ipcs -a ist the answer.
Well, ipcs -a will only show the PID of the last process, which attached
to the region. There may be more than one process attached (there may
also be none), and these may attach and detach in any order they choose.
Moreover, the pids are, eventually, reused - so that the pids returned
by ipcs -a are not particularly meaningful.
/Serge.P
---
Home page: http://www.cobalt.chem.ucalgary.ca/ps/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Process <-> Shared Memory
2001-03-19 17:20 ` Mario Stargard
@ 2001-03-19 22:22 ` David Singleton
0 siblings, 0 replies; 8+ messages in thread
From: David Singleton @ 2001-03-19 22:22 UTC (permalink / raw)
In article <3AB63FEF.D4896273@hotmail.com>, Mario Stargard <mstargard@hotmail.com> writes:
|> ipcs -a tells you how many processes are attached (NATTCH) to the
|> shared memory segment, who the creating pid (CPID) was and the last pid
|> (LPID) to attach to the segment. This doesn't tell you the pids of the
|> currently attached processes, which is what I'm looking for.
|> Thanks, though.
|>
|> Mario
|>
Just to make it clear what Mario and I are after, /proc/pid/map under
Solaris returns an array of
typedef struct prmap {
uintptr_t pr_vaddr; /* virtual address of mapping */
size_t pr_size; /* size of mapping in bytes */
char pr_mapname[PRMAPSZ]; /* name in /proc/pid/object */
offset_t pr_offset; /* offset into mapped object, if any */
int pr_mflags; /* protection and attribute flags */
int pr_pagesize; /* pagesize for this mapping in bytes */
int pr_shmid; /* SysV shared memory identifier */
} prmap_t;
which conveniently gives the required info as the last component.
The only clue I have found is that the address in the corresponding struct
under Tru64 is very small - not something to rely on :^)
------
David.Singleton@anu.edu.au ANU Supercomputer Facility
Phone: +61 2 6125 4389 Australian National University
Fax: +61 2 6125 8199 Canberra, ACT, 0200, Australia
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2001-03-19 22:22 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-03-14 19:19 Process <-> Shared Memory Mario Stargard
2001-03-15 1:42 ` David Singleton
2001-03-16 17:39 ` Mario Stargard
2001-03-18 13:03 ` Vic Abell
2001-03-19 13:02 ` Jörg Bochert
2001-03-19 17:20 ` Mario Stargard
2001-03-19 22:22 ` David Singleton
2001-03-19 17:35 ` Serguei Patchkovskii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox