• R/O
  • HTTP
  • SSH
  • HTTPS

儲存庫摘要

標籤
無標籤

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythongamewindowsbathyscaphephpguic翻訳omegattwitterframeworktestbtronarduinovb.net計画中(planning stage)directxpreviewerゲームエンジンdom

Simple disk space checker


最新提交 RSS

修訂. 時間 作者 訊息
f7b2f74 2014-10-09 23:50:26 Tatsuki Sugiura master Add ignore.
68e397a 2014-10-09 23:49:36 Tatsuki Sugiura Change for executable.
ec7fd30 2014-10-09 23:49:00 Tatsuki Sugiura Allow to exec ruby gems execute wrapper.
89b579e 2014-10-09 23:44:45 Tatsuki Sugiura Whitespace cleanup.
adef04b 2014-10-09 22:51:36 Tatsuki Sugiura Fix PATH on debian.
ec8c344 2014-10-08 19:02:09 Tatsuki Sugiura Fix config parse and unit suffix.
3da88cb 2014-10-08 19:00:20 Tatsuki Sugiura Fix
44b8e86 2014-10-08 18:42:03 Tatsuki Sugiura Update readme.
040a34a 2014-10-08 18:13:37 Tatsuki Sugiura Remove path placeholder from mail script.
05d8827 2014-10-08 17:54:01 Tatsuki Sugiura Update debian version.

分支

名稱 修訂. 時間 作者 訊息
master f7b2f74 2014-10-09 23:50:26 Tatsuki Sugiura Add ignore.

README.rdoc

dsck

What's this?

Simple disk space checker

System requirement

  • ruby (1.8+)

  • can execute "df -k"

Install

gem install dsck

Support scripts

  • dsck2mail - sample shell wrapper script for crontab.

Usage

See "rd2 dsck" or "dsck -h" for details.

dsck [-Vhv] [-c config | global_threshold | /mount/point threshold]...

Options

-V, --version

Show version

-h, --help

Show this message

-v, --verbose

Verbose output. Multiple -v to increase verbosity

-q, --quiet

Quiet output. Multiple -q to decrease verbosity

-s, --summary

Show summary report

-r, --report

Show detail report

-e, --errors-only

Suppress "-r" and "-s" when nothing to alert

-c conf, --config=conf

Specify config file (arguments prevail over config)

If both of "-s" or "-r" are not specified, fallback to "-se".

Threshold Format

If argument is matched regex "/[0-9]+?/" or "nocheck", it's considerd as threshold.

Suffix character was consider as B=byte, K=KiloByte, M=Megabyte, G=GigaByte, T=TeraByte, P=PetaByte and %=Percent.

When string has no suffix character, longer than 3 will be treated as KiloByte, if not as percent.

This script alert when use% is over threshold of percentage or filesystem available size is under threshold of Byte and blocks.

ConfigFile Format

Same as command line arguments.

Especially, after "#" until end-of-line is considerd as comment.

Example

dsck -serv "95%" / 50M /tmp 5 /var/spool/squid nocheck

This means

  • Verbose output (+1)

  • Show summary and detail when error happened

  • Global threshold is 95%, "/" is 50MByte, "/tmp" is 5%

  • "/var/spool/squid" will not be checked