Tail/head an LSF log file (GET)
Description
|
URL |
scheme://domain:port/platform/ws/lsflogs/{logfilename}?head =%d scheme://domain:port/platform/ws/lsflogs/{logfilename}?head=%d &days=%d scheme://domain:port/platform/ws/ lsflogs/{logfilename}?tail =%d scheme://domain:port/platform/ws/lsflogs/{logfilename}?tail=%d &days=%d |
|
|
Description |
Head and tail can only be used when LSF log files are located on a shared filesystem accessible to all hosts in the cluster with one network path, and the Platform Web Services host has access to these files. When head is used, by default, gets the first 30 lines of the specified log file for the past day. When tail is used, by default, gets the last 30 lines of the specified log file for the past day. |
|
|
HTTP Method |
GET |
|
|
Parameters |
Name | Description |
|
tail=%d |
Required to tail a log file. Returns the last specified number of lines for the log file. Specify a number from 30 to 200. |
|
|
head=%d |
Required to head a log file. Returns the first specified number of lines for the log file. Specify a number from 30 to 200. |
|
|
days=%d |
Optional. Number of days for which to head or tail a file, counted from the current date and time. Returns only the lines in the log file that fall within the specified time period. The default value is 1 day. Specify a number from 1 to 14. |
|
Request
Request-Method |
GET |
|
Request-URI |
|
|
Request-Header |
Name | Value |
Accept |
application/xml or application/json |
|
Message-body |
empty |
|
Response
Response-Code |
|
|
|
Response-Header |
Name | Value |
Content-Type |
application/xml or application/json |
|
Message-body |
Success Message | If successful, returns lines from the LSF log. For additional information, refer to the schema files ./schemas/lsflog/lsflog.xsd and ./schemas/lsflog/lsflogrecords.xsd. |
| Failure Message | If not successful, returns an error message. For additional information, refer to the schema file ./schemas/error/error.xsd. |
|
Related APIs
- Get a list of log files for a host/platform/ws/lsflogs?hostname=%s