conf/fs.conf
author Tomas Zeman <zeman@sloane.cz>
Sun, 15 May 2011 09:22:03 +0200
changeset 13 fd71994b6ce0
parent 7 0cd47f29bdfb
child 16 8dd31c2c72a5
child 26 48810ea292c2
permissions -rw-r--r--
scripts/run-cron: zabbix-friendly cron scripts runner
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
29afbe10f498 Added base checks fs, fbsd, mysql
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
     1
# Filesystem related parameters
29afbe10f498 Added base checks fs, fbsd, mysql
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
     2
29afbe10f498 Added base checks fs, fbsd, mysql
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
     3
# Returns age of last modification time of file $1
29afbe10f498 Added base checks fs, fbsd, mysql
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
     4
UserParameter=file.age[*],expr `date +%s` - `stat -f %m $1`
29afbe10f498 Added base checks fs, fbsd, mysql
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
     5
29afbe10f498 Added base checks fs, fbsd, mysql
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
     6
# Returns count of files in directory $1
29afbe10f498 Added base checks fs, fbsd, mysql
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
     7
UserParameter=dir.files[*],ls $1|wc -l
29afbe10f498 Added base checks fs, fbsd, mysql
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff changeset
     8
7
0cd47f29bdfb fs.conf: bzip2.test
Tomas Zeman <tzeman@volny.cz>
parents: 1
diff changeset
     9
# Returns 0 if bzip2 test of file $1 passed.
0cd47f29bdfb fs.conf: bzip2.test
Tomas Zeman <tzeman@volny.cz>
parents: 1
diff changeset
    10
# Note: can't use just return code ($?) as bzip2 is too forgiving to corrupt archives.
0cd47f29bdfb fs.conf: bzip2.test
Tomas Zeman <tzeman@volny.cz>
parents: 1
diff changeset
    11
UserParameter=bzip2.test[*],bzip2 -q -t $1 2>&1|wc -l