linux 下怎么查看cache
关注:69 答案:3 mip版
解决时间 2021-01-25 16:40
提问者夜落花台
2021-01-25 00:49
linux 下怎么查看cache
最佳答案
二级知识专家清和十五
2021-01-25 02:27
cat /proc/meminfo
全部回答
1楼久别无恙
2021-01-25 04:12
free -m
2楼再见不见
2021-01-25 03:06
一、linux下查看cpu cache级数,每级大小
(1) 第一种方法:
dmesg | grep cache
(2) 第二种方法:
[root@gc15 ~]# ls /sys/devices/system/cpu/cpu0/cache/index
index0/ index1/ index2/ index3/
一级cache, data cache
index0和index1是一级cache中的data和instruction cache
[root@gc15 ~]# cat /sys/devices/system/cpu/cpu0/cache/index0/level
1
[root@gc15 ~]# cat /sys/devices/system/cpu/cpu0/cache/index0/type
data
[root@gc15 ~]# cat /sys/devices/system/cpu/cpu0/cache/index0/size
32k
一级cache, instruction cache
[root@gc15 ~]# cat /sys/devices/system/cpu/cpu0/cache/index1/level
1
[root@gc15 ~]# cat /sys/devices/system/cpu/cpu0/cache/index1/type
instruction
[root@gc15 ~]# cat /sys/devices/system/cpu/cpu0/cache/index1/size
32k
二级cache,共享的
[root@gc15 ~]# cat /sys/devices/system/cpu/cpu0/cache/index2/level
2
[root@gc15 ~]# cat /sys/devices/system/cpu/cpu0/cache/index3/type
unified
[root@gc15 ~]# cat /sys/devices/system/cpu/cpu0/cache/index2/size
256k
三级cache,共享的
[root@gc15 ~]# cat /sys/devices/system/cpu/cpu0/cache/index3/level
3
[root@gc15 ~]# cat /sys/devices/system/cpu/cpu0/cache/index3/type
unified
[root@gc15 ~]# cat /sys/devices/system/cpu/cpu0/cache/index3/size
12288k
我要举报
如以上问答内容为低俗/色情/暴力/不良/侵权的信息,可以点下面链接进行举报,我们会做出相应处理,感谢你的支持!
→点此我要举报以上信息!←
推荐资讯
大家都在看