vxlogmgr

vxlogmgr — manages the log files generated by the products that support Unified Logging

SYNOPSIS

<nbu_dir_path>vxlogmgr { -c | -m } -f AbsoluteDir [-a]

<nbu_dir_path>vxlogmgr { -d | -F } [-a]

<nbu_dir_path>vxlogmgr {-c | -m | -A filename} -f AbsoluteDir [-p ProductID] [-o OriginatorID] [-n Days] [-t Time] [-b StartDate] [-g LogSet] [-e EndDate] [-q] [-z]

<nbu_dir_path>vxlogmgr {-c | -m | -A filename} -f AbsoluteDir -w QueryString [-q] [-z]

<nbu_dir_path>vxlogmgr {-d | -F | -s} [-p ProductID] [-o OriginatorID] [-n Days] [-t Time] [-b StartDate] [-g LogSet] [-e EndDate] [-q] [-z]

<nbu_dir_path>vxlogmgr {-d | -F | -s} -w QueryString [-q] [-z]

<nbu_dir_path>vxlogmgr -v

On Windows systems, <nbu_dir_path> is <install_path>\NetBackup\bin\

DESCRIPTION

The vxlogmgr utility manages the log files generated by unified logging-enabled applications. Log file management includes actions such as deleting or moving the log files that are based on log management configuration settings.

Unified logging uses a standardized naming format for log files, as follows:

productID-originatorID-hostID-date-rotation.log

For more information about the unified logging naming format, and the logging originator IDs, refer to the NetBackup Troubleshooting Guide.

OPTIONS

Specify the log management action to perform.

-A, --arch FileName

Creates an archive named FileName for the specified set of conditions. The compressed zip file requires WinZip and wzzip on Windows to produce a zip file. On UNIX, a tar utility and GnuZip are required to produce a tar.gzip file.

-a, --auto

Retrieves the log files that are based on individual configuration settings for NumberOfLogFiles. The actions are taken based on the given action type (such as move, copy, or delete). When the -a option is specified, the other options cannot be used.

-b, --stdate 'StartDate'

Manages the log files created at the specified start date.

The required date value format in NetBackup commands varies according to your locale. The /user/openv/msg/.conf file (UNIX and Linux) and the install_path\VERITAS\msg\LC.CONF file (Windows) contain information such as the date-time formats for each supported locale. The files contain specific instructions on how to add or modify the list of supported locales and formats.

See the "Specifying the locale of the NetBackup installation" topic in the NetBackup Administrator's Guide, Volume II for more information.

It is surrounded by single quotes in UNIX and double quotes in Windows. For example:

UNIX and Linux: --stdate '1/1/2010 12:00:00 AM'

Windows: --stdate "1/1/2010 12:00:00 AM"

-c, --cp

Copies log files from the folder that is configured by the product to the specified folder.

-d, --del

Deletes the log files from the folder that the product configures.

-e, --endate 'EndDate'

Manages the log files created up to the specified EndDate.

The required date and time values format in NetBackup commands varies according to your locale. The /user/openv/msg/.conf file (UNIX and Linux) and the install_path\VERITAS\msg\LC.CONF file (Windows) contain information such as the date-time formats for each supported locale. The files contain specific instructions on how to add or modify the list of supported locales and formats.

See the "Specifying the locale of the NetBackup installation" topic in the NetBackup Administrator's Guide, Volume II for more information.

This option must be surrounded by single quotes in UNIX or Linux and double quotes in Windows.

UNIX and Linux: --endate '1/1/2010 12:00:00 PM'

Windows: --stdate "1/1/2010 12:00:00 AM"

-f, --dir AbsoluteDir

Specifies the absolute name of the directory into which the log files are to be copied. On UNIX or Linux systems, this directory must be on the same device as the opt/openv/netbackup/logs directory. This option is valid only with the -c option.

-F, --flush

Deletes all log files for the host that originates this command except the most current log file. If the host that runs this command uses a shared directory, all log files for all hosts that use the same directory are removed. Only the most current file is preserved for the host that originated the flush command.

-m, --mv

Moves log files from the folder that the product that is configured to the specified folder.

-n --days NumberOfDays

Manages the log files created in last NumberOfDays days for the specified action.

-o, --origid OriginatorID

Manages the log files identified by a given originator ID (OriginatorID).

-p, --prodid ProductID

Manages the log files identified by a given product ID (ProductID) for the specified action. Instead of an identifier, the user can provide the product name.

-q, --quiet

Prevents messages from being displayed (quiet mode).

-s, --vw

Views the log files for a given query.

-t, --tail hh:mm:ss

Manages the log files for the last hh:mm:ss hours.

-v, --version

Displays the version information for this command.

-w, --where QueryString

Retrieves a subset of logs that is based on a query string or condition (QueryString).

-z, --displaytimezone

Displays the time zone information along with the log file display.

EXIT STATUS

The following exit values are returned:

0 Successful completion.

-1 An error occurred.

QUERY STRINGS

A query string is a text expression, similar to a database WHERE clause, that is used to retrieve log entries from the unified logging system. The expression is a combination of relational operators, constant integers, constant strings, and names of log fields that evaluate to a single value. Logical operators, such as AND and OR, are used to group expressions.

Supported relation operators include:

< Less than

> Greater than

<= Less than and equal to

>= Greater than and equal to

= Equal to

!= Not equal to

Supported logical operators include && (logical AND) and || (logical OR).

Predefined log fields include:

PRODID Product identifier (integer or string)

ORGID Originator identifier (integer or string)

STDATE Locale-specific start date (long integer or string [such as 'mm/dd/yy'])

ENDATE Locale-specific end date (long integer or string [such as 'mm/dd/yy'])

PREVTIME Previous time (string [hh:mm:ss])

EXAMPLES

EXAMPLE 1

The following automatically moves the older log files that NetBackup created to the folder /tmp/nblogs. The --auto option depends on the configuration setting NumberOfLogFiles.

# vxlogmgr -m --auto --dir /tmp/nblogs

EXAMPLE 2

The following deletes log files that NetBackup created 15 days back:

# vxlogmgr -d --prodid NB -n 15

EXAMPLE 3

The following copies the log files created from date 01/22/09 by NetBackup:

# vxlogmgr -c --where "(prodid = NB) && (stdate >= '01/22/09')"
Windows systems: --dir c:\temp\logfiles

EXAMPLE 4

The following copies the log files created between 10/10/09 and 10/28/09 inclusive by product ID 100:

# vxlogmgr -c --where "(PRODID == 100) && ((STDATE >= '10/10/09')
Windows systems: && (ENDATE <= '10/28/09'))" --dir c:\temp\logfiles

SEE ALSO

vxlogview, vxlogcfg