ras_logger Command

Purpose

Log an error using the errors template.

Syntax

/usr/lib/ras/ras_logger [ -y template-file ]

Description

The ras_logger command logs one error, provided in standard input, using the error's template to determine how to log the data. The format of the input is the following:
error_label 
resource_name 
64_bit_flag 
detail_data_item1 
detail_data_item2 
...
The error_label field is the error's label defined in the template. The resource_name field is up to 16 characters in length. The 64_bit_flag field's values are 0 for a 32-bit error and 1 for a 64-bit error. The detail_data fields correspond to the Detail_Data items in the template.

Flags

Item Description
-y template-file Specifies a template file other than the /var/adm/ras/errtmplt default file.

Examples

  1. Log an error. The template is the following:
     + FOO: 
    		Catname = "foo.cat"
    		Err_Type = TEMP
    		Class = O
    		Report = TRUE
    		Log    = TRUE
    		Alert  = FALSE
    		Err_Desc = {1, 1, "Error FOO"}
    		Prob_Causes = {1, 2, "Just a test"}
    		User_Causes = {1, 2, "Just a test"}
    		User_Actions = {1, 3, "Do nothing"}
    		Detail_Data = 4, {2, 1, "decimal"} ,DEC
    		Detail_Data = W, {2, 1, "hex data"} ,HEX
    		Detail_Data = 100, {2, 1, "long string"} ,ALPHA 
    The ras_logger input in the tfile file appears as follows:
    FOO
    resource
    0
    15
    A0
    hello world
    Run the /usr/lib/ras/ras_logger <tfile command. This will log the FOO error with resource as the resource name. The detail data will consist of 4 bytes set to decimal 15, 4 bytes of hex data set to 0xa0, and the string "hello world". Note that if the value of the 64-bit flag was 1, the hexidecimal data would be 8 bytes set to 0xa0.
  2. Multi-item decimal values. The template is the following:
    + FOO:
    		Catname = "foo.cat"
    		Err_Type = TEMP
    		Class = O
    		Report = TRUE
    		Log    = TRUE
    		Alert  = FALSE
    		Err_Desc = {1, 1, "Error FOO"}
    		Prob_Causes = {1, 2, "Just a test"}
    		User_Causes = {1, 2, "Just a test"}
    		User_Actions = {1, 3, "Do nothing"}
    		Detail_Data = 8, {2, 1, "decimal"} ,DEC
    		Detail_Data = W, {2, 1, "hex data"} ,HEX
    		Detail_Data = 100, {2, 1, "long string"} ,ALPHA
    The ras_logger command inputs the following into the tfilefile:
    FOO
    resource 
    0 
    15 -15 
    A0 
    hello world
    Note: The decimal data is normally shown by the errpt command as two separate values using 4 bytes each. The input therefore contains 15 and -15. This is how it is shown by the errpt command.