3.2.5 logresolve
The logresolve command converts the IP address of the access log file into a host name.
Synopsis
logresolve [-s file-name] [-c] < Access-log-file-name > New-log-file-name
Storage location
Application Server installation directory/httpsd/sbin
Function
The logresolve command converts the IP address of the access log file (that has IP address at the beginning of the record) into the host, and outputs to the new log file. The conversion rule depends on the reverse lookup of host name.
Execution permission
Superuser
Arguments
- -s file-name
-
This parameter specifies the file to which conversion information is to be output.
- -c
-
Use this option to check whether the host name after conversion matches the IP address before conversion.
- Access-log-file-name
-
This parameter specifies the input log file name. Reverse the look up of the host name from the IP address mentioned in the input file. The IP address must be at the top of the record. If an attempt to retrieve the host name fails, the IP address is output to the new log file.
- New-log-file-name
-
This parameter specifies a file name that outputs the access log with IP address converted to the host.
Examples
Convert the IP address of access log stored in the logs\access.log, into the host name.
Access log file: logs\access.log
New log file: logs\new_access.log
logresolve < logs\access.log > logs\new_access.log
Exit Status
Exit Status |
Explanation |
---|---|
0 |
command executed successfully. |
Other than 0 |
error in executing the command. |