#!/bin/bash

# ------------------------------------------------------------------------------+
#                   HECK FILE SYSYTEM INODE BY THRESHOLD                        |
#   Filename: ck_fs_inode.sh                                                    |
#   Desc:                                                                       |
#      The script use to check file system inode by threshold                   |
#      Once usage of the inode beyond the threshold, a mail alert will be sent. |
#      Deploy it by crontab. e.g. per 15 min                                    |
#   Usage:                                                                      |
#      ./ck_fs_inode.sh <percent> </filesystem [/filesystem2]>                  |
#                                                                               |
#   Author : Kael_Wang                                                          |
#   Blog   : https://www.kael.wang                                               |
# ------------------------------------------------------------------------------+
#
# -------------------------------
#  Set environment here
# ------------------------------

if [ -f ~/.bash_profile ]; then
    . ~/.bash_profile
fi

export host=`hostname`
export mail_dir=/usr/local/bin
export mail_list='kael@kael.wang'
export mail_fm='sd168_zabbix@aspirecn.com'
tmpfile=/tmp/ck_fs_inode.txt
alert=n

# --------------------------------
#  Check the parameter
# --------------------------------

max=$1

if [ ! ${2} ]; then
    echo "No filesystems specified."
    echo "Usage: ck_fs_inode.sh 85 / /opt"
    exit 1
fi

# --------------------------------
#  Start to check the disk space
# --------------------------------

while [ "${2}" ]
    do
        percent=`df -i ${2} | tail -1 | awk '{print $5 }' | cut -d'%' -f1`
        if [ "${percent}" -ge "${max}" ]; then
            alert=y
            break
        fi;
        shift
    done;

# ------------------------------------------------------------------------
#  When a partition was above the threshold then send mail with df output
# ------------------------------------------------------------------------

if [ ! "${alert}" = 'n' ];then
    df -i >$tmpfile
    mail_sub="Dangerous!!!Disk Inode usage beyond the threshold ${max} on ${host}."
    $mail_dir/sendEmail -s 127.0.0.1 -u ${mail_sub} -f $mail_fm -t $mail_list -o message-file=${tmpfile}
fi;

exit;

定时任务添加

*/15 * * * * ./ck_fs_inode.sh 85 / /opt
分类: 发行通用

47 条评论

https://forum.trudesk.io/ · 2026-08-30 05:02

References:

Casino club https://forum.trudesk.io/

dok.kompot.si · 2026-09-22 03:00

References:

Spielhalle mit sofortüberweisung dok.kompot.si

onlinevetjobs.com · 2026-09-22 09:59

References:

Einzahlung mit sofort casino onlinevetjobs.com

https://pbase.com/ · 2026-09-22 20:22

References:

Echtgeld casino sofortüberweisung https://pbase.com/

test-sida.noads.biz · 2026-09-23 04:01

References:

Casino auszahlung sofort test-sida.noads.biz

iwlnx.com · 2026-09-23 05:04

References:

Online casinos sofortüberweisung iwlnx.com

$1 payid pokies · 2026-09-23 08:49

References:

Best payid pokies $1 payid pokies

www.8njy.com · 2026-09-23 09:02

References:

Sofortüberweisung Casino Anleitung http://www.8njy.com

bbs.abcdv.net · 2026-09-23 10:37

References:

Einzahlung mit sofort casino bbs.abcdv.net

casino auszahlung sofort · 2026-09-23 12:49

References:

Neue casinos mit sofortüberweisung https://fzquan8.cn/home.php?mod=space&uid=163683

t.044300.net · 2026-09-23 17:28

References:

Casino mit sofortüberweisung http://t.044300.net/home.php?mod=space&uid=3112878

bonus pokies payid · 2026-09-25 07:09

References:

1 minimum deposit casino australia payid http://wargame-workshop.com/bbs/home.php?mod=space&uid=1394449

http://megashipping.ru/ · 2026-09-25 21:51

References:

Safe payid pokies australia http://megashipping.ru/user/augusthoe6/

payid casino online pokies · 2026-09-26 03:32

References:

Best online pokies payid https://www.sellmytires.com/author/waydegree83/

fast withdrawal pokies australia payid · 2026-09-29 08:23

References:

Payid pokies instant withdrawal australia https://md.interhacker.space/DvnYU-fAQnusgw5ykKHVwg

best payid pokies · 2026-09-29 08:39

References:

Pay id pokies real money https://rentry.co/twqgvizc

https://git.cemarose.cn/dollarlarch91 · 2026-09-29 21:33

References:

Instant withdrawal pay id pokies https://git.cemarose.cn/dollarlarch91

mashspec.ru · 2026-10-04 07:57

References:

How to deposit with neosurf casino australia http://mashspec.ru/user/fanwarm4/

http://bbs.88moli.top · 2026-10-04 10:14

References:

Neosurf pin casino deposit australia http://bbs.88moli.top/home.php?mod=space&uid=117271

molchanovonews.ru · 2026-10-04 11:30

References:

How to use neosurf at casino australia https://molchanovonews.ru/user/muscleowl9/

viproskurnin.ru · 2026-10-04 11:44

References:

Neosurf casino instant play australia http://viproskurnin.ru/index.php?subaction=userinfo&user=honeybench5

https://actualites.cava.tn · 2026-10-04 12:59

References:

Neosurf casino australian dollars https://actualites.cava.tn/user/savesquid1/

https://onlinevetjobs.com/author/silicagerman7/ · 2026-10-04 19:42

References:

Neosurf casino free spins australia https://onlinevetjobs.com/author/silicagerman7/

hedgedoc.envs.net · 2026-10-06 01:35

References:

Neosurf casino instant play australia https://hedgedoc.envs.net/CQ714FprQ720Qpb7LAUrAA

play real money casino neosurf australia · 2026-10-06 09:56

References:

Neosurf casino online real money australia https://dezcity74.ru/user/calffox6/

androidonly.com · 2026-10-06 12:50

References:

Latest neosurf casinos aus https://androidonly.com/user/limitcare3/

发表回复

Avatar placeholder

您的邮箱地址不会被公开。 必填项已用 * 标注