加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

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

发布时间:2020-12-15 18:35:11 所属栏目:安全 来源:网络整理
导读:作为一些Nagios脚本的一般改造的一部分,我将向脚本添加参数,以便可以逐个机器地确定阈值.例如,我们指定触发关键和警告警报的磁盘空闲百分比. 其中一个脚本监视/ proc / sys / fs / inode-nr – 它有两个值,nr_inodes和nr_free_inodes.我对UNIX的内部缺乏了解
作为一些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利用率.

谢谢,彼得·

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读