unix – 监控/ proc / sys / fs / inode-nr

前端之家收集整理的这篇文章主要介绍了unix – 监控/ proc / sys / fs / inode-nr前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
作为一些Nagios脚本的一般改造的一部分,我将向脚本添加参数,以便可以逐个机器地确定阈值.例如,我们指定触发关键和警告警报的磁盘空闲百分比.

其中一个脚本监视/ proc / sys / fs / inode-nr – 它有两个值,nr_inodes和nr_free_inodes.我对UNIX的内部缺乏了解,所以我不太确定是否可以根据其中的值设置此文件的阈值.

nr_inodes和nr_free_inodes会建议使用中的inode数量可以计算为(nr_inodes – nr_free_inodes).因此,在猜测中,当使用中的数字接近nr_inodes的X%和Y%时,脚本应分别触发警告和严重警报.

这看起来像是一种正确的假设吗?

谢谢

丰富

引用kernel / Documentation / sysctl / fs.txt

Nr_inodes stands for the number of inodes the system has
allocated,this can be slightly more than inode-max because
Linux allocates them one pageful at a time.

Nr_free_inodes represents the number of free inodes (?) and
preshrink is nonzero when the nr_inodes > inode-max and the
system needs to prune the inode list instead of allocating
more.

所以你的假设是不正确的.

您可以使用“df -i”来获取inode利用率.

谢谢,彼得·

原文链接:https://www.f2er.com/bash/385679.html

猜你在找的Bash相关文章