Redirects, temporarily, the system console output to a specified device or file.
The swcons command temporarily switches the system console output to a different target during system operation. This command only switches system informational-, error-, and intervention-required message output to the specified destination. The swcons command does not affect the operation of the system console device that is providing a login by way of the getty command.
The device or file specified when using this command remains the target for console output until changed by another swcons command, until the next start of the system, or until the console driver detects an error when accessing the designated device or file. If an open or write error is detected on the device or file specified by the swcons command, the console device driver switches all output back to the device or file that provided console support when the system was last started.
The PathName parameter must be a fully qualified path name to a device or file that is to receive system console message output. If the PathName parameter specifies a file that does not exist, the swcons command creates the file. If the file does exist, the swcons command appends any new console message output to the contents of the file.
Attention: Use of the swcons command to switch console output to an NFS mounted file system or a diskless/dataless client might cause the operating system to hang.
Item | Description |
---|---|
-p Log_File | Specifies the full path name to use for the console output log file. |
-s Log_Size | Specifies the size, in bytes, of the console output log file. |
-t Tag_Verbosity | Specifies the verbosity level for console output tagging. Zero disables tagging; 1 through 9 enable tagging. For additional information about console output logging and tagging, see the console Special File in the AIX® Version 7.1 Files Reference book. |
-v Log_Verbosity | Specifies the verbosity level for console output logging. Zero disables logging; 1 through 9 enable logging. |
swcons /tmp/console.out
swcons /dev/tty3
swcons
Item | Description |
---|---|
/dev/console | Specifies the special file for system console access. |
/usr/sbin/swcons | Contains the swcons command file. |