slabtop -s c
======================
https://github.com/tobert/pcstat
#!/bin/bash#you have to install pcstatif [ ! -f /data0/brokerproxy/pcstat ]thenecho "You haven't installed pcstat yet"echo "run \"go get github.com/tobert/pcstat\" to install"exitfi#find the top 10 processs' cache fileps -e -o pid,rss|sort -nk2 -r|head -10 |awk '{print $1}'>/tmp/cache.pids#find all the processs' cache file#ps -e -o pid>/tmp/cache.pidsif [ -f /tmp/cache.files ]thenecho "the cache.files is exist, removing now "rm -f /tmp/cache.filesfiwhile read linedolsof -p $line 2>/dev/null|awk '{print $9}' >>/tmp/cache.filesdone</tmp/cache.pidsif [ -f /tmp/cache.pcstat ]thenecho "the cache.pcstat is exist, removing now"rm -f /tmp/cache.pcstatfifor i in `cat /tmp/cache.files`doif [ -f $i ]thenecho $i >>/tmp/cache.pcstatfidone/data0/brokerproxy/pcstat `cat /tmp/cache.pcstat`rm -f /tmp/cache.{pids,files,pcstat}