Description
Switches the current active log file:
Notes:
$FWDIR/log/fw.log
$FWDIR/log/fw.adtlog
Syntax
fw [-d] logswitch [-audit] [<Name of Switched Log>] -h <Target> [[+ | -]<Name of Switched Log>] |
Parameters
Parameter |
Description |
---|---|
|
Runs the command in debug mode. Use only if you troubleshoot the command itself. |
|
Specifies to switch the active Audit log file ( You can use this parameter only on a Management Server. |
|
Specifies the remote computer, on which to switch the log. Notes:
|
|
Specifies the name of the switched log file. Notes:
|
|
Specifies to copy the active log from the remote computer to the local computer. Notes:
|
|
Specifies to transfer the active log from the remote computer to the local computer. Notes:
|
Compression
When this command transfers the log files from the remote computer, it compresses the file with the gzip
command (see RFC 1950 to RFC 1952 for details). The algorithm is a variation of LZ77 method. The compression ratio varies with the content of the log file and is difficult to predict. Binary data are not compressed. Text data, such as user names and URLs, are compressed.
Example 1 - Switching the active Security log on a Security Management Server
[Expert@MGMT:0]# fw logswitch Log file has been switched to: 2018-06-13_182359.log [Expert@MGMT:0]# |
Example 2 - Switching the active Audit log on a Security Management Server
[Expert@MGMT:0]# fw logswitch -audit Log file has been switched to: 2018-06-13_185711.adtlog [Expert@MGMT:0]# |
Example 3 - Switching the active Security log on a managed Security Gateway
[Expert@MGMT:0]# fw logswitch -h MyGW Log file has been switched to: 2018-06-13_185451.log [Expert@MGMT:0]# [Expert@MGMT:0]# ls $FWDIR/log/*.log /opt/CPsuite-R80.30/fw1/log/fw.log /opt/CPsuite-R80.30/fw1/log/MyGW__2018-06-13_185451.log [Expert@MGMT:0] |
Example 4 - Switching the active Security log on a managed Security Gateway and copying the switched log
[Expert@MGMT:0]# fw logswitch -h MyGW + Log file has been switched to: 2018-06-13_185451.log [Expert@MGMT:0]# [Expert@MGMT:0]# ls $FWDIR/log/*.log /opt/CPsuite-R80.30/fw1/log/fw.log /opt/CPsuite-R80.30/fw1/log/MyGW__2018-06-13_185451.log [Expert@MGMT:0]# [Expert@MyGW:0]# ls $FWDIR/log/*.log /opt/CPsuite-R80.30/fw1/log/fw.log /opt/CPsuite-R80.30/fw1/log/2018-06-13_185451.log [Expert@MyGW:0]# |