0

Hi All,

I am getting confused by seeing the o/p of vmstat and sar -r in freemem colums.As per i know that vmstat will show o/p in kb's where as sar -r freemem in pagesizes.I am calculating the sar -r freemem*8(pagesize of my system), but it is showing half the size compare to vmstat.

Please help in this.Your quick response will be appreciated

i am pasting the o/p

vmstat 1 30
\ kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr s3 s8 s9 -- in sy cs us sy id
0 0 0 5001144 3050448 0 0 1 0 0 0 0 0 0 0 0 294 74 231 0 1 99
0 0 0 4967456 2886480 2 27 0 0 0 0 0 0 0 0 0 294 150 234 0 0 99
0 0 0 4967456 2886480 0 0 0 0 0 0 0 0 0 0 0 310 113 249 0 0 100
0 0 0 4967456 2886480 0 0 0 0 0 0 0 0 0 0 0 304 109 234 0 0 100
0 0 0 4967456 2886480 0 0 0 0 0 0 0 0 0 0 0 313 93 246 0 0 100
0 0 0 4967456 2886480 0 0 0 0 0 0 0 0 0 0 0 301 119 242 0 1 99
0 0 0 4967704 2886744 0 2 0 0 0 0 0 0 0 0 0 316 181 269 0 0 100
0 0 0 4967704 2886744 0 0 0 0 0 0 0 0 0 0 0 303 178 255 0 0 100
0 0 0 4967704 2886744 0 0 0 0 0 0 0 0 0 0 0 304 177 274 0 0 99
0 0 0 4967704 2886744 0 0 0 0 0 0 0 0 1 0 0 322 129 250 0 11 89
0 0 0 4966984 2886024 15 197 0 0 0 0 0 0 0 0 0 304 1263 258 0 1 99
0 0 0 4966984 2886024 0 3 0 0 0 0 0 0 0 0 0 301 773 263 0 1 99
0 0 0 4966984 2886024 0 0 0 0 0 0 0 0 1 0 0 305 761 253 0 1 99
0 0 0 4966984 2886024 0 0 0 0 0 0 0 0 0 0 0 299 751 246 0 0 100
0 0 0 4966984 2886024 0 0 0 0 0 0 0 0 0 0 0 303 750 248 0 1 99
0 0 0 4966984 2886024 0 0 0 0 0 0 0 0 0 0 0 291 730 236 0 0 99
0 0 0 4966984 2886024 0 0 0 0 0 0 0 0 0 0 0 318 750 259 0 0 100
0 0 0 4966984 2886024 0 0 0 0 0 0 0 0 0 0 0 299 755 254 0 1 99
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr s3 s8 s9 -- in sy cs us sy id
0 0 0 4966984 2886024 0 0 0 0 0 0 0 0 0 0 0 291 760 244 0 0 99
0 0 0 4966984 2886024 0 0 0 0 0 0 0 0 0 0 0 298 752 249 0 0 100
0 0 0 4966984 2886024 0 0 0 0 0 0 0 0 0 0 0 292 732 227 0 1 99
0 0 0 4966984 2886024 0 0 0 0 0 0 0 0 0 0 0 294 739 240 0 0 100
0 0 0 4966984 2886024 0 0 0 0 0 0 0 0 42 0 0 560 766 277 0 0 100
0 0 0 4966984 2886024 0 0 0 0 0 0 0 0 0 0 0 308 741 237 0 0 99
0 0 0 4966984 2886024 0 0 0 0 0 0 0 0 0 0 0 276 749 243 0 0 100
0 0 0 4966984 2886024 0 0 0 0 0 0 0 0 0 0 0 291 740 243 0 1 99
0 0 0 4966984 2886024 0 0 0 0 0 0 0 0 0 0 0 284 763 249 0 0 99
0 0 0 4966984 2886024 0 0 0 0 0 0 0 0 0 0 0 303 748 249 0 0 100
0 0 0 4966984 2886024 0 0 0 0 0 0 0 0 0 0 0 301 756 251 0 0 100
0 0 0 4966984 2886024 0 0 0 0 0 0 0 0 0 0 0 289 739 236 0 1 99


sar -r 1 30

SunOS psbldweb101 5.10 Generic_118833-36 sun4u 03/27/2008

16:54:23 freemem freeswap
16:54:24 178591 4917806
16:54:25 177711 4893580
16:54:26 179479 4942273
16:54:27 178591 4917806
16:54:28 178591 4917806
16:54:29 178591 4917806
16:54:30 178591 4917806
16:54:31 178591 4917806
16:54:32 177711 4893580
16:54:33 179479 4942273
16:54:34 178591 4917806
16:54:35 179479 4942273
16:54:36 175977 4845838
16:54:37 180376 4966984
16:54:38 178591 4917806
16:54:39 178591 4917806
16:54:40 178591 4917806
16:54:41 177711 4893580
16:54:43 180376 4966984
16:54:44 353714 9739726
16:54:45 178625 4918345
16:54:46 178625 4918345
16:54:47 179514 4942814
16:54:48 178625 4918345
16:54:49 178625 4918345
16:54:50 179514 4942814
16:54:51 176874 4870126
16:54:52 179514 4942814
16:54:53 177745 4894116
16:54:54 177745 4894116

Average 184495 5080254

2
Contributors
1
Reply
2
Views
10 Years
Discussion Span
Last Post by eggi
0

Hey There,

For vmstat's freemem, you're getting the result in kb, but "sar -r" shows you pages, so you need to do the amount x pagesize (in k), which you can get from the "pagesize" command (although it doesn't display in k so you have calculate 8192 = 8k or whatever it is on your system).

So your vmstat free is

2886480

and sar -r free is

178591 x pagesize (usually 8192 / 8k)

for 1428728

Since the sar output is giving you output roughly have of the vmstat freemem size, I'd guess either the pagesize is larger or the freemem is being reported in blocks:

1428728 x 2 = 2857456

And we're equal. If you can post some diags from the machine (pagesize, what your sar outputs in, etc) that might help to clarify, but I think you should be okay and both are the same (just the "why" of the difference is unclear)

Hope that helps :)

, Mike

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.