* Available process memory on OSF 3.2
@ 1996-09-04 4:00 Richard Tessier
1996-09-05 4:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
1996-09-05 4:00 ` Brian Martin
0 siblings, 2 replies; 3+ messages in thread
From: Richard Tessier @ 1996-09-04 4:00 UTC (permalink / raw)
HI,
I'm looking for a way to get the amount of memory that is available
for a process. Under several other UNIX platforms (HPUX, SCO ...) we
use the available space for the data (using sbrk and ulimit) but this
concept doesn't work under OSF (since it can allocate non-contiguous
memory blocks, the result of sbrk(0) can be over ulimit(UL_GETBREAK)
even if there is no segmentation fault). Is there a way to do
something similar(or better !) that would work on OSF 3.2 ?
TIA
_________________________________________________________________________
Richard Tessier Berclain Group Inc.
E-mail: tessierr@berclain.com Research & Development Group
Tel.: (418) 656-1454 ext. 1837 3175, Quatre-Bourgeois, Suite 300
Fax : (418) 656-6317 Ste-Foy (Quebec)
Web : http://www.berclain.com G1W 2K7
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Available process memory on OSF 3.2
1996-09-04 4:00 Available process memory on OSF 3.2 Richard Tessier
@ 1996-09-05 4:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
1996-09-05 4:00 ` Brian Martin
1 sibling, 0 replies; 3+ messages in thread
From: Alan Rollow - Dr. File System's Home for Wayward Inodes. @ 1996-09-05 4:00 UTC (permalink / raw)
In article <50l1nv$jev@clic3.qbc.clic.net>, tessierr@berclain.com (Richard Tessier) writes:
>I'm looking for a way to get the amount of memory that is available
>for a process. Under several other UNIX platforms (HPUX, SCO ...) we
>use the available space for the data (using sbrk and ulimit) but this
>concept doesn't work under OSF (since it can allocate non-contiguous
>memory blocks, the result of sbrk(0) can be over ulimit(UL_GETBREAK)
>even if there is no segmentation fault). Is there a way to do
>something similar(or better !) that would work on OSF 3.2 ?
You can use getrlimit(2) to get the various memory limits for
data, stack and text. You can use table(2) to find out how
much page/swap space is available and reserved, which is
usually the first limit you run into when allocating lots.
You can infer the swap mode by looking for the link
/sbin/swapdefault, but that can be wrong (recently removed
and the system not rebooted yet). The last I knew finding
out with certainty required reading from /dev/kmem.
There might be other system parameters that will limit virtual
memory beyond what the R-limits do, but the amount of page/swap
space, swap mode and those limits should be enough to get a good
clue.
>Richard Tessier Berclain Group Inc.
--
Alan Rollow alan@nabeth.cxo.dec.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Available process memory on OSF 3.2
1996-09-04 4:00 Available process memory on OSF 3.2 Richard Tessier
1996-09-05 4:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
@ 1996-09-05 4:00 ` Brian Martin
1 sibling, 0 replies; 3+ messages in thread
From: Brian Martin @ 1996-09-05 4:00 UTC (permalink / raw)
Richard Tessier wrote:
>
> HI,
> I'm looking for a way to get the amount of memory that is available
> for a process. Under several other UNIX platforms (HPUX, SCO ...) we
Try vmstat, iostat, ps aux, w, and man -k on any keyword you can think of.
oh, and ipcs.
One of these (or a combination) should fit your bill.
bmartin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1996-09-05 4:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-09-04 4:00 Available process memory on OSF 3.2 Richard Tessier
1996-09-05 4:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
1996-09-05 4:00 ` Brian Martin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox