With reference to my previous post "SunOS free command" I need help to find the memory details using kstat command on sunOS.
I will really appreciate if anyone can help me with a perl script.
With reference to my previous post "SunOS free command" I need help to find the memory details using kstat command on sunOS.
I will really appreciate if anyone can help me with a perl script.
$ kstat -n system_pages
module: unix instance: 0
name: system_pages class: pages
availrmem 398026
crtime 0
desfree 4078
desscan 25
econtig 4274913280
fastscan 261030
freemem 266772
kernelbase 3556769792
lotsfree 8157
minfree 2039
nalloc 25700723
nalloc_calls 18591
nfree 23835715
nfree_calls 11570
nscan 0
pagesfree 266772
pageslocked 124035
pagestotal 522061
physmem 522062
pp_kernel 125056
slowscan 100
snaptime 5003,716269185
You can use the mdb
command to inspect the kernel memory:
# mdb -k
Loading modules: [ unix genunix specfs dtrace mac cpu.generic uppc pcplusmp scsi_vhci zfs sockfs ip hook neti sctp arp usba fctl md lofs fcip fcp cpc random crypto logindmux ptm ufs nsmb sppp sd ipc ]
> ::memstat
Page Summary Pages MB %Tot
------------ ---------------- ---------------- ----
Kernel 104261 407 40%
ZFS File Data 57894 226 22%
Anon 68203 266 26%
Exec and libs 3715 14 1%
Page cache 14851 58 6%
Free (cachelist) 1878 7 1%
Free (freelist) 9180 35 4%
Total 259982 1015
Physical 259981 1015