Payments are experiencing issues due to temporary restrictions in Russia. If your payment does not go through, please submit a support request.Our support team is available 24/7 — we are always here to help with hosting and server issues.We are now accepting requests for dedicated server rental and colocation services in our data center.Reminder: we recommend enabling backups for additional data protection.A new VPS/VDS lineup with NVMe storage and improved performance is now available.Maintenance work on some servers has been completed. All services are operating normally.
Article4 min readViews0

How to Determine Why a Linux Server Rebooted

Step-by-step diagnostics for an unexpected Linux reboot: event timestamp, boot history, previous kernel logs, logging limitations, and signs of an abrupt shutdown.

Comments 0

Server rack after reboot with neat, unlabeled indicators
In this article

The server is back online, but the cause of the reboot does not disappear with the downtime. Before updates and new reboots, it is crucial to record the event time, the boundaries of the previous boot, and the latest kernel messages. This guide is intended for Ubuntu 24.04 LTS with systemd; the commands only read the system state.

Commands were verified against systemd and util-linux documentation as of September 26, 2026. They were executed in an isolated Ubuntu 24.04.3 LTS environment. In that environment, persistent logging and boot history were absent, so this result is analyzed separately below; an emergency reboot was not intentionally reproduced.

1. Clarify the current boot time

uptime -s

The command displays the start time of the current system. Compare it with monitoring data, support tickets, and provider events. This marks the boundary after which causes in the current log are too late to investigate; the interest usually lies at the end of the previous boot.

2. Review reboot and shutdown records

last -x --time-format iso -n 20

The option with extended events adds reboot and shutdown records from the wtmp log, the ISO format simplifies time zone comparison, and the row limit protects against excessively long output. A reboot record without a preceding shutdown may indicate an abnormal termination, but it does not prove the cause on its own.

Empty output is possible if the history file is missing, cleared, not saved in the container, or starts after the event. In the test environment, the command reported only the wtmp start date and showed no reboots. This is a source limitation, not confirmation that the server was not rebooted.

3. Check if journalctl sees previous boots

journalctl --list-boots --no-pager

The list contains the identifier, relative number, and time boundaries for each saved boot. The current boot usually has number 0, the previous one -1. If only the current boot exists, you cannot switch to the old log.

4. Read warnings from the previous boot

journalctl -b -1 -p warning..alert --no-pager

The filter selects the previous boot and log levels from warning to alert. Start with the latest messages and examine the time context. Not every warning is related to a reboot, and the absence of warnings does not rule out power loss: the system may not have had time to record the cause.

5. Check kernel messages separately

journalctl -k -b -1 --no-pager

Look for messages about memory shortage, hangs, hardware errors, file system issues, watchdog events, and kernel panics. A term in a log line is not yet a diagnosis: for example, a message about a completed file system recovery may be a consequence of an unexpected shutdown, not its cause.

Observation

What it may mean

What to check next

Correct shutdown before reboot

Planned restart

Who initiated the action, updates, or automation

No end of the previous log

Power loss or unsaved logs

Provider console, power, log persistence

OOM messages

Kernel terminated processes due to memory

RAM, swap, and memory owner graphs

Watchdog or lockup

System or kernel hang

Kernel version, hardware, and dump

Disk or file system errors

Storage issue or consequence of a failure

SMART data from the provider, console, and checks during maintenance windows

If journalctl reports that there are no logs

First, verify the existence of the /var/log/journal directory and the journald policy. Do not create the directory or change settings solely to investigate an event that has already occurred; this will not restore lost records.

ls -ld /var/log/journal

In containers, logs are often not persisted or are managed by the host. On a VPS, some causes—hardware reset, node migration, or panel action—are visible only in the provider console. Request events for the exact time interval and specify the time zone.

When to stop and escalate

  • The reboot repeats, and the log contains disk errors, file system errors, watchdog events, or a kernel panic.

  • The boot time does not match the data from the control panel and monitoring.

  • The previous log is missing from the server where it should be retained according to policy.

  • An OOM occurred before the restart, but the memory owner is not set.

  • Continuing will require a file system check, a kernel update, or a configuration change.

Do not start by forcibly terminating processes, clearing logs, or restarting. Save available log lines, timestamps, and boot identifiers. System changes must be performed separately, with a backup, a coordinated downtime window, and a rollback procedure.

Discussion 0

Share your experience and ask questions. Comments without links appear after editorial review.

No comments yet. Start the discussion.