| Title: | DIGITAL UNIX (FORMERLY KNOWN AS DEC OSF/1) | 
| Notice: | Welcome to the Digital UNIX Conference | 
| Moderator: | SMURF::DENHAM | 
| Created: | Thu Mar 16 1995 | 
| Last Modified: | Fri Jun 06 1997 | 
| Last Successful Update: | Fri Jun 06 1997 | 
| Number of topics: | 10068 | 
| Total number of notes: | 35879 | 
Hi,
We are wrting a program in which we want to get the resident memory size and 
virtual memory size of a process.
As given by the ps command :-
                    ps -e -o rss -o vsz
     We have tried doing this by reading the prpsinfo table  using the ioctl 
system call. But the drawback of
this approach is that if /proc file system is not mounted then this program 
gives a problem
                    ps gives this information even if /proc is not mounted.
     The rest of the information related to a process is being obtained by 
making a call to the table system ccommand
with table id as TBL_PROCINFO, but it seems that this table does not contain 
any field which might be having resident and
virtual memory size.
     Can you suggest a method for accessing this information ASAP.
Thanks & Regards
Pankaj Gupta
| T.R | Title | User | Personal Name | Date | Lines | 
|---|---|---|---|---|---|
| 8712.1 | SMURF::DENHAM | Digital UNIX Kernel | Wed Feb 05 1997 11:04 | 4 | |
|     You need table(TBL_UAREA). You'll get back a "struct user," which
    has an rusage structure in it. That has the rss value.
    
    
 | |||||