NAME
log — show the
VM's console
SYNOPSIS
ssh |
chroot.dev log [-n
lines] name
[--json] |
DESCRIPTION
log shows the last lines of the VM's
serial console: kernel messages from the boot, and the
vmagent:
lines of each boot: a
start
line with how the VM booted, its id and its name, a line for each step with
something to say (the data disk, the setup script, the secrets, a failure),
then
ready or
the steps that failed; a
stop line
says why the VM went down. When ssh on a VM does not answer, they show how
far it got.
The console is kept across restarts, up to about 2 MiB: past 1 MiB
the older part moves aside, also while the VM runs, and what was there
before is dropped. A few lines may be lost at that moment.
log reads the last 256 KiB, so with long lines it
shows fewer than -n asks.
The options are:
-nlines- How many lines, 50 by default and at most 1000.
EXAMPLES
$ ssh chroot.dev log web | grep vmagent vmagent: start kind=restore id=6f1c2d4e-0a3b-4c5d-9e8f-7a6b5c4d3e2f name=web gen=1 new=1 vmagent: ready $ ssh chroot.dev log web -n 1000 --json | jq -r '.lines[]'