4.14 FolderFileCount

Use this Knowledge Script to monitor the number of files in a folder that match a set of criteria. This script raises an event if the number of matching files per folder exceeds the threshold you specify.

4.14.1 Resource Object

Misc Device folder

4.14.2 Default Schedule

The default schedule for this script is Every 24 hours.

4.14.3 Setting Parameter Values

Set the following parameters as needed:

Description

How to Set It

Event Notification

Raise event if threshold is exceeded?

Select Yes to raise an event if the number of files found matching your criteria exceeds the threshold you specify. The default is Yes.

Severity - Exceeded threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the number of matching files exceeds the threshold. The default is 11 (yellow event indicator).

Raise event if a folder cannot be accessed?

Select Yes to raise an event if the folder you specify in the Root folder to begin the search parameter does not exist or cannot be accessed because the account under which the NetIQ Client Resource Monitor service (NetIQmc) is running does not have permission to open the folder.

The default is unselected.

Severity - Folder not accessible

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the specified folder does not exist or cannot be accessed. The default is 25 (blue event indicator).

Severity - Job failure

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the FolderFileCount job fails unexpectedly. The default is 5 (red event indicator).

Data Collection

Collect file count data?

Select Yes to collect data for charts and reports. If enabled, data collection returns the number of folders with a file count that exceeds your threshold and the number of files per folder that match your filtering criteria. The default is unselected.

Monitoring

Logical drive letter(s) to search

Type a comma-separated list, with no spaces, of the letters representing the logical drives you want to search. For example: C,D.

Root folder to begin the search

Type the path to the folder on each drive where you want to begin searching. For example, Documents and Settings\Administrator\My Documents to begin searching in the My Documents folder.

The default is users.

File name(s), can use * andĀ ? wildcards

Type the filenames to search for. Use the * wildcard to represent any number of characters; use theĀ ? wildcard to represent any single character. The default is *.* (all files).

You can enter only one filename here, but with the use of wildcards, you can search for multiple files.

Search subfolders?

Select Yes to search any subfolders of the root folder in which your search begins. The default is unselected.

File count threshold per folder

Specify the maximum number of files per folder that can be found that match your criteria before an event is raised. The default is 500.

File Filters

File Attributes Filter

File attribute operator

Select the operator (AND or OR) to apply to the criteria in the File Attributes Filter parameters. For example, instruct the script to search for files that have the Archive attribute AND the Hidden attribute. The default is OR.

Archive attribute

Select Yes to search for files that have the Archive attribute. The default is unselected.

Hidden attribute

Select Yes to search for files that have the Hidden attribute. The default is unselected.

Read-only attribute

Select Yes to search for files that have the Read-only attribute. The default is unselected.

System attribute

Select Yes to search for files that have the System attribute. The default is unselected.

Date Modified Filter

Apply date modified filter?

Select Yes to apply a search filter that considers the date on which a file was modified. The default is unselected.

Select time range

Click Browse [...] to set a specific or sliding date/time range for the date/time on which files were modified. The default is a sliding range of 1 Day with the End now option selected.

A specific date/time range defines a specific start and end date and time, for example:

1/1/2004 12:00 AM to 1/31/2004 11:59 PM.

A sliding date/time range defines a time range relative to the start time of the Knowledge Script job. For example, a sliding date/time range of 1 Day extends from 12:00 AM of the previous day to 11:59 PM of the previous day (the entire 24-hour period of the day prior to the day the script runs).

The End now option for the sliding date/time range extends the time range up to the start time of the Knowledge Script job. For example, if the job runs at 3:00 PM with a sliding range of 1 Day, then the time range covered is 12:00 AM of the previous day to 3:00 PM of the current day.

File Size Filter

Apply file size filter?

Select Yes to apply a search filter that considers the size of a file. The default is unselected.

File size

Specify the number of units that define the file size. The type of units are set in the File size scale parameter. The default is 10.

File size scale

Specify the type of unit that defines the file size (for example, kilobytes). The default is megabytes.

File size operator

Specify the operator that defines the file size (for example, less than 10 megabytes). The default is greater than.