-1

I have SunOS 5.10 sparc server. I want to calculate buffer memory. I can easily find this in Linux using /usr/bin/free command.

             total       used       free     shared    buffers     cached
Mem:      8004388    7427228     577160          0     472196    3336544
-/+ buffers/cache:   3618488    4385900
Swap:     11534628          0   11534628

Can anyone please suggest me if there is any equivalent command in SunOS. It would be better if anyone can give me any Perl script to find the same in below format.

  • Googling gives lots of possibilities. – ceejayoz Oct 15 '14 at 21:49
  • Sar is available on unix & linux and can collect data continuously. – Xavier Lucas Oct 15 '14 at 21:51
  • I am not able to get buffer memory wit sar. I tried all the options with sar.do you have anything specific that i can give a try? – user95535 Oct 15 '14 at 21:54
  • @user95535 sar -r – Xavier Lucas Oct 15 '14 at 22:01
  • @Xavier Lucas Sar -r print freemem and freeswap not the buffer memory. 15:04:57 freemem freeswap 15:05:02 97809 3472239 15:05:07 97711 3468778 15:05:12 97906 3475708 – user95535 Oct 15 '14 at 22:05
0

if you are root then this command

echo ::memstat | mdb -k

will display what you need

Page Summary                Pages                MB  %Tot
------------     ----------------  ----------------  ----
Kernel                    1362300             10642   17%
ZFS File Data             1705895             13327   21%
Anon                       559950              4374    7%
Exec and libs               51818               404    1%
Page cache                  17100               133    0%
Free (cachelist)            73855               576    1%
Free (freelist)           4400754             34380   54%

Total                     8171672             63841
Physical                  8154670             63708

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.