[systemd-devel] 回复: 回复: Is it possible to send a string to the journal of one specific systemd unit

2021-10-22 Thread DHAIY DHAIY
python works fine! Thanks a lot, Mantas. BR. 发件人: Mantas Mikulėnas 发送时间: 2021年10月23日 6:42 收件人: DHAIY DHAIY 抄送: systemd-devel@lists.freedesktop.org 主题: Re: [systemd-devel] 回复: Is it possible to send a string to the journal of one specific systemd unit This

Re: [systemd-devel] 回复: Is it possible to send a string to the journal of one specific systemd unit

2021-10-22 Thread Mantas Mikulėnas
This option was added with util-linux v2.25 in 2014. If you're using an older version or the Busybox `logger` instead, well, it won't have that. The alternative is to write your own C tool that uses libsystemd and calls sd_journal_send

[systemd-devel] Networking in a systemd-nspawn container

2021-10-22 Thread Tobias Hunger
Hello Systemd Mailing List! I have a laptop and run a couple of systemd-nspawn containers on that machine. This works great, except that name resolution insode the containers fails whenever the network on the outside changes. This is not too surprising: At setup time the resolver information is

Re: [systemd-devel] loose thoughts around portable services

2021-10-22 Thread Lennart Poettering
On Mi, 20.10.21 16:01, Umut Tezduyar Lindskog (u...@tezduyar.com) wrote: > > That said: systemd's nss-systemd NSS module can nowadays (v249) read > > user definitions from drop-in JSON fragments in > > /run/host/userdb/. This is is used by nspawn's --bind-user= feature to > > make a host user

[systemd-devel] 回复: 回复: Is it possible to send a string to the journal of one specific systemd unit

2021-10-22 Thread DHAIY DHAIY
Thanks a lot Mantas. But in my sytem, logger does not have "--journal". Are you aware of other tools from bash which can be used? BR 发件人: Mantas Mikulėnas 发送时间: 2021年10月22日 18:45 收件人: DHAIY DHAIY 抄送: systemd-devel@lists.freedesktop.org 主题: Re: [systemd-devel]

Re: [systemd-devel] A questions about modules-load service in systemd

2021-10-22 Thread Lennart Poettering
On Fr, 22.10.21 10:31, Joakim Zhang (qiangqing.zh...@nxp.com) wrote: > > Hi systemd experts, > > I saw you guys did much contributions in modules-load part recently, I have a > questions, some insight you input would be appreciated, thanks in advance. > > Do you know how to load all modules in a

[systemd-devel] systemctl start seems to hang with no status

2021-10-22 Thread Ulrich Windl
Hi! After a change in configuration ,updates and a reboot, I saw thgis probel in SLES12 SP5 (systemd-228-157.30.1.x86_64): ntpd.service failed during boot. For some reason /etc/ntp.conf was missing (my fault). After restoring /etc/ntp.conf and trying a start, start never seems to finish and I

Re: [systemd-devel] 回复: Is it possible to send a string to the journal of one specific systemd unit

2021-10-22 Thread Mantas Mikulėnas
If you have root privileges (i.e. UID 0), then yes, you can send a journal message with the "OBJECT_SYSTEMD_UNIT=myservice.service" field and journalctl will automatically look for that. In C, specify the field when calling sd_journal_sendv(); in bash you can use `logger --journal`: (echo

Re: [systemd-devel] Failed to set up mount namespacing: /run/systemd/unit-root/run/named

2021-10-22 Thread Josef Moellers
On 22.10.21 09:08, Josef Moellers wrote: > Hi, > I'm working on bind/named and I'm currently trying to find out why > starting of named fails. > When I run "systemctl start named", I get these lines in the journal: > Oct 22 09:02:05 sles15-sp4 systemd[2012]: Failed to determine whether >

[systemd-devel] 回复: Is it possible to send a string to the journal of one specific systemd unit

2021-10-22 Thread DHAIY DHAIY
Saying we have a systemd unit named "myservice". we can use journalctl -u myservice to inspect the logs generated by myservice. But is there a way to insert one string from command-line into myservice's journal so that it can be seen by journalctl -u myservice later?

[systemd-devel] Failed to set up mount namespacing: /run/systemd/unit-root/run/named

2021-10-22 Thread Josef Moellers
Hi, I'm working on bind/named and I'm currently trying to find out why starting of named fails. When I run "systemctl start named", I get these lines in the journal: Oct 22 09:02:05 sles15-sp4 systemd[2012]: Failed to determine whether /run/systemd/unit-root/run/named is already a mount point: No