ファイル サーバー リソース マネージャーで使用できるコマンドおよびそのオプションについて その24

ブログ エントリ内にアフィリエイト広告が含まれています
スポンサーリンク

ファイル サーバー リソース マネージャー (FSRM) は、Windows Server 2003 R2から標準搭載された機能です。

FSRMを使用することで、ディスク ボリュームやフォルダに対して、クォータの設定を実施したり、特定種類のファイルの保存を禁止 (ファイル スクリーン) 、加えて、ディスク ボリュームやフォルダの使用状況といった記憶域に関するレポートの生成が可能となります。

これらの機能は、GUI上から設定することが可能ですが、コマンド ラインから実行することも可能です。

ここでは、Dirquota Notificationについて纏めました (Windows Server 2008 R2 SP1上で確認、本記事以外のコマンドおよびサブコマンドについては、「ファイル サーバー リソース マネージャーで使用できるコマンドおよびそのオプションについて その1」を参照)。

■構成ファイルの構文

汎用プロパティ

パラメーター 説明
Notification=NOTIFY_TYPE ファイルの最初の行にある必要があります。
NOTIFY_TYPE – 次のいずれかを指定します:
     M – 電子メールの通知
     E – イベント ログの通知
     C – コマンド ラインの通知
     R – レポートの通知
[RunLimitInterval=INTERVAL] 最高でINTERVALに指定した分毎に一回通知が上がります。

電子メールの通知

パラメーター 説明
To=EMAIL_LIST 電子メールの送信先項目の設定。
EMAIL_LISTはセミコロンで区切られた受信者の一覧です。
[From=EMAIL] 電子メールの送信元項目の設定。
EMAILは有効な電子メール アドレスです。
[ReplyTo=EMAIL] 電子メールの返信先項目の設定。
EMAILは有効な電子メール アドレスを指定します。
[Cc=EMAIL_LIST] 電子メールのCc項目の設定。
EMAIL_LISTはセミコロンで区切られた受信者の一覧です。
[Bcc=EMAIL_LIST] 電子メールの Bcc項目を設定します。
EMAIL_LISTはセミコロンで区切られた受信者の一覧です。
[Subject=TEXT] 電子メールの件名項目をTEXTに設定。
Message=TEXT 電子メールの本文をTEXTに設定。
本文中で改行するには各行の終わりで ” を使ってください。

イベント ログの通知

パラメーター 説明
[EventType=TYPE] イベントの種類を指定。TYPE は次の値を指定します:
     Warning     – 警告のイベント (既定)
     Information – 情報のイベント
     Error       – 深刻なエラーのイベント
Message=TEXT イベント本文を TEXT に設定。
本文中で改行するには各行の終わりで ” を使ってください。

コマンドの通知

パラメーター 説明
Command=PATH PATHでコマンドまたはスクリプトを実行します。
[Arguments=CMD_ARGS] 文字列CMD_ARGSをコマンド引数として使用します。
[Account=ACCOUNT] 指定されたACCOUNTでコマンドを実行します。
ACCOUNTは次の値を指定します:
     LocalService   – LOCAL SERVICEアカウント
     NetworkService – NETWORK SERVICEアカウント (既定)
     LocalSystem    – SYSTEMアカウント
[WorkingDirectory=PATH] コマンドの作業ディレクトリとしてPATHを使用します。
[MonitorCommand=STATUS] コマンドの実行の監視が必要な場合に指定します。
STATUSは次の値を指定します:
     Enable  – コマンドの監視する。
     Disable – コマンドを監視しない。(既定)
[KillTimeOut=TIMEOUT] TIMEOUT分後に監視されたコマンドを終了します。
MonitorCommand=Enableであることが必要です。
[LogResult=STATUS] コマンドのリターン コードをログに記録が必要な場合に指定します。
MonitorCommand=Enableであることが必要です。
STATUSは次の値を指定します:
     Enable  – ログに記録する。(既定)
     Disable – ログに記録しない。

レポートの通知

パラメーター 説明
ReportType=TYPE 生成するレポートの種類を指定します。TYPE は ‘|’ で区切り次のうちどれか 1 つ以上指定します:
     DuplicateFiles        – 重複ファイル レポート
     Export                – レポートのエクスポート
     FilescreenAudit       – ファイル スクリーン監査のレポート
     FilesByFileGroup      – ファイル グループごとのファイル レポート
     FilesByOwner          – 所有者ごとのファイル レポート
     LargeFiles            – 大きいサイズのファイル レポート
     LeastRecentlyAccessed – 最近アクセスされていないファイル レポート
     MostRecentlyAccessed  – 最近アクセスされたファイル レポート
     QuotaUsage            – クォータの使用率レポート
MailTo=EMAIL 電子メールの受信者にレポートを送信します。
EMAILはセミコロンで区切られた受信者の一覧です。

利用可能な変数

変数 説明
[Quota Path] Inserts the quota path.
[Quota Remote Paths] If the path for the quota is a shared folder or volume, inserts the path in Universal Naming Convention (UNC) format (\ServerShare).
[Quota System Path] Inserts the quota path in canonical format (\?VolumeGUID).
[Quota Limit] Inserts the quota limit in bytes.
[Quota Limit KB] Inserts the quota limit in KB.
[Quota Limit MB] Inserts the quota limit in MB.
[Quota Threshold] Inserts the quota threshold that caused the notification.
[Quota Used] Inserts the quota usage in bytes.
[Quota Used KB] Inserts the quota usage in KB.
[Quota Used MB] Inserts the quota usage in MB.
[Quota Used Percent] Inserts the quota usage as a percentage.
[Quota Peak] Inserts the quota peak usage in bytes.
[Quota Peak KB] Inserts the quota peak usage in KB.
[Quota Peak MB] Inserts the quota peak usage in MB.
[Quota Peak Percent] Inserts the quota peak usage as a percentage.
[Quota Peak Time] Inserts the time when the peak usage was recorded.
[Quota Free] Inserts the amount of free space remaining under the quota, in bytes.
[Quota Free KB] Inserts the amount of free space remaining under the quota, in kilobytes (KB).
[Quota Free MB] Inserts the amount of free space remaining under the quota, in megabytes (MB).
[Quota Free Percent] Inserts the amount of free space remaining under the quota, as a percentage.
[Source File Path] Inserts the path of the file that caused the notification.
[Source File Owner] Inserts the user name of the owner of the file that caused the notification.
[Source File Owner Email] Inserts the e-mail address of the owner of the file that caused the notification.
[Source Process Id] Inserts the ID of the process that caused the notification.
[Source Process Image] Inserts the name of the executable file for the process that caused the notification.
[Source Io Owner] Inserts the user name of the user who exceeded the quota threshold (for quota notifications) or saved the unauthorized file (for file screen notifications).
[Source Io Owner Email] Inserts the e-mail address of the user who exceeded the quota threshold.
[Server] Inserts the name of the server on which the notification occurred.
[Server Domain] Inserts the name of the domain of the server on which the notification occurred.
[Admin Email] Inserts the default e-mail addresses for the administrators.
[Source File Remote Paths] If the path for the file that caused the notification is a shared folder or volume, inserts the path in UNC format (\ServerShare).

[参考]

コメント

  1. […] 2011年11月23日 00:32 00:32 | #23 ファイル サーバー リソース マネージャーで使用できるコマンドおよびそ… […]

タイトルとURLをコピーしました