Re: [systemd-devel] Keeping track of usage time

2015-11-03 Thread Tomasz Torcz
On Tue, Nov 03, 2015 at 07:27:39AM +0100, Umut Tezduyar Lindskog wrote: > journalctl --list-boots seems great actually but wouldn't work for us. > We cannot keep lots of logs in our products. > > Ultimately we are trying to answer the question of how long one of our > product has been in use. >

Re: [systemd-devel] Keeping track of usage time

2015-11-03 Thread Umut Tezduyar Lindskog
On Tue, Nov 3, 2015 at 1:20 PM, Dimitri John Ledkov wrote: > On 3 November 2015 at 06:27, Umut Tezduyar Lindskog wrote: >> journalctl --list-boots seems great actually but wouldn't work for us. >> We cannot keep lots of logs in our products. >> > >

[systemd-devel] How to set multiple condition to service file

2015-11-03 Thread Jiwon Kim
Hi systemd-experts, I'm develop some daemon and it starts on booting time. But my daemon doesn't has any reason, if there is no 3rd party app. So, I will set to start condition using "ConditionDirectoryNotEmpty" option. Bellow is simple test and I checked working successfully. [Unit]

Re: [systemd-devel] "File exists warning" on first boot

2015-11-03 Thread Umut Tezduyar Lindskog
This is due to both services (getty@tty1.service and remote-fs.target) having [Install] section. I do not know why these services are not shipped without the [Install] section like the rest of the other systemd services. Umut On Tue, Sep 8, 2015 at 10:36 AM, Johan x Lundin

Re: [systemd-devel] Keeping track of usage time

2015-11-03 Thread Dimitri John Ledkov
On 3 November 2015 at 06:27, Umut Tezduyar Lindskog wrote: > journalctl --list-boots seems great actually but wouldn't work for us. > We cannot keep lots of logs in our products. > You shouldn't need to keep lots of logs, just a timer unit that would query and store/transmit

Re: [systemd-devel] systemd-nspawn and process spawning using nsenter issue

2015-11-03 Thread Lennart Poettering
On Mon, 02.11.15 20:35, Aliaksei Sheshka (sheshka...@gmail.com) wrote: > > > > Note that all units you join need to have PrivateNetwork=yes set if > > they shall live in the same namespace. Did both your units have this set? > > I have my unit c7-test like that: > >

Re: [systemd-devel] [PATCH 2/2] detect-virt: dmi: look for KVM

2015-11-03 Thread systemd github import bot
Patchset imported to github. To create a pull request, one of the main developers has to initiate one via: -- Generated by https://github.com/haraldh/mail2git

Re: [systemd-devel] Restarting nmb.service from within a program

2015-11-03 Thread Paul D. DeRocco
> From: Mantas Mikulenas [mailto:graw...@gmail.com] > > Pretty sure it's documented: > > http://www.freedesktop.org/wiki/Software/systemd/dbus/ > > http://www.freedesktop.org/wiki/Software/systemd/hostnamed/ > > and so on. Thanks. D-Bus looks like the correct way to do it. -- Ciao,

[systemd-devel] Restarting nmb.service from within a program

2015-11-03 Thread Paul D. DeRocco
I have a Yocto embedded system running a simple Samba 4 server, using systemd. I'm relying on the system hostname being the default netbios name, and I need to be able to change the hostname, and therefore the netbios name, from within my main application. I write the new hostname to

[systemd-devel] [PATCH 2/2] detect-virt: dmi: look for KVM

2015-11-03 Thread Andrew Jones
Some guests (ARM, AArch64, x86-RHEL) have 'KVM' in the product name. Look for that first in order to more precisely report "kvm" when detecting a QEMU/KVM guest. Without this patch we report "qemu", even if KVM acceleration is in use on ARM/AArch64 guests. --- src/basic/virt.c | 2 ++ 1 file

Re: [systemd-devel] Restarting nmb.service from within a program

2015-11-03 Thread Mantas Mikulėnas
On Tue, Nov 3, 2015 at 9:44 PM, Paul D. DeRocco wrote: > I have a Yocto embedded system running a simple Samba 4 server, using > systemd. I'm relying on the system hostname being the default netbios > name, and I need to be able to change the hostname, and therefore the >

[systemd-devel] [PATCH 2/2] detect-virt: dmi: fix mem leak

2015-11-03 Thread Andrew Jones
The variable 's' is still in scope until we exit the function. We can't call read_one_line_file on it multiple times without calling free in between. --- src/basic/virt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/basic/virt.c b/src/basic/virt.c index

[systemd-devel] [PATCH 0/2] detect-virt: fixes

2015-11-03 Thread Andrew Jones
These fixes are untested, as I don't have a good test environment for systemd. I noticed the issues in the code while preparing a couple patches (which are coming shortly). Andrew Jones (2): detect-virt: detect in best-heuristic order detect-virt: dmi: fix mem leak src/basic/virt.c | 21

[systemd-devel] [PATCH 1/2] detect-virt: detect in best-heuristic order

2015-11-03 Thread Andrew Jones
afaict, this will fix a regression caused by commit 75f86906c5. Where we used to report "kvm" before that patch, without this patch, we would only report "qemu". The reason is because cpuid detection must come before dmi detection. Also, both can safely come before other xen heuristics. ---

Re: [systemd-devel] [PATCH 2/2] detect-virt: dmi: fix mem leak

2015-11-03 Thread systemd github import bot
Patchset imported to github. To create a pull request, one of the main developers has to initiate one via: -- Generated by https://github.com/haraldh/mail2git

Re: [systemd-devel] Restarting nmb.service from within a program

2015-11-03 Thread Reindl Harald
Am 03.11.2015 um 20:44 schrieb Paul D. DeRocco: I have a Yocto embedded system running a simple Samba 4 server, using systemd. I'm relying on the system hostname being the default netbios name, and I need to be able to change the hostname, and therefore the netbios name, from within my main

[systemd-devel] [PATCH 1/2] arm/aarch64: detect-virt: check dmi

2015-11-03 Thread Andrew Jones
--- src/basic/virt.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/basic/virt.c b/src/basic/virt.c index fb181e5b55ee5..b0e33dc5f4d24 100644 --- a/src/basic/virt.c +++ b/src/basic/virt.c @@ -34,7 +34,7 @@ static int detect_vm_cpuid(void) { -/* Both

[systemd-devel] [PATCH 0/2] arm/aarch64: detect-virt: check dmi

2015-11-03 Thread Andrew Jones
ARM/AArch64 guests now have SMBIOS tables populated (when boot with a late enough QEMU and a late enough AAVMF is used as the bootloader). Furthermore, when booting ARM/AArch64 guests with ACPI, the DT detection obviously no longer works, so we need dmi detection. Finally, we can now even

Re: [systemd-devel] [PATCH 1/2] arm/aarch64: detect-virt: check dmi

2015-11-03 Thread Wei Huang
On 11/03/2015 03:19 PM, Andrew Jones wrote: > --- > src/basic/virt.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/src/basic/virt.c b/src/basic/virt.c > index fb181e5b55ee5..b0e33dc5f4d24 100644 > --- a/src/basic/virt.c > +++ b/src/basic/virt.c > @@ -34,7 +34,7

Re: [systemd-devel] [PATCH 0/2] arm/aarch64: detect-virt: check dmi

2015-11-03 Thread Wei Huang
On 11/03/2015 03:19 PM, Andrew Jones wrote: > ARM/AArch64 guests now have SMBIOS tables populated (when boot > with a late enough QEMU and a late enough AAVMF is used as the > bootloader). Furthermore, when booting ARM/AArch64 guests with > ACPI, the DT detection obviously no longer works, so we

Re: [systemd-devel] [PATCH 2/2] detect-virt: dmi: look for KVM

2015-11-03 Thread Wei Huang
On 11/03/2015 03:19 PM, Andrew Jones wrote: > Some guests (ARM, AArch64, x86-RHEL) have 'KVM' in the product name. See bab27ea2 of qemu tree... > Look for that first in order to more precisely report "kvm" when > detecting a QEMU/KVM guest. Without this patch we report "qemu", > even if KVM