Remember, "size" is the virtual address space size, the "rss" column is physical memory, which is typically more useful for memory sizing.
You can also use "memstat", which is an mdb(1) dcmd, as in; #echo "::memstat" | mdb -k This may take some time on a large memory configuration. Yes, vmstat or sar for system-wide memory use. HTH, /jim tanglinfu wrote: > Thanks Jim for your prompt reply. > > It's Solaris 10 06/06 (Update 2). > And just use the following commands. > > # prstat -s size -c -n > # vmstat > > Then add up the RSS field of prstat. > > So to monitor the total memory usage, it's > better to use vmstat and sar, right? > > Got that. > > Thanks > Linfu > > > > Date: Thu, 24 Apr 2008 11:23:43 -0400 > > From: [EMAIL PROTECTED] > > Subject: Re: [perf-discuss] the mem usage calculated by prstat and > vmstat is different. > > To: [EMAIL PROTECTED] > > CC: perf-discuss@opensolaris.org > > > > Please tell us where these values came from - we need to know the > > source of the values in the table. > > > > vmstat is a system tool, prstat is a process/thread tool. > > > > vmstat will tell you how much memory is free from the kernel's > perspective. > > > > prstat will tell you how much memory is being us! ed per-process, > but does not > > account for shared memory. > > > > Use "prstat -s rss" to sort processes by memory usage and determine > how much > > physical memory is being used (RSS). You can not add these up for a > total of > > how much memory is being used by all processes, because, as I said, > shared > > segments are not accounted for. Run "pmap -x [PID]" per-process for a > > detailed > > view. > > > > What are you trying to figure out? > > What release of Solaris? > > > > /jim > > > > > > > > tanglinfu wrote: > > > When calculate and compare the memory usage when > > > a Application starts, with "prstat" and "vmstat". > > > > > > We found 384MB memory gap. > > > > > > Timing | Memory Used |Free Memory | > > > --------------------------+---------------+------------+ > > > Before start App 'A' | 1648MB! | 1073MB | > > > --------------------------+----- ----------+------------+ > > > After start App 'A' | 2001MB | 336MB | > > > =========================================================== > > > Change |353MB increased|737MB decreased| > > > > > > > > > >From man page, seem prstat only reports active process statistics. > > > > > > Can any one advise where the 384 MB was used. > > > > > > Thanks in advance! > > > > > > > > > This message posted from opensolaris.org > > > _______________________________________________ > > > perf-discuss mailing list > > > perf-discuss@opensolaris.org > > > > > ------------------------------------------------------------------------ > Windows Live Writer,支持离线撰写博客内容,随时随地想写就写。 立即使 > 用! <http://get.live.cn/product/writer.html> _______________________________________________ perf-discuss mailing list perf-discuss@opensolaris.org