// Module included in the following assemblies:
//
// * microshift_troubleshooting/microshift-troubleshoot-updates.adoc

:_mod-docs-content-type: PROCEDURE
[id="microshift-check-journal-logs-updates_{context}"]
= Checking journal logs after updates

[role="_abstract"]
You can use journal logs to help diagnose {microshift-short} update failures. The default configuration of the `systemd` journal service stores data in a volatile directory, which does not persist across restarts. To retain logs across restarts, enable log persistence and set a maximum size limit for journal data.

.Procedure

* Get comprehensive {microshift-short} journal logs by running the following command:
+
[source,terminal]
----
$ sudo journalctl -u microshift
----

* Check the greenboot journal logs by running the following command:
+
[source,terminal]
----
$ sudo journalctl -u greenboot-healthcheck
----

* Examining the comprehensive logs of a specific boot uses three steps. First list the boots, then select the one you want from the list you obtained:

** List the boots present in the journal logs by running the following command:
+
[source,terminal]
----
$ sudo journalctl --list-boots
----
+
.Example output
[source,text]
----
IDX  BOOT ID                          	FIRST ENTRY                 LAST ENTRY
 0   681ece6f5c3047e183e9d43268c5527f 	<Day> <Date> 12:27:58 UTC 	<Day> <Date>> 13:39:41 UTC
#....
----

** Check the journal logs for the specific boot by running the following command:
+
[source,terminal,subs="+quotes"]
----
$ sudo journalctl --boot __<idx_or_boot_id>_
----
+
where:
+
idx_or_boot_id::
Replace `_<idx_or_boot_id>_` with the `IDX` or the `BOOT ID` number assigned to the specific boot that you want to check.

** Check the journal logs for the boot of a specific service by running the following command:
+
[source,terminal,subs="+quotes"]
----
$ sudo journalctl --boot __<idx_or_boot_id>__ -u __<service_name>__ 
----
+
where:
+
idx_or_boot_id::
Replace `_<idx_or_boot_id>_` with the `IDX` or the `BOOT ID` number assigned to the specific boot that you want to check.
service_name::
Replace `_<service_name>_` with the name of the service that you want to check.
