check_disk命令

check_disk命令

  • 用法:

    check_disk -w limit -c limit [-W limit] [-K limit] {-p path | -x device}
      [-C] [-E] [-e] [-g group ] [-k] [-l] [-M] [-m] [-R path ] [-r path ]
      [-t timeout] [-u unit] [-v] [-X type]
  • 选项:
    -h, --help
    -V, --version
    -w, --warning=INTEGER
       如果磁盘空闲容量小于INTEGER单位时、Exit with WARNING status
    -w, --warning=PERCENT%
       如果磁盘空闲容量百分比小于PERCENT%时、Exit with WARNING status
    -c, --critical=INTEGER
       如果磁盘空闲容量小于INTEGER单位时、Exit with CRITICAL status
    -c, --critical=PERCENT%
       如果磁盘空闲容量百分比小于PERCENT%时、Exit with CRITICAL status
    -W, --iwarning=PERCENT%
       如果inode空间空闲容量小于PERCENT时、Exit with WARNING status
    -K, --icritical=PERCENT%
       如果inode空间空闲容量百分比小于PERCENT%时,Exit with CRITICAL status
    -p, --path=PATH, --partition=PARTITION
       Path or partition (may be repeated)
    -x, --exclude_device=PATH <STRING>
       Ignore device (only works if -p unspecified)
    -C, --clear
       Clear thresholds
    -E, --exact-match
       For paths or partitions specified with -p, only check for exact paths
    -e, --errors-only
       Display only devices/mountpoints with errors
    -g, --group=NAME
        Group paths. Thresholds apply to (free-)space of all partitions together
    -k, --kilobytes
        Same as ‘--units kB‘
    -l, --local
        Only check local filesystems
    -L, --stat-remote-fs
        Only check local filesystems against thresholds. Yet call stat on remote filesystems
        to test if they are accessible (e.g. to detect Stale NFS Handles)
    -M, --mountpoint
        Display the mountpoint instead of the partition
    -m, --megabytes
        Same as ‘--units MB‘
    -A, --all
        Explicitly select all paths. This is equivalent to -R ‘.*‘
    -R, --eregi-path=PATH, --eregi-partition=PARTITION
        Case insensitive regular expression for path/partition (may be repeated)
    -r, --ereg-path=PATH, --ereg-partition=PARTITION
        Regular expression for path or partition (may be repeated)
    -I, --ignore-eregi-path=PATH, --ignore-eregi-partition=PARTITION
        Regular expression to ignore selected path/partition (case insensitive) (may be repeated)
    -i, --ignore-ereg-path=PATH, --ignore-ereg-partition=PARTITION
        Regular expression to ignore selected path or partition (may be repeated)
    -t, --timeout=INTEGER
        Seconds before connection times out (default: 10)
    -u, --units=STRING
        可选值有bytes, kB, MB, GB, TB (默认为: MB)
    -v, --verbose
        Show details for command-line debugging (Nagios may truncate output)
    -X, --exclude-type=TYPE
        Ignore all filesystems of indicated type (may be repeated)
  • 实例:
    check_disk -w 20% -c 10% -p /       ;检查磁盘,可用小于20时报警,小于10%时报错,检查的是"/"目录
    //正常返回
    DISK OK - free space: / 120156 MB (96% inode=98%);| /=4750MB;105272;118431;0;131591

check_disk命令,布布扣,bubuko.com

时间: 2024-08-28 19:16:33

check_disk命令的相关文章

nagios check_disk:DISK CRITICAL - /root/.gvfs is not accessible: Permission denied

[[email protected] ~]# /usr/local/nagios/libexec/check_nrpe -H localhost -c check_disk DISK CRITICAL - /root/.gvfs is not accessible: Permission denied 用nagios的check_disk可以在本机成功,但是如果用check_nrpe来调用check_disk命令的话就会出现上述错误: DISK CRITICAL - /root/.gvfs is

Linux学习笔记:Nagios的配置

安装方法请参考 Linux学习笔记:Nagios的安装 客户端 由于我的安装是使用xinetd这个daemon的,所以需要调整相关的配置文件 [[email protected] ~]# vi /etc/xinetd.d/nrpe  service nrpe {         flags           = IPv4         socket_type     = stream         port            = 5666         wait           

浅谈 nagios监控配置

该文档只针对于配置   打乱了commands.cfg templates.cfg contacts.cfg localhost.cfg  timeperiods.cfg  resource.cfg 讲解 在讲配置之前最重要的一个命令:    nagios目录/bin/nagios -v nagios.cfg  (这是调试是否配置有错的命令参数 -v  很有用)    步入正题: 笔者认为了解nagios先得了解工作的逻辑:nagios程序调用监控顺序:        首先读取第一个配置文件 n

Nagios常见问题记录(1)

无意间看到这边文章, 真TM太有用了,相见恨晚的感觉...不知哪位大神写的 原文地址:http://www.codelast.com/?p=1037 一.主配置文件nagios.cfg 默认安装情况下,Nagios的主配置文件为:/usr/local/nagios/etc/nagios.cfg 打开这个文件,可以清楚地看到它指定了其他的配置文件: cfg_file=/usr/local/nagios/etc/objects/commands.cfg cfg_file=/usr/local/nag

linux环境中安装NRPE插件执行远程&quot;本地资源&quot;检查?NRPE安装?

需求描述: 在安装完nagios之后,需要对本地资源进行监控,比如磁盘空间的使用,进程数,swap空间,等等.这些都不是通过网络提供出来的, 所以,都是本地资源,可以通过NRPE插件实现在客户端中采集数据,然后通过网络传递给监控服务器,由监控服务器实现对传递过来 的数据进行判断. 环境描述: 操作系统:RedHat6.6 x64 安装过程: ----客户端---- 1.关闭selinux [[email protected] ~]# sed -i 's/SELINUX=.*/SELINUX=di

Security基础(四):OpenSSL及证书服务常用系统监控命令、搭建nagios监控服务器、配置文件及插件使用、监控远程主机的公有数据、监控远程主机的私有数据

一.OpenSSL及证书服务常用系统监控命令 目标: 本案例要求练习常用的系统监控命令完成以下任务: 使用vmstat命令监控内存及磁盘I/O信息 使用iostat命令监控CPU处理器及磁盘的I/O信息 使用sar命令监控系统最近的CPU/内存等活动 步骤: 步骤一:使用vmstat命令监控内存及磁盘I/O信息 1)报告内存.交换分区.CPU等活动信息,每2秒更新一次数据 [[email protected] ~]# vmstat 2    procs -----------memory----

linux常用命令--netstat

简介 Netstat 命令用于显示各种网络相关信息,如网络连接,路由表,接口状态 (Interface Statistics),masquerade 连接等等. 常用参数 -a (all)显示所有选项,提示:LISTEN和LISTENING的状态只有用-a或者-l才能看到-t (tcp)仅显示tcp相关选项-u (udp)仅显示udp相关选项-n 拒绝显示别名,能显示数字的全部转化成数字.-l 仅列出有在 Listen (监听) 的服務状态 -p 显示建立相关链接的程序名-r 显示路由信息,路由

使用fruitstrap实现命令行将IPA包安装到iOS设备上

Requirements Mac OS X. Tested on Snow Leopard only. You need to have a valid iPhone development certificate installed. Xcode must be installed, along with the SDK for your iOS version. Usage fruitstrap [-d] -b <app> [device_id] Optional -d flag laun

Linux基础命令小结

注意:Linux严格区分大小写 老男孩方法论经验之谈: 有一种方法叫做没方法 有两种方法,左右为难 有三种方法才叫有方法 停止一个命令:CTR + C 1.创建目录 英文:make directorys 命令:mkdir 实例:三种方式 mkdir /data cd / mkdir data cd /;mkdir data mkdir x y z    表示同时创建多个目录 mkdir -p /data/x/y   表示同时创建多级目录(递归创建),切记不可用mkdir /data/x/y 2.