cancel
Showing results for 
Search instead for 
Did you mean: 
yuxiao
Flight Engineer
Flight Engineer
  • 2,048 Views

One question about redirect journal

Jump to solution

Greetings,

I have one question regarding to the following part to redirect journel to storage. I understand every step. However, I don't understand why after you killed the process, the system will know to put the new journal into the new folder instead of the old one. Can someone help? Thanks. 

 

  1. Create the directory /var/log/journal.

    [root@demo ~]#   mkdir /var/log/journal 
  2. Set the group ownership of the new directory to systemd-journal, and the permissions to 2755.

    [root@demo ~]# chown root:systemd-journal /var/log/journal [root@demo ~]# chmod 2755 /var/log/journal
  3. Inform systemd-journald that the new location should be used by sending a USR1 signal to it. A reboot will also suffice.

    [root@demo ~]#   killall -USR1 systemd-journald 
Labels (2)
1 Solution

Accepted Solutions
dmis
Flight Engineer Flight Engineer
Flight Engineer
  • 2,009 Views

Ok i will try to explain.

With killall command you can not only terminate process. But send it a signal to do something.

In this command

killall -USR1 systemd-journald 

you tell process systemd-journald.

Hey proccess! I just created for you a new good warm place to write your logs!  Please move all your already collected log data to /var/log/journal/<guid> permanent hard disk place. New data keep in this place too.

You can restart systemd-journald too. But then you will loose already collected logs.

Please correct me if i made a mistake.

View solution in original post

2 Replies
dmis
Flight Engineer Flight Engineer
Flight Engineer
  • 2,010 Views

Ok i will try to explain.

With killall command you can not only terminate process. But send it a signal to do something.

In this command

killall -USR1 systemd-journald 

you tell process systemd-journald.

Hey proccess! I just created for you a new good warm place to write your logs!  Please move all your already collected log data to /var/log/journal/<guid> permanent hard disk place. New data keep in this place too.

You can restart systemd-journald too. But then you will loose already collected logs.

Please correct me if i made a mistake.

yuxiao
Flight Engineer
Flight Engineer
  • 1,993 Views

Thanks dmis!

0 Kudos
Join the discussion
You must log in to join this conversation.