[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::digital_unix

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

8846.0. "Usage of rusage struct in "ps" - Urgent !!!!" by QDOV01::PGUPTA () Mon Feb 17 1997 06:30

Hello,

We exactly want to know  how ps command gets these values. We are not heading 
nowhere with repsect to this issue.


In the rusage structure there are three fields
1.) ru_ixrss
2.) ru_idrss
3.) ru_isrss
which of these fields do we need to access inorder to get the value returned 
by ps -u rss.None of the above rss fields give the exact value that ps -u 
rss gives .
Do we need to do some calculation for getting the value, if so please tell 
us.
There is no field corresponding to virtual memory used .( ps -o vsz )


Thanks in Advance

Pankaj Gupta
T.RTitleUserPersonal
Name
DateLines
8846.1NETRIX::"[email protected]"Shashi MangalatTue Feb 18 1997 22:5811
ps does not use getrusage() to get either RSS or VSZ values.  It
uses the task_info() Mach IPC to get them.  Mach interfaces are not
supported and are used only in the base system.

The getrusage() rss values are not the actual resident set size at
the time of call.  It is the "integral rss in KB/seconds" according
to the source code.  Whatever it is supposed to indicate, I don't
think you can depend on it.

--shashi
[Posted by WWW Notes gateway]