I'm looking to get the file cache portion of physical (real) memory on a Solaris workstation (Similar to the Cache: line in /proc/meminfo on some Linux systems):
# swap -s; swap -l; vmstat 2 2; echo "::memstat" | mdb -k
total: 309376k bytes allocated + 41428k reserved = 350804k used, 659608k available
swapfile dev swaplo blocks free
/dev/dsk/c0d0s1 102,1 8 1060280 1060280
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr cd f0 s0 s1 in sy cs us sy id
0 0 0 719880 258132 27 191 13 0 0 0 11 2 -0 0 0 729 829 282 1 2 97
0 0 0 659480 194148 6 13 0 0 0 0 0 0 0 0 0 422 392 291 1 1 98
Page Summary Pages MB %Tot
------------ ---------------- ---------------- ----
Kernel 48091 187 25%
Anon 79067 308 41%
Exec and libs 9215 35 5%
Page cache 10138 39 5%
Free (cachelist) 29622 115 15%
Free (freelist) 18313 71 9%
Total 194446 759
# kstat -c "vm"
module: unix instance: 0
name: segadvstat class: vm
crtime 0
MADV_FREE_hit 0
MADV_FREE_miss 0
snaptime 7130.983197642
module: unix instance: 0
name: segmap class: vm
crtime 0
fault 52391
faulta 0
free 9035
free_dirty 352
free_notfree 289
get_nofree 0
get_nomtx 0
get_reclaim 191362
get_reuse 9657
get_unused 0
get_use 52
getmap 203118
pagecreate 8672
rel_abort 0
rel_async 3987
rel_dontneed 861
rel_free 3130
rel_write 1267
release 198721
snaptime 7130.984527215
stolen 0
module: unix instance: 0
name: vminfo class: vm
crtime 0
freemem 27160999
snaptime 7130.985584569
swap_alloc 12657123
swap_avail 58227860
swap_free 61179173
swap_resv 15608436
# kstat -c "pages"
module: unix instance: 0
name: system_pages class: pages
availrmem 145498
crtime 0
desfree 1519
desscan 25
econtig 4274888704
fastscan 97223
freemem 63558
kernelbase 3556769792
lotsfree 3038
minfree 759
nalloc 23522767
nalloc_calls 13856
nfree 23385080
nfree_calls 9104
nscan 0
pagesfree 63558
pageslocked 48948
pagestotal 194446
physmem 194446
pp_kernel 50463
slowscan 100
snaptime 7184.196494221
kstat gives me hundreds of options but it's not clear to me where Solaris keeps the portion of memory for caching things like libraries and other system files it regularly needs.
Both Linux and AIX have the values but can't seam to locate the same on the Solaris system. Also, I'm aware that MemTools can report this but MemTools is not an option for me.
Also,
Is the portion of physical memory used allocated to the cache?
Is it part of the physical memory allocated to swap?
Thank you,