Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
home_server:home_server_setup:other_services:systemd [2021-03-01 Mon wk09 22:16] – [Journalctl stuff] baumkphome_server:home_server_setup:other_services:systemd [2023-12-26 Tue wk52 11:39] (current) baumkp
Line 1: Line 1:
 +{{tag>systemd systemctl timer timers journalctl linux debian setup customise customisation}}
 ======systemd Stuff====== ======systemd Stuff======
   * [[https://linuxconfig.org/how-to-create-systemd-service-unit-in-linux|How to create systemd service unit in Linux]]   * [[https://linuxconfig.org/how-to-create-systemd-service-unit-in-linux|How to create systemd service unit in Linux]]
Line 19: Line 20:
  
 Edit ''sudo vim /etc/systemd/journald.conf'' make variable ''Storage=persistent'' to make journald store the journal files in ''/var/log/journal'', this will create directory if necessary. This also ensure log files are available from previous boots.\\ Edit ''sudo vim /etc/systemd/journald.conf'' make variable ''Storage=persistent'' to make journald store the journal files in ''/var/log/journal'', this will create directory if necessary. This also ensure log files are available from previous boots.\\
 +\\
 ''sudo systemctl force-reload systemd-journald'' to reload journald or restart instead ''sudo systemctl force-reload systemd-journald'' to reload journald or restart instead
-''sudo journalctl -u systemd-journald'' to check status of journal\\ +''sudo journalctl -u systemd-journald'' to check status of journal.\\ 
 +\\ 
 +some useful flag and inputs: 
 +  *''sudo journalctl -b'' to see current boot journal only use ''-b -1'' to see last boot entries. 
 +  *''journalctl --list-boots'' to list all available journaled boots. 
 +  *''sudo journalctl -u pppoe'', use u flag to see specified unit files only. 
 +  *''sudo journalctl -k'' to see kernel messages only 
 +  *''sudo journalctl -p 3'' to see only specified error priority messages and more severe.  
 +    * 0: emerg 
 +    * 1: alert 
 +    * 2: crit 
 +    * 3: err 
 +    * 4: warning 
 +    * 5: notice 
 +    * 6: info 
 +    * 7: debug 
 +  * ''-r'' flag is used to show in reverse chronological order.
 some links:\\ some links:\\
 [[https://www.linode.com/docs/guides/how-to-use-journalctl/|Use journalctl to View Your System's Logs]] [[https://www.linode.com/docs/guides/how-to-use-journalctl/|Use journalctl to View Your System's Logs]]