System Logs
Logs are kept on a per-system directory, named log
, kept at the install
directory for each system.
Log files have names similar to
kvms100.240214.1127.log
Here, the component name comes first, and then, the date and time when the log file was created. When a log file becomes too big, a new one is started for the given component.
It is convenient to use the lx logs
command to list and inspect logs.
It takes care of reaching the involved log files on the involved hosts.
For example, to list all log files:
unix$ lx logs logs... atlantis: [ log/kvds100.240214.1127.log 250.00K log/kvms100.240214.1127.log 35.39K log/lxmeta100.240214.1127.log 24.10K log/lxqe100.240214.1127.log 445.80K log/spread.240214.1127.log 963 log/start.log 426 ]
Here, atlantis
was the only system installed.
We can give host and/or component names as in many other commands to focus on those systems and/or components.
For example, to just just logs for kvms
processes:
unix$ lx logs kvms logs... atlantis: [ log/kvms100.240214.1127.log 35.39K ]
Or, to list only those for the kvms100
:
unix$ lx logs kvms100
To list logs for the atlantis
host:
unix$ lx logs atlantis
To list logs for kvms
components within atlantis
:
unix$ lx logs atlantis kvms
To list logs for kvms
components at atlantis
and kvds
at orion
:
unix$ lx logs atlantis kvms orion kvds
With flag -p
, logs are printed in the output instead of being listed.
unix$ lx logs -p lxmeta atlantis: [ log/lxmeta100.240214.1127.log 24.10K [ # pid 3351755 cmd bin/javaw com.leanxcale.lxmeta.LXMeta -a atlantis!14410 ...
Flag -g
greps the logs for lines with the given expression.
For example:
unix$ lx logs -g fatal
And, flag -c
copies the logs to the given directory
unix$ lx logs -c /tmp
When printing and copying the logs, only the last log file for each component
are used.
To operate on all the logs and not just on the last one, use flag -a
too:
unix$ lx logs -a -c /tmp