Cache 大小查看




查看文件缓存的工具
pcstat 命令


hcache 命令

linux-ftools 工具

[root@sfx110008 ~]# cat ~/memory/list_pgf.sh#!/bin/bash#Author: Shanker#Time: 2016/06/08#set -e#set -u#you have to install linux-fincoreif [ ! -f usr/local/bin/linux-fincore ]thenecho "You haven't installed linux-fincore yet"exitfi#find the top 10 processs' cache fileps -e -o pid,rss|sort -nk2 -r|head -50 |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.fincore ]thenecho "the cache.fincore is exist, removing now"rm -f tmp/cache.fincorefifor i in `cat tmp/cache.files | sort |uniq `doif [ -f $i ]thenecho $i >>/tmp/cache.fincorefidonelinux-fincore --only-cached -C 1048576 -s `cat /tmp/cache.fincore`rm -f /tmp/cache.{pids,files,fincore}





PostgreSQL数据库表文件缓存状况


pgfincore 扩展




文章转载自数据库技术闲谈,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




