tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* vm_size of a process in the kernel
@ 2002-04-04 15:53 Derk Tegeler
  0 siblings, 0 replies; only message in thread
From: Derk Tegeler @ 2002-04-04 15:53 UTC (permalink / raw)
  To: tru64-unix-managers

All,

I'm trying to identify the amount of virtual memory a process is using. On 
a running system the obvious is to use the 'ps' command with appropriate flags.

In a core file, however, dbx should return it with the command below. The 
output however, baffles me:

On a running system
# ps -o pid,vsz,comm -p 122
    PID   VSZ COMMAND
    122 1.64M syslogd

(dbx) set $pid=122
(dbx) pd (*(struct thread *)$tid).task.map.vm_size
17170432

that's 16.375M<something>

/usr/sys/include/vm/vm_map.h contains
struct vm_map {
	...
	vm_size_t               vm_size;        /* virtual size */
	...
};

My question is: should vm_size be the same as VSZ reported by 'ps' and if 
not, how can I find out the size of the virtual memory a process is using 
or has used (in a kernel core file) using dbx?

This is on v4.0f but I thought I saw the same on 5.1.

Regards,

Derk

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-04-04 15:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-04 15:53 vm_size of a process in the kernel Derk Tegeler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox