Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
VGSources
Blog

How to Use journalctl to Read Logs on a Linux VPS

A practical journalctl guide for Linux VPS administrators: read recent and service logs, inspect previous boots, follow events live, filter structured fields, and vacuum archived journal files safely.
Length10 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use journalctl over your VPS’s SSH session to inspect the systemd journal: start with sudo journalctl -e -n 100 for recent system messages, add -u name.service for one service, -f to watch new entries, and -b -1 to inspect the previous boot. Time, priority, and structured-field filters let you reduce a large journal to the entries relevant to an outage.

What journalctl reads

journalctl is the command-line reader for the binary, structured journal maintained by systemd-journald. The systemd project defines it this way: “journalctl is used to print the log entries stored in the journal by systemd-journald.service and systemd-journal-remote.service.” It is not a parser for an arbitrary text file such as /var/log/app.log. If a program writes to the systemd journal, its entries can be searched by metadata as well as by their displayed message.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

With no filtering options, journalctl prints the journal entries available to the calling user, beginning with the oldest entry and normally opening them in the less pager. The journal can contain kernel, boot, service, authentication, and application messages, provided those programs send messages to journald or are captured by a systemd service.

Connect to the VPS and get the required access

Open an SSH session

Connect to the server with your normal SSH client, then run the commands in that shell. Reading the complete system journal generally requires elevated privileges. Prefix a command with sudo when your account is not already allowed to read all journal files:

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
sudo journalctl

The systemd manual states that root and members of the systemd-journal, adm, and wheel groups can read all journal files, although the effect of those groups depends on the Linux distribution. An ordinary account may see only the journals it is permitted to access. A “no entries” result can therefore be an access issue rather than proof that the service produced no logs.

Check the unit name before filtering

-u matches a systemd unit, so use the exact unit name installed on the VPS. A service may be named differently across distributions or packages. Check its status first, then use the unit shown there in the journal command:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo systemctl status name.service

For example, substitute the unit identified by your system for name.service; do not assume that a package’s display name is also its systemd unit name.

The essential journalctl commands

Goal Command What it changes
Show the latest 100 entries and open at the end sudo journalctl -e -n 100 -n 100 limits the result; -e jumps to the newest part in the pager.
Show the latest 100 entries without a pager sudo journalctl --no-pager -n 100 Produces copyable output for an SSH transcript, ticket, or script.
Read one service’s history sudo journalctl -u nginx.service -u selects a systemd unit or unit pattern.
Follow one service live sudo journalctl -u nginx.service -f Prints recent entries, then waits for new ones; press Ctrl-C to stop.
Read the current boot sudo journalctl -b Restricts entries to the boot currently in progress.
Read the previous boot sudo journalctl -b -1 -1 selects the boot immediately before the current one.
Read a time window sudo journalctl --since "today" --until "now" Limits output to the calendar interval supplied to systemd’s time parser.
Show warnings and more severe messages for one service sudo journalctl -u nginx.service -p warning Applies a priority threshold while retaining the unit filter.

Replace nginx.service with the unit you are investigating. The example is a filter pattern, not a requirement that this particular service be installed.

Control how output is displayed

Pager, line count, and direction

Long output normally goes through less. Use the pager’s search and navigation keys when reading interactively, or add --no-pager when you need plain output. -n N limits the number of entries returned. -r reverses the order, placing the newest entries first, which can be useful when the relevant event is at the end of a large result.

Use unambiguous timestamps

The default display is designed for interactive reading. For a documented full date-and-time representation, request the short-full output format:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo journalctl -o short-full -n 50 --no-pager

Full timestamps help when correlating a journal entry with an incident timeline, a deployment record, or another server’s clock. Keep --no-pager when copying the result into a ticket so terminal controls are not included.

Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed

Filter by service, boot, and time

Service logs with -u

--unit (short form -u) selects entries associated with a systemd unit. It accepts a unit name or pattern. Start broad enough to establish what happened, then add a line limit or time range once the unit is confirmed:

sudo journalctl -u name.service --no-pager -n 100

Keeping the unit filter in place prevents unrelated kernel and service messages from obscuring the failure.

Boot-specific history with -b

Use -b for the current boot and -b -1 for the boot before it. This is valuable after a reboot, because a service that failed before the restart may no longer appear in the current boot’s output. Combine the boot selector with a unit:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo journalctl -b -1 -u name.service --no-pager

If the previous boot is not available, the journal may not be retaining that boot’s files; retention and storage settings determine how far back the history extends.

Time windows with --since and --until

The time options accept explicit calendar values such as 2012-10-30 18:17:16, words including today, yesterday, tomorrow, and now, and relative forms such as -1h. They are interpreted by systemd’s time parser. Quote values containing spaces:

sudo journalctl --since "-1h" --until "now" --no-pager

For a service incident, combine the unit and time boundaries so the output covers only the suspected window:

sudo journalctl -u name.service --since "2026-10-14 09:00:00" --until "2026-10-14 09:30:00" --no-pager

Use the server’s local time interpretation consistently when comparing entries with your monitoring system. If an event appears to be missing, widen the interval before concluding that journald did not record it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)

Follow logs in real time

Watch a service while reproducing a problem

The --follow option, abbreviated -f, prints recent matching entries and continues printing entries as they are appended. This is the quickest way to see what a restart or incoming request triggers:

sudo journalctl -u name.service -f
  1. Open one SSH terminal and start the follow command.
  2. In another terminal, perform the restart, configuration check, request, or other action that should generate a message.
  3. Read the timestamp, priority, and message emitted at the moment of the action.
  4. Press Ctrl-C when the observation period is over.

Follow mode is an observation operation; it does not alter the journal. Add --no-pager if your environment would otherwise invoke a pager, especially when redirecting or collecting terminal output.

Search structured fields instead of scanning text

Journal entries carry fields that can be matched in FIELD=VALUE form. This lets you search metadata even when the human-readable message differs between versions or processes.

Match a systemd unit or process ID

sudo journalctl _SYSTEMD_UNIT=sshd.service --no-pager
sudo journalctl _PID=1234 --since "-15min" --no-pager

_SYSTEMD_UNIT selects entries associated with the specified unit. _PID narrows the result to a process ID; replace 1234 with the PID relevant to your incident.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Understand how multiple matches combine

Matches on different fields are combined as logical AND. For example, a unit match plus a boot selector returns entries satisfying both conditions. Repeated matches for the same field are alternatives, allowing an OR-style search across several values. You can combine field matches with -u, -b, time boundaries, and priority filters to reduce noise during incident response.

sudo journalctl _SYSTEMD_UNIT=sshd.service -b --since "today" -p warning --no-pager

Use the narrowest combination that still preserves context. Starting with a very restrictive query can hide the earlier warning that explains a later error, so broaden the time range or remove the priority threshold when the sequence is unclear.

Priorities: isolate warnings and failures

The -p or --priority option filters by journal priority. Supplying a level such as warning includes warning messages and higher-severity messages for the selected scope:

Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
sudo journalctl -u name.service -p warning --since "today" --no-pager

Priority filtering is noise control, not a complete error detector. A service can record an operationally important event at an informational level, while a warning may be harmless. If the filtered view does not explain the incident, remove -p and inspect the surrounding entries.

A repeatable VPS troubleshooting workflow

  1. Confirm the unit. Run sudo systemctl status name.service and note the exact unit, current state, recent exit information, and the time of the failure.
  2. Capture recent context. Read the last 100 entries for that unit without a pager. This gives a bounded snapshot that is easy to copy.
  3. Set the incident window. Add --since and --until around the first failure, restart, deployment, or request. Include a few minutes before the event to capture the cause rather than only the final error.
  4. Observe a reproduction. Add -f in a separate SSH terminal, perform the action, and stop following with Ctrl-C.
  5. Compare boots. If the VPS rebooted, inspect the previous boot with -b -1 and the same unit filter. This separates pre-reboot evidence from the current startup.
  6. Reduce noisy output. Apply a priority threshold or structured-field match after you know which unit, process, or time period matters.
  7. Check storage before changing policy. Measure journal usage first; do not delete history merely because a query is large.

This order preserves evidence while progressively narrowing the search. It also distinguishes a service failure from a logging-access problem or a missing older boot.

Measure journal disk usage and clean archived files

Measure before removing anything

sudo journalctl --disk-usage

--disk-usage reports the space occupied by active and archived journal files. Run it before retention maintenance so you know the starting point and can verify the effect of a cleanup operation.

Vacuum by age, size, or file count

Retention goal Command
Remove archived files older than 14 days sudo journalctl --vacuum-time=14d
Reduce archived files to about 500 MB sudo journalctl --vacuum-size=500M
Keep at most 10 archived files sudo journalctl --vacuum-files=10

Vacuum operations act on archived journal files. Active files remain, so the total reported by --disk-usage may not fall by the exact amount suggested by the vacuum target. Add --rotate when you want active files archived before cleanup:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo journalctl --rotate --vacuum-time=14d

Choose a retention policy that preserves the history needed for your operational and security investigations. Vacuuming is destructive for the eligible archived entries; it is not a search or compression operation.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common problems and precise fixes

“Permission denied” or incomplete output

Retry with sudo. If that is not appropriate, ask an administrator whether your account should belong to systemd-journal, adm, or wheel; group behavior varies by distribution. Do not broaden permissions solely to make one troubleshooting command work.

The unit query returns nothing

Verify the exact unit name with systemctl status. A similarly named service, a unit pattern mismatch, an unavailable boot, or insufficient read access can all produce an apparently empty result. Remove the unit filter temporarily and constrain by time to determine whether the journal contains entries at all.

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.

The output is too large to use

Combine a unit with -n, a time window, --no-pager, or a priority threshold. If you need to preserve context, begin with a short window and expand it rather than discarding older entries immediately.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Follow mode appears idle

-f waits for new matching entries. Confirm that the action you are testing actually reaches the selected unit, then temporarily remove the unit or priority filter to see whether messages are being written elsewhere. Stop the command with Ctrl-C.

The previous boot is unavailable

-b -1 can show only boots still retained in the journal. Check --disk-usage and retention history; an earlier boot may have been vacuumed or never persisted across the reboot.

Vacuuming did not free as much space as expected

Remember that active files are excluded from ordinary vacuum operations. Use --rotate with the vacuum command, then measure again. The result can still differ from the target because the command removes eligible archived files rather than truncating every journal file to an exact byte count.

Command choices at a glance

Question Best starting option Scope or effect
What happened recently? -e -n 100 Recent snapshot, opened at the newest entries.
Can I paste the result into a ticket? --no-pager Plain output without interactive paging.
What did one service do? -u name.service One systemd unit or pattern.
What is happening now? -f Live follow until interrupted.
Did the failure occur before reboot? -b -1 Previous boot only.
What happened during the incident? --since ... --until ... Explicit time interval.
Which entries deserve immediate attention? -p warning Warnings and higher priority.
Is the journal consuming disk? --disk-usage Reports active plus archived journal space.

Practical examples for VPS administrators

Investigate a web-service restart

First identify the unit with systemctl status. Then capture a bounded history and watch the next restart:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo journalctl -u name.service -n 100 --no-pager
sudo journalctl -u name.service -f

Look for the first warning or configuration error before the final “failed” message. If the restart followed a deployment, add a time boundary around that deployment rather than reviewing the entire journal.

Investigate an SSH authentication incident

Use the authentication service unit reported by your distribution, then combine the unit with a time range and warning threshold. A structured unit match such as _SYSTEMD_UNIT=sshd.service is useful when you need metadata-based selection. Keep the full timestamps in any incident record so events can be correlated accurately.

Compare behavior across a reboot

Read the current boot and the prior boot separately, using the same unit and output limit. Differences can reveal whether a setting was applied only after startup or whether the failure began before the reboot. If the older query is empty, verify that the corresponding journal files still exist before treating the absence as evidence.

What journalctl can and cannot tell you

  • It can: retrieve messages stored by systemd-journald, select units, boots, times, priorities, process IDs, and other fields, follow new entries, and report or vacuum journal storage.
  • It cannot: display entries that were never sent to journald, recover archived files already removed, or replace an application’s separate log format when that application does not write to the journal.
  • It may require: sudo or membership in a distribution-approved journal-reading group for complete system-wide visibility.

When a service also writes ordinary text logs, use the service’s own logging documentation for those files and use journalctl for the messages captured by systemd. Treat an empty filtered result as a signal to verify unit names, permissions, time boundaries, and retention.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.