POWER7 information
Virtual logs
A virtual log is a directory in a virtual log repository.
The virtual log
is used to store logs that are generated by an AIX® logical partition.
The properties of a virtual log can either be specified or inherited
from the virtual log repository when the virtual log is created. The
following table lists the virtual log properties.
Property | Description |
---|---|
Unique ID (UUID) | Specifies the unique ID of the virtual log. This value is assigned when the virtual log is created and is retained permanently. If a logical partition is migrated to another system, the virtual log is re-created with the same configuration and unique ID on the destination Virtual I/O Server (VIOS) partition. For more information, see Live Partition Mobility of virtual log devices. |
State | Indicates whether the virtual log can be attached
to a client logical partition. It has the following possible values:
|
Client name | Indicates the name of the client. This property can be set to any value. However, typically all virtual logs intended for a particular client logical partition are assigned the same client name, for ease of administration. If a virtual log is created and attached to a client logical partition in a single operation, the VIOS attempts to obtain the host name from the client logical partition and use that as the client name if it is not specified on the command line. |
Log name | Indicates the name of a virtual log. This property can be assigned any value by the administrator of the client logical partition, depending on the purpose, and must be provided when a new virtual log is created. For example, you can create two virtual logs, audit and syslog, for a given logical partition for the collection of audit and syslog data. |
Maximum log file size | Specifies the maximum file size of the virtual log in bytes. |
Maximum number of log files | Specifies the maximum number of virtual log files. |
Maximum state file size | Specifies the maximum size of the state file in bytes. A state file consists of additional information about when the virtual log devices were configured, opened, closed, and various other operations that might be of interest in an analysis of log activity. |
Maximum number of state files | Specifies the maximum number of state files. A state file consists of additional information about when the virtual log devices were configured, opened, closed, and various other operations that might be of interest in an analysis of log activity. |
Notes:
- The client name and log name properties also define the directory within the virtual log repository in which the log is stored. A virtual log repository contains a subdirectory for each client name. This subdirectory contains a directory for each log name. For example, with the local virtual log repository set to the default directory /var/vio/vlogs, a virtual log with the client name lpar-01 and the log name audit stores the logs in the /var/vio/vlogs/lpar-01/audit/ directory.
- If you rename the logical partition or change the host name, the client name property is not automatically updated. Use the chvlog command to change the value of the client name for the virtual log.
Each virtual log consists of the following types of information:
- Log data: Raw log data generated by the client logical partition. The log data is stored in files named in the client_name_log_name.nnn format.
- State data: Additional information about when the virtual log devices were configured, opened, closed, and various other operations that might be of interest in an analysis of log activity. This data is generated without any explicit user action. The state data is stored in files that are named in the client_name_log_name.state.nnn format.
For example, consider a virtual log with the following properties:
Client name: lpar-01
Log name: audit
Maximum number of log files: 3
Maximum log file size: 2091216
Maximum number of state files: 2
Maximum state file size: 1000000
After a period
of continued log generation, where the log files might have wrapped
multiple times, the following directory contents are expected. The
new log data are written to lpar-01_audit.002 and
the new state data are written to lpar-01_audit.state.000.
For example, running ls –l /var/vio/vlogs/lpar-01/audit results
in the following output:-rw------- 1 root system 2091216 May 25 18:28 lpar-01_audit.000
-rw------- 1 root system 2091216 May 25 18:38 lpar-01_audit.001
-rw------- 1 root system 752104 May 25 18:48 lpar-01_audit.002
-rw------- 1 root system 16450 May 25 18:45 lpar-01_audit.state.000
-rw------- 1 root system 1000000 May 21 07:23 lpar-01_audit.state.001