Unix Programming - vm, swap limits

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > December 2006 > vm, swap limits





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author vm, swap limits
yirg

2006-12-20, 1:18 pm

(1) vm limits

I need to determine programmaticly the true actual vm limits for a
process.

getrlimit() is often not helpful here because it can return
RLIM_INIFINITY. But, it's obvious that a process doesn't have infinite
resource.

For example, suppose RLIMIT_AS shows as RLIMIT_INFINITY, how can I find
out the actual address space limit is? I think this is particulary
important as we move to 64 bit machines which, obviously, allow for
larger address space.

In my own, but much older, kernel experience there usually was a
#define or confiugartion variable for these settings.

(2) swap info

How can I determine programmatically how big the swap is and how much
free. I know this information must be available because it's returned
by vmstat(1).

On linux you can get this back from sysinfo(2), but this apparently
isn't supported on Solaris or AIX. sysconf(2) doesn't seem to return
any of this info, vm or swap, at all.

(3) which systems do I need this info for?

Linux, Solaris, AIX, HP-UX. But I'll take whatever I can get!

Thanks.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com