Re: [systemd-devel] Question about OnUnitInactiveSec= directive

2016-07-08 Thread Andrei Borzenkov
09.07.2016 01:37, Mikhail Kasimov пишет: > Hello! > > Have a .timer service like: > > == > > [Unit] > Description=Runs VBA32 Update Hourly > Requires=timers.target > > [Timer] > OnBootSec=2min > OnUnitInactiveSec=1h > > [Install] > WantedBy=timers.target > > == > > to run vba32update

[systemd-devel] Question about OnUnitInactiveSec= directive

2016-07-08 Thread Mikhail Kasimov
Hello! Have a .timer service like: == [Unit] Description=Runs VBA32 Update Hourly Requires=timers.target [Timer] OnBootSec=2min OnUnitInactiveSec=1h [Install] WantedBy=timers.target == to run vba32update.service in 1 hour after previous update-session is over (OnUnitInactiveSec=1h)

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread David Timothy Strauss
On Fri, Jul 8, 2016 at 9:07 AM Lennart Poettering wrote: > Ultimately it's really a design decision: tabular file formats have > the benefit of being a lot more dense, but are neither particularly > extensible nor self-explanatory (as you need to know what each column > means). Unit files are a b

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Michał Zegan
the only reason to add such a thing at all is that making one file is easier/faster. There is no other reason beside this one, so if it is not considered a good one, then this feature is othervise useless. Also, some time after proposing this I realized that it would be very easy to implement what

Re: [systemd-devel] Depending on services from a service unit template

2016-07-08 Thread Andrei Borzenkov
08.07.2016 22:01, Lennart Poettering пишет: > On Fri, 01.07.16 06:37, Andrei Borzenkov ([email protected]) wrote: > >> In principle, I do not see why we cannot have WantedBy and RequiredBy as >> first class directives under [Unit] to spare all these hoops. > > systemd loads unit files as they a

Re: [systemd-devel] Depending on services from a service unit template

2016-07-08 Thread Lennart Poettering
On Mon, 27.06.16 08:25, Paul Menzel ([email protected]) wrote: > Dear systemd folks, > > > having a template for a service unit like `[email protected]`, and > starting several services from it, is there a way, to let another > service unit require all services started from that t

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Andrei Borzenkov
08.07.2016 21:40, Michał Zegan пишет: > Well, I also came with another idea. of course if you do not want to > have two different ways to do one thing it is a stopper, but I will tell > about it for completeness as it may or may not be easier to implement. > Instead of creating a timer unit on serv

Re: [systemd-devel] Depending on services from a service unit template

2016-07-08 Thread Lennart Poettering
On Fri, 01.07.16 06:37, Andrei Borzenkov ([email protected]) wrote: > In principle, I do not see why we cannot have WantedBy and RequiredBy as > first class directives under [Unit] to spare all these hoops. systemd loads unit files as they are requested, by following dependencies. i.e. when we

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Michał Zegan
Well, I also came with another idea. of course if you do not want to have two different ways to do one thing it is a stopper, but I will tell about it for completeness as it may or may not be easier to implement. Instead of creating a timer unit on service file installation or something, you could

Re: [systemd-devel] How to set a limit for mounting roofs?

2016-07-08 Thread Lennart Poettering
On Wed, 06.07.16 12:36, Andrei Borzenkov ([email protected]) wrote: > > I figure it would be OK to merge a patch that makes the udev rules > > above set SYSTEMD_READY immediately if the device popped up in case > > some new kernel command line option is set. > > That won't work. This will make

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Lennart Poettering
On Fri, 08.07.16 18:17, Michał Zegan ([email protected]) wrote: > well, that makes sense, thanks. about a timer section shortcut, could it > be done in a different way? like, it is a shortcut and systemd should > somehow generate the corresponding timer file automatically? although > stil

Re: [systemd-devel] *argh* Re: systemd-devel Digest, Vol 75, Issue 19

2016-07-08 Thread Clemens Gruber
On Fri, Jul 08, 2016 at 06:51:13PM +0300, Mantas Mikulėnas wrote: > On Fri, Jul 8, 2016 at 6:23 PM, Reindl Harald > wrote: > > > > There can be many instances of a application without being related in > > > any way (parent and children) so niceness won't be inherited > > > > that is nonsense - ni

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread One Infinite Loop
As I said before, I don't want to replace .service+.timer combination. I just think there are cases when .service file (containing, for example, ExecStart followed by many ExecStartPost) can have a [Crontab] section with .timer syntax. The two formats (service+timer and [Crontab] inside a service f

Re: [systemd-devel] *argh* Re: systemd-devel Digest, Vol 75, Issue 19

2016-07-08 Thread Reindl Harald
Am 08.07.2016 um 17:51 schrieb Mantas Mikulėnas: On Fri, Jul 8, 2016 at 6:23 PM, Reindl Harald mailto:[email protected]>> wrote: > There can be many instances of a application without being related in > any way (parent and children) so niceness won't be inherited that is nons

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Michał Zegan
well, that makes sense, thanks. about a timer section shortcut, could it be done in a different way? like, it is a shortcut and systemd should somehow generate the corresponding timer file automatically? although still it would need a little special logic when loading the service first. W dniu 08.

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Lennart Poettering
On Fri, 08.07.16 15:44, Reindl Harald ([email protected]) wrote: > >I don't know how to quote and how to reply because it's my first time > >when I use a mailing list > > DAMNED: > it has nothing to do with mailing lists and when you don't know what quoting > means, even not when compare the

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Lennart Poettering
On Fri, 08.07.16 16:35, One Infinite Loop ([email protected]) wrote: > A few usecases: > 1) I want to delete specific files once a day For this you probably should be using tmpfiles' "aging" logic, and not define your own timer. > 2)I want to free RAM using sync command and `echo 3 > > /proc/sys/

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Lennart Poettering
On Fri, 08.07.16 15:42, Michał Zegan ([email protected]) wrote: > One thing to say: I heard, at least once, that systemd's timer are more > complicated because in order to make a timer you need two files instead > of creating one, especially in comparison to cron where you need just > one

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Lennart Poettering
On Fri, 08.07.16 19:00, One Infinite Loop ([email protected]) wrote: > No, I understand perfectly why 2 files are needed. All I am saying is that, > in some cases, a section like [Crontab] in a .service file (where you set a > few commands to run every 15 seconds) would be very useful. Well, but t

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread One Infinite Loop
No, I understand perfectly why 2 files are needed. All I am saying is that, in some cases, a section like [Crontab] in a .service file (where you set a few commands to run every 15 seconds) would be very useful. On Fri, Jul 8, 2016 at 6:54 PM, Lennart Poettering wrote: > On Fri, 08.07.16 16:03,

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Lennart Poettering
On Fri, 08.07.16 16:03, One Infinite Loop ([email protected]) wrote: > If you want to disable timer alone or do something else, then you could use > .timer file. If not, instead of [Install] section in .service file, you​ > could have a [Timer] section. The reason timer definitions and service de

Re: [systemd-devel] *argh* Re: systemd-devel Digest, Vol 75, Issue 19

2016-07-08 Thread Mantas Mikulėnas
On Fri, Jul 8, 2016 at 6:23 PM, Reindl Harald wrote: > > There can be many instances of a application without being related in > > any way (parent and children) so niceness won't be inherited > > that is nonsense - niceness *is* inherited > > BTW: > wow - and after you recently found the answer-b

[systemd-devel] *argh* Re: systemd-devel Digest, Vol 75, Issue 19

2016-07-08 Thread Reindl Harald
> There can be many instances of a application without being related in > any way (parent and children) so niceness won't be inherited that is nonsense - niceness *is* inherited BTW: wow - and after you recently found the answer-button you start to reply to digest-mails without a sensible subje

Re: [systemd-devel] systemd-devel Digest, Vol 75, Issue 19

2016-07-08 Thread One Infinite Loop
s and *guess* to which person you replied at all when > there where more then one response since your last mail? > > -- next part -- > A non-text attachment was scrubbed... > Name: signature.asc > Type: application/pgp-signature > Size: 181 bytes > Desc:

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Reindl Harald
Am 08.07.2016 um 16:21 schrieb One Infinite Loop: I want like my browser processes, for example, to run at a nice value of -15. That's why I want to run '/usr/bin/zsh -c '/usr/bin/renice -15 -p $(/usr/bin/pgrep -f /opt/google/chrome/chrome)'` every 15 seconds, for example well, nice -15 means

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread One Infinite Loop
I want crontab gone and I want to delete specific files once a day and 6 minutes after I opened my computer. My Ubuntu 16.04 runs just fine, thanks for your concern. I want like my browser processes, for example, to run at a nice value of -15. That's why I want to run '/usr/bin/zsh -c '/usr/bin/r

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Tomasz Torcz
Could you please stop breaking threads? Every reply you send starts a new thread, while they all belong to one mail thread. -- Tomasz Torcz"Funeral in the morning, IDE hacking xmpp: [email protected] the afternoon and evening." - Alan Cox

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Mantas Mikulėnas
On Fri, Jul 8, 2016 at 4:35 PM, One Infinite Loop <[email protected]> wrote: > A few usecases: > 1) I want to delete specific files once a day > The existing cronjobs and .timer units work well enough for that. Also, systemd even ships with a predefined daily systemd-tmpfiles-clean.timer, see the

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Michał Zegan
One thing to say: I heard, at least once, that systemd's timer are more complicated because in order to make a timer you need two files instead of creating one, especially in comparison to cron where you need just one line although I always forget the order of fields. I would say a timer section in

[systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread One Infinite Loop
OK, I have a new idea: let's not call the section [Timer] but [Crontab]. Of course, the manual page will explain what is its purpose. I expect feedback. ___ systemd-devel mailing list [email protected] https://lists.freedesktop.org/mail

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Reindl Harald
Am 08.07.2016 um 15:35 schrieb One Infinite Loop: A few usecases: 1) I want to delete specific files once a day what is the problem? 2)I want to free RAM using sync command and `echo 3 > /proc/sys/vm/drop_caches` every 15 seconds besides it's stupid - what is the problem? 3)I want to ma

[systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread One Infinite Loop
A few usecases: 1) I want to delete specific files once a day 2)I want to free RAM using sync command and `echo 3 > /proc/sys/vm/drop_caches` every 15 seconds 3)I want to make sure certain processes always run using a specific nice value like -15. I know control groups are invented but it's not the

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Reindl Harald
AGAIN: learn to write readable communication * quote waht you refer to * get rid of html Am 08.07.2016 um 15:21 schrieb One Infinite Loop: Why would you create another one? Why are there always people who try to complicate things? you try to complicate things since you bring a *third* place b

[systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread One Infinite Loop
Why would you create another one? Why are there always people who try to complicate things? The same way you read and edit your sudoers files, your fstab file, you will read & edit the .service file that your distro is shipping to you. Let's not forget about the manual page that will document the c

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Reindl Harald
Am 08.07.2016 um 15:11 schrieb One Infinite Loop: There are cases when you don't need .timer files but only a [Timer] section. With a well written manual page, systemd users will understand why is useful to have a [Timer] section inside a .service file FIRST: learn to quote in email second:

[systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread One Infinite Loop
There are cases when you don't need .timer files but only a [Timer] section. With a well written manual page, systemd users will understand why is useful to have a [Timer] section inside a .service file. ___ systemd-devel mailing list systemd-devel@lists.

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Reindl Harald
Am 08.07.2016 um 15:03 schrieb One Infinite Loop: If you want to disable timer alone or do something else, then you could use .timer file. If not, instead of [Install] section in .service file, you​ could have a [Timer] section so and when the distribution package ships one of them and you c

[systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread One Infinite Loop
If you want to disable timer alone or do something else, then you could use .timer file. If not, instead of [Install] section in .service file, you​ could have a [Timer] section. ___ systemd-devel mailing list [email protected] https://

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Reindl Harald
Am 08.07.2016 um 07:35 schrieb One Infinite Loop: systemctl start foo.service systemctl enable foo.service would enabled timer *and* service how would you disable the timer alone? how do you imagine that to work with Type=forking or Type=simple sorry that is a sonsense idea because it offers