<div dir="ltr"><div class="gmail_default" style="font-size:large">​There can be many instances of a application without being related in any way (parent and children) so niceness won't be inherited. I want like all instances of foo to run with a nice value of -15 without using any wrappers. Those .desktop files must be edited every time I install a new version of Chrome. Once I create a timer, using the section [Crontab] (let's forget the old name of [Timer]) from a .service file, no more editing will be needed. But that's just one example.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 8, 2016 at 5:39 PM,  <span dir="ltr"><<a href="mailto:systemd-devel-request@lists.freedesktop.org" target="_blank">systemd-devel-request@lists.freedesktop.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send systemd-devel mailing list submissions to<br>
        <a href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://lists.freedesktop.org/mailman/listinfo/systemd-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:systemd-devel-request@lists.freedesktop.org">systemd-devel-request@lists.freedesktop.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:systemd-devel-owner@lists.freedesktop.org">systemd-devel-owner@lists.freedesktop.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of systemd-devel digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Re:  Adding a Timer section to .service files (Reindl Harald)<br>
   2. Re:  Adding a Timer section to .service files (Michał Zegan)<br>
   3. Re:  Adding a Timer section to .service files (Mantas Mikulėnas)<br>
   4. Re:  Adding a Timer section to .service files (Tomasz Torcz)<br>
   5. Re:  Adding a Timer section to .service files (One Infinite Loop)<br>
   6. Re:  Adding a Timer section to .service files (Reindl Harald)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Fri, 8 Jul 2016 15:44:22 +0200<br>
From: Reindl Harald <<a href="mailto:h.reindl@thelounge.net">h.reindl@thelounge.net</a>><br>
To: <a href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a><br>
Subject: Re: [systemd-devel] Adding a Timer section to .service files<br>
Message-ID: <<a href="mailto:d70c95a9-f8ac-b1bd-cb25-8348d231ea5e@thelounge.net">d70c95a9-f8ac-b1bd-cb25-8348d231ea5e@thelounge.net</a>><br>
Content-Type: text/plain; charset="utf-8"; Format="flowed"<br>
<br>
<br>
<br>
Am 08.07.2016 um 15:35 schrieb One Infinite Loop:<br>
> A few usecases:<br>
> 1) I want to delete specific files once a day<br>
<br>
what is the problem?<br>
<br>
> 2)I want to free RAM using sync command and `echo 3 ><br>
> /proc/sys/vm/drop_caches` every 15 seconds<br>
<br>
besides it's stupid - what is the problem?<br>
<br>
> 3)I want to make sure certain processes always run using a specific nice<br>
> value like -15. I know control groups are invented but it's not the same<br>
> thing.<br>
<br>
what is the problem<br>
<br>
> I know crontab was invented too but I wanna learn only one syntax:<br>
> systemd syntax.<br>
<br>
how does that change the fact that it would be broken by design to have<br>
a timer-section which is implicit active while the unit is disabled<br>
which is the reason you have both and why don't you just learn it?<br>
<br>
> I don't know how to quote and how to reply because it's my first time<br>
> when I use a mailing list<br>
<br>
DAMNED:<br>
it has nothing to do with mailing lists and when you don't know what<br>
quoting means, even not when compare the mails of others and yours which<br>
are only contain your response but no part of the previous communication<br>
go and make your homework first by learn to use your mailclient since<br>
that is even worser than top-posting with full-quotes<br>
<br>
*you really* believe somebody is interested enough that he seeks for<br>
your previous mails and *guess* to which person you replied at all when<br>
there where more then one response since your last mail?<br>
<br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: signature.asc<br>
Type: application/pgp-signature<br>
Size: 181 bytes<br>
Desc: OpenPGP digital signature<br>
URL: <<a href="https://lists.freedesktop.org/archives/systemd-devel/attachments/20160708/cef8d2df/attachment-0001.sig" rel="noreferrer" target="_blank">https://lists.freedesktop.org/archives/systemd-devel/attachments/20160708/cef8d2df/attachment-0001.sig</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Fri, 8 Jul 2016 15:42:45 +0200<br>
From: Michał Zegan <<a href="mailto:webczat_200@poczta.onet.pl">webczat_200@poczta.onet.pl</a>><br>
To: <a href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a><br>
Subject: Re: [systemd-devel] Adding a Timer section to .service files<br>
Message-ID: <<a href="mailto:24622666-ad6f-3e16-1d4d-4e4e0a708dd2@poczta.onet.pl">24622666-ad6f-3e16-1d4d-4e4e0a708dd2@poczta.onet.pl</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
One thing to say: I heard, at least once, that systemd's timer are more<br>
complicated because in order to make a timer you need two files instead<br>
of creating one, especially in comparison to cron where you need just<br>
one line although I always forget the order of fields. I would say a<br>
timer section in the service file could be a nice shortcut to create<br>
timers for services quickly.<br>
<br>
W dniu 08.07.2016 o 15:14, Reindl Harald pisze:<br>
><br>
><br>
> Am 08.07.2016 um 15:11 schrieb One Infinite Loop:<br>
>> There are cases when you don't need .timer files but only a [Timer]<br>
>> section. With a well written manual page, systemd users will understand<br>
>> why is useful to have a [Timer] section inside a .service file<br>
><br>
> FIRST: learn to quote in email<br>
><br>
> second: you need to explain the usecases very well<br>
> third: a good design don't require read manpages all the time<br>
><br>
><br>
><br>
> _______________________________________________<br>
> systemd-devel mailing list<br>
> <a href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/systemd-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
><br>
<br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: signature.asc<br>
Type: application/pgp-signature<br>
Size: 510 bytes<br>
Desc: OpenPGP digital signature<br>
URL: <<a href="https://lists.freedesktop.org/archives/systemd-devel/attachments/20160708/3bbdd3fc/attachment-0001.sig" rel="noreferrer" target="_blank">https://lists.freedesktop.org/archives/systemd-devel/attachments/20160708/3bbdd3fc/attachment-0001.sig</a>><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Fri, 8 Jul 2016 17:06:54 +0300<br>
From: Mantas Mikulėnas <<a href="mailto:grawity@gmail.com">grawity@gmail.com</a>><br>
To: One Infinite Loop <<a href="mailto:6pozmo@gmail.com">6pozmo@gmail.com</a>><br>
Cc: Systemd <<a href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a>><br>
Subject: Re: [systemd-devel] Adding a Timer section to .service files<br>
Message-ID:<br>
        <CAPWNY8WXu6khfo4gkRqJ2gz2-rd2Vqm7tacqFMeuXMrXWA3S=<a href="mailto:A@mail.gmail.com">A@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
On Fri, Jul 8, 2016 at 4:35 PM, One Infinite Loop <<a href="mailto:6pozmo@gmail.com">6pozmo@gmail.com</a>> wrote:<br>
<br>
> A few usecases:<br>
> 1) I want to delete specific files once a day<br>
><br>
<br>
The existing cronjobs and .timer units work well enough for that. Also,<br>
systemd even ships with a predefined daily systemd-tmpfiles-clean.timer,<br>
see the "r" and "R" types in `man tmpfiles.d`.<br>
<br>
<br>
> 2)I want to free RAM using sync command and `echo 3 ><br>
> /proc/sys/vm/drop_caches` every 15 seconds<br>
><br>
<br>
Why would you do that? There are better ways to make a computer slower.<br>
<br>
<br>
> 3)I want to make sure certain processes always run using a specific nice<br>
> value like -15. I know control groups are invented but it's not the same<br>
> thing.<br>
><br>
<br>
That's a service option. It's not related to timers.<br>
<br>
I don't know how to quote and how to reply because it's my first time when<br>
> I use a mailing list.<br>
><br>
<br>
Surely not the first time using Gmail though. Press 'a' or click "Reply to<br>
all".<br>
<br>
--<br>
Mantas Mikulėnas <<a href="mailto:grawity@gmail.com">grawity@gmail.com</a>><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://lists.freedesktop.org/archives/systemd-devel/attachments/20160708/7cb225ce/attachment-0001.html" rel="noreferrer" target="_blank">https://lists.freedesktop.org/archives/systemd-devel/attachments/20160708/7cb225ce/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Fri, 8 Jul 2016 16:12:19 +0200<br>
From: Tomasz Torcz <<a href="mailto:tomek@pipebreaker.pl">tomek@pipebreaker.pl</a>><br>
To: <a href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a><br>
Subject: Re: [systemd-devel] Adding a Timer section to .service files<br>
Message-ID: <<a href="mailto:20160708141218.GA558963@mother.pipebreaker.pl">20160708141218.GA558963@mother.pipebreaker.pl</a>><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
<br>
<br>
  Could you please stop breaking threads?  Every reply you send starts<br>
a new thread, while they all belong to one mail thread.<br>
<br>
--<br>
Tomasz Torcz                "Funeral in the morning, IDE hacking<br>
xmpp: <a href="mailto:zdzichubg@chrome.pl">zdzichubg@chrome.pl</a>    in the afternoon and evening." - Alan Cox<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Fri, 8 Jul 2016 17:21:37 +0300<br>
From: One Infinite Loop <<a href="mailto:6pozmo@gmail.com">6pozmo@gmail.com</a>><br>
To: Mantas Mikulėnas <<a href="mailto:grawity@gmail.com">grawity@gmail.com</a>><br>
Cc: Systemd <<a href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a>><br>
Subject: Re: [systemd-devel] Adding a Timer section to .service files<br>
Message-ID:<br>
        <CALGQnGDG5i_Fr9PqPBNxwdJ3YtRWsf=<a href="mailto:fM2HjoB4qGe_io3AUTw@mail.gmail.com">fM2HjoB4qGe_io3AUTw@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
I want crontab gone and I want to delete specific files once a day and 6<br>
minutes after I opened my computer.<br>
<br>
My Ubuntu 16.04 runs just fine, thanks for your concern.<br>
<br>
I want like my browser processes, for example, to run at a nice value of<br>
-15. That's why I want to run '/usr/bin/zsh -c '/usr/bin/renice -15 -p<br>
$(/usr/bin/pgrep -f /opt/google/chrome/chrome)'` every 15 seconds, for<br>
example.<br>
<br>
On Fri, Jul 8, 2016 at 5:06 PM, Mantas Mikulėnas <<a href="mailto:grawity@gmail.com">grawity@gmail.com</a>> wrote:<br>
<br>
> On Fri, Jul 8, 2016 at 4:35 PM, One Infinite Loop <<a href="mailto:6pozmo@gmail.com">6pozmo@gmail.com</a>><br>
> wrote:<br>
><br>
>> A few usecases:<br>
>> 1) I want to delete specific files once a day<br>
>><br>
><br>
> The existing cronjobs and .timer units work well enough for that. Also,<br>
> systemd even ships with a predefined daily systemd-tmpfiles-clean.timer,<br>
> see the "r" and "R" types in `man tmpfiles.d`.<br>
><br>
><br>
>> 2)I want to free RAM using sync command and `echo 3 ><br>
>> /proc/sys/vm/drop_caches` every 15 seconds<br>
>><br>
><br>
> Why would you do that? There are better ways to make a computer slower.<br>
><br>
><br>
>> 3)I want to make sure certain processes always run using a specific nice<br>
>> value like -15. I know control groups are invented but it's not the same<br>
>> thing.<br>
>><br>
><br>
> That's a service option. It's not related to timers.<br>
><br>
> I don't know how to quote and how to reply because it's my first time when<br>
>> I use a mailing list.<br>
>><br>
><br>
> Surely not the first time using Gmail though. Press 'a' or click "Reply to<br>
> all".<br>
><br>
> --<br>
> Mantas Mikulėnas <<a href="mailto:grawity@gmail.com">grawity@gmail.com</a>><br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://lists.freedesktop.org/archives/systemd-devel/attachments/20160708/b197e66d/attachment-0001.html" rel="noreferrer" target="_blank">https://lists.freedesktop.org/archives/systemd-devel/attachments/20160708/b197e66d/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 6<br>
Date: Fri, 8 Jul 2016 16:39:32 +0200<br>
From: Reindl Harald <<a href="mailto:h.reindl@thelounge.net">h.reindl@thelounge.net</a>><br>
To: <a href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a><br>
Subject: Re: [systemd-devel] Adding a Timer section to .service files<br>
Message-ID: <<a href="mailto:a10462e0-2353-9be1-bab9-764aa4c1802f@thelounge.net">a10462e0-2353-9be1-bab9-764aa4c1802f@thelounge.net</a>><br>
Content-Type: text/plain; charset="utf-8"; Format="flowed"<br>
<br>
<br>
Am 08.07.2016 um 16:21 schrieb One Infinite Loop:<br>
> I want like my browser processes, for example, to run at a nice value of<br>
> -15. That's why I want to run '/usr/bin/zsh -c '/usr/bin/renice -15 -p<br>
> $(/usr/bin/pgrep -f /opt/google/chrome/chrome)'` every 15 seconds, for<br>
> example<br>
<br>
well, nice -15 means nearly real time and is for a browser similar<br>
*censored* than `echo 3 > /proc/sys/vm/drop_caches` every 15 minutes<br>
because under load combined with a hanging javascript your computer will<br>
no longer respond to anything<br>
<br>
for a real usecase not allowing your browser to eat all ressources when<br>
you visit a buggy website "nice -n 15" in the .desktop file which starts<br>
your browser would be the way to go<br>
<br>
think about a better example - don't get me wrong but that and "i don't<br>
know how to reply" togehter don't qualify you for any technical proposal<br>
<br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: signature.asc<br>
Type: application/pgp-signature<br>
Size: 181 bytes<br>
Desc: OpenPGP digital signature<br>
URL: <<a href="https://lists.freedesktop.org/archives/systemd-devel/attachments/20160708/2481e76c/attachment.sig" rel="noreferrer" target="_blank">https://lists.freedesktop.org/archives/systemd-devel/attachments/20160708/2481e76c/attachment.sig</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
systemd-devel mailing list<br>
<a href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/systemd-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
<br>
<br>
------------------------------<br>
<br>
End of systemd-devel Digest, Vol 75, Issue 19<br>
*********************************************<br>
</blockquote></div><br></div>