Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

60%
+1 −0
Q&A Journalctl - how to restrict search to only certain boot IDs?

It seems like systemd labels every boot with some ID. Suppose I have some sporadic issue that happens only on some boots. I want to search logs for only the boots that have the issue, not all boot...

1 answer  ·  posted 4mo ago by matthewsnyder‭  ·  last activity 4mo ago by GeraldS‭

Question systemd journalctl
#1: Initial revision by user avatar matthewsnyder‭ · 2024-07-22T18:11:52Z (4 months ago)
Journalctl - how to restrict search to only certain boot IDs?
It seems like systemd labels every boot with some ID.

Suppose I have some sporadic issue that happens only on some boots. I want to search logs for *only* the boots that have the issue, not all boots. I don't want to spot check - because the issue is sporadic, it will have to be more systematic.

Suppose I get the boot IDs of interest in some simple format (suppose from https://linux.codidact.com/posts/292100) such as a text file with one ID per line. The list is long and changes often, I don't want to reformat it into a long string of CLI args.

Is there some way to tell `journalctl`:
> Look only at logs for boots with the IDs from the file boots.txt

?