Re: [systemd-devel] How does journald talks to other services?

2021-08-25 Thread Nishant Nayan
Got it. What do we mean by "indexing" of logs for faster lookup? , Journlad does this I have seen this word in docs but no clear explanation, is it related to addition of timestamp, process_name, log_priority (info,debug...) to the log messages ? On Tue, 24 Aug 2021 at 11:54, Lennart Poettering

Re: [systemd-devel] How does journald talks to other services?

2021-08-23 Thread Lennart Poettering
On Di, 24.08.21 09:11, Nishant Nayan (nayan.nishant2...@gmail.com) wrote: > So what are the cases where syslog forwards logs to journal? > Is there a case where both journal and syslog end up sending same logs to > each other ( like a cycle ) resulting in duplicate logs? systemd does not pick up

Re: [systemd-devel] How does journald talks to other services?

2021-08-23 Thread Nishant Nayan
So what are the cases where syslog forwards logs to journal? Is there a case where both journal and syslog end up sending same logs to each other ( like a cycle ) resulting in duplicate logs? Nishant On Mon, 23 Aug 2021, 14:02 Mantas Mikulėnas, wrote: > On Mon, Aug 23, 2021, 11:19 Nishant Nayan

Re: [systemd-devel] How does journald talks to other services?

2021-08-23 Thread Nishant Nayan
yes, I did daemon-reload and restarted the service and socket /dev/log is a real socket , it gets re-created on rm. Although, i have another system where /dev/log is a symlink On Mon, 23 Aug 2021 at 14:02, Mantas Mikulėnas wrote: > On Mon, Aug 23, 2021, 11:19 Nishant Nayan > wrote: > >> I was u

Re: [systemd-devel] How does journald talks to other services?

2021-08-23 Thread Mantas Mikulėnas
On Mon, Aug 23, 2021, 11:19 Nishant Nayan wrote: > I was using logger command to see if the logs goes to journal, and it > does, it goes both in /var/log/messages (owned by syslog) and journal, how > is it happening? Is it because journal listens to /dev/log ? > Journald listens to /dev/log and

Re: [systemd-devel] How does journald talks to other services?

2021-08-23 Thread Nishant Nayan
I was using logger command to see if the logs goes to journal, and it does, it goes both in /var/log/messages (owned by syslog) and journal, how is it happening? Is it because journal listens to /dev/log ? The following is from systemd-journald.socket [Socket] ListenStream=/run/systemd/journal/stdo

Re: [systemd-devel] How does journald talks to other services?

2021-08-20 Thread Mantas Mikulėnas
On Fri, Aug 20, 2021 at 2:11 PM Mantas Mikulėnas wrote: > On Fri, Aug 20, 2021 at 2:10 PM Nishant Nayan > wrote: > >> Regarding the below point : >> c) The service prints to stdout/stderr, but systemd attaches the >> service's stdout/stderr to a pipe which is read by journald (using >> sd_journa

Re: [systemd-devel] How does journald talks to other services?

2021-08-20 Thread Mantas Mikulėnas
On Fri, Aug 20, 2021 at 2:10 PM Nishant Nayan wrote: > Regarding the below point : > c) The service prints to stdout/stderr, but systemd attaches the service's > stdout/stderr to a pipe which is read by journald (using > sd_journal_stream_fd(3) from libsystemd). See [Service] StandardOutput= in >

Re: [systemd-devel] How does journald talks to other services?

2021-08-20 Thread Nishant Nayan
Regarding the below point : c) The service prints to stdout/stderr, but systemd attaches the service's stdout/stderr to a pipe which is read by journald (using sd_journal_stream_fd(3) from libsystemd). See [Service] StandardOutput= in systemd.service(5). I did not see StandardOutput field in [Serv

Re: [systemd-devel] How does journald talks to other services?

2021-08-20 Thread Nishant Nayan
Thanks, I will check them out Nishant On Fri, 20 Aug 2021 at 15:22, Lennart Poettering wrote: > On Fr, 20.08.21 15:01, Nishant Nayan (nayan.nishant2...@gmail.com) wrote: > > > Hi, > > My query is how does systemd-journald talk to other services so that > it > > stores their logs/output in j

Re: [systemd-devel] How does journald talks to other services?

2021-08-20 Thread Lennart Poettering
On Fr, 20.08.21 15:01, Nishant Nayan (nayan.nishant2...@gmail.com) wrote: > Hi, > My query is how does systemd-journald talk to other services so that it > stores their logs/output in journal files, which could be displayed using > journalctl utlity. > I am currently looking into systemd jou

Re: [systemd-devel] How does journald talks to other services?

2021-08-20 Thread Mantas Mikulėnas
On Fri, Aug 20, 2021 at 12:31 PM Nishant Nayan wrote: > Hi, > My query is how does systemd-journald talk to other services so that > it stores their logs/output in journal files, which could be displayed > using journalctl utlity. > Journald doesn't talk to services, services talk to journal

[systemd-devel] How does journald talks to other services?

2021-08-20 Thread Nishant Nayan
Hi, My query is how does systemd-journald talk to other services so that it stores their logs/output in journal files, which could be displayed using journalctl utlity. I am currently looking into systemd journal code to find this out but so far no luck. Any suggestions would be appreciated