wparerr Command

Purpose

Logs an error message for a specific Workload partition (WPAR).

Syntax

From global

wparerr –w  WparName [{-c <cat file> -s <set no> -n <msg no>}]  -S default_string args

From WPAR

wparerr  [ -c  <cat file> -s <set no> -n <msg no>}]  -S default_string args

Description

The wparerr command provides a mechanism to log error messages for a given WPAR. Each WPAR can hold up to 1 KB of error messages. If there is enough space to log a new message, the command logs the message; otherwise, it fails. The -w option should not be used inside a WPAR. Everything after –S flag is treated as arguments for the message.

Flags

Item Description
-w Specifies the name of the workload partition for which the message should be logged.
-c Specifies the catalog file name to be used for translation.
-s Specifies the message set number of the error message in the catalog file.
-n Specifies the message number of the error message.
-S Specifies the default message string. Follows the same syntax as the printf subroutine Format parameter. Floating point is not supported.
args Specifies the arguments to the message if any.

Security

Attention RBAC users and Trusted AIX® users

This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in the security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr sub commands.

Example

  • To log a message for the WPAR mywpar from global:
     wparerr –w mywpar –c wparerrs.msg –s 1 –n 12 –S “ %s failed with return value %d\n” lswpar -1
  • To log a command failure from inside a WPAR:
    wparerr –c wparerrs.msg –s 1 –n 5 –S “ %s application does not allow checkpoint\n” myapplication