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

One Infinite Loop 6pozmo at gmail.com
Fri Jul 8 15:19:11 UTC 2016


​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.

On Fri, Jul 8, 2016 at 5:39 PM, <systemd-devel-request at lists.freedesktop.org
> wrote:

> Send systemd-devel mailing list submissions to
>         systemd-devel at lists.freedesktop.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://lists.freedesktop.org/mailman/listinfo/systemd-devel
> or, via email, send a message with subject or body 'help' to
>         systemd-devel-request at lists.freedesktop.org
>
> You can reach the person managing the list at
>         systemd-devel-owner at lists.freedesktop.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of systemd-devel digest..."
>
>
> Today's Topics:
>
>    1. Re:  Adding a Timer section to .service files (Reindl Harald)
>    2. Re:  Adding a Timer section to .service files (Michał Zegan)
>    3. Re:  Adding a Timer section to .service files (Mantas Mikulėnas)
>    4. Re:  Adding a Timer section to .service files (Tomasz Torcz)
>    5. Re:  Adding a Timer section to .service files (One Infinite Loop)
>    6. Re:  Adding a Timer section to .service files (Reindl Harald)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 8 Jul 2016 15:44:22 +0200
> From: Reindl Harald <h.reindl at thelounge.net>
> To: systemd-devel at lists.freedesktop.org
> Subject: Re: [systemd-devel] Adding a Timer section to .service files
> Message-ID: <d70c95a9-f8ac-b1bd-cb25-8348d231ea5e at thelounge.net>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
>
>
> 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 make sure certain processes always run using a specific nice
> > value like -15. I know control groups are invented but it's not the same
> > thing.
>
> what is the problem
>
> > I know crontab was invented too but I wanna learn only one syntax:
> > systemd syntax.
>
> how does that change the fact that it would be broken by design to have
> a timer-section which is implicit active while the unit is disabled
> which is the reason you have both and why don't you just learn it?
>
> > 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 mails of others and yours which
> are only contain your response but no part of the previous communication
> go and make your homework first by learn to use your mailclient since
> that is even worser than top-posting with full-quotes
>
> *you really* believe somebody is interested enough that he seeks for
> your previous mails 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: OpenPGP digital signature
> URL: <
> https://lists.freedesktop.org/archives/systemd-devel/attachments/20160708/cef8d2df/attachment-0001.sig
> >
>
> ------------------------------
>
> Message: 2
> Date: Fri, 8 Jul 2016 15:42:45 +0200
> From: Michał Zegan <webczat_200 at poczta.onet.pl>
> To: systemd-devel at lists.freedesktop.org
> Subject: Re: [systemd-devel] Adding a Timer section to .service files
> Message-ID: <24622666-ad6f-3e16-1d4d-4e4e0a708dd2 at poczta.onet.pl>
> Content-Type: text/plain; charset="utf-8"
>
> 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 the service file could be a nice shortcut to create
> timers for services quickly.
>
> W dniu 08.07.2016 o 15:14, Reindl Harald pisze:
> >
> >
> > 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: you need to explain the usecases very well
> > third: a good design don't require read manpages all the time
> >
> >
> >
> > _______________________________________________
> > systemd-devel mailing list
> > systemd-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/systemd-devel
> >
>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: signature.asc
> Type: application/pgp-signature
> Size: 510 bytes
> Desc: OpenPGP digital signature
> URL: <
> https://lists.freedesktop.org/archives/systemd-devel/attachments/20160708/3bbdd3fc/attachment-0001.sig
> >
>
> ------------------------------
>
> Message: 3
> Date: Fri, 8 Jul 2016 17:06:54 +0300
> From: Mantas Mikulėnas <grawity at gmail.com>
> To: One Infinite Loop <6pozmo at gmail.com>
> Cc: Systemd <systemd-devel at lists.freedesktop.org>
> Subject: Re: [systemd-devel] Adding a Timer section to .service files
> Message-ID:
>         <CAPWNY8WXu6khfo4gkRqJ2gz2-rd2Vqm7tacqFMeuXMrXWA3S=
> A at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> On Fri, Jul 8, 2016 at 4:35 PM, One Infinite Loop <6pozmo at gmail.com>
> 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 "r" and "R" types in `man tmpfiles.d`.
>
>
> > 2)I want to free RAM using sync command and `echo 3 >
> > /proc/sys/vm/drop_caches` every 15 seconds
> >
>
> Why would you do that? There are better ways to make a computer slower.
>
>
> > 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 same
> > thing.
> >
>
> That's a service option. It's not related to timers.
>
> I don't know how to quote and how to reply because it's my first time when
> > I use a mailing list.
> >
>
> Surely not the first time using Gmail though. Press 'a' or click "Reply to
> all".
>
> --
> Mantas Mikulėnas <grawity at gmail.com>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> https://lists.freedesktop.org/archives/systemd-devel/attachments/20160708/7cb225ce/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 4
> Date: Fri, 8 Jul 2016 16:12:19 +0200
> From: Tomasz Torcz <tomek at pipebreaker.pl>
> To: systemd-devel at lists.freedesktop.org
> Subject: Re: [systemd-devel] Adding a Timer section to .service files
> Message-ID: <20160708141218.GA558963 at mother.pipebreaker.pl>
> Content-Type: text/plain; charset=us-ascii
>
>
>
>   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: zdzichubg at chrome.pl    in the afternoon and evening." - Alan Cox
>
>
>
> ------------------------------
>
> Message: 5
> Date: Fri, 8 Jul 2016 17:21:37 +0300
> From: One Infinite Loop <6pozmo at gmail.com>
> To: Mantas Mikulėnas <grawity at gmail.com>
> Cc: Systemd <systemd-devel at lists.freedesktop.org>
> Subject: Re: [systemd-devel] Adding a Timer section to .service files
> Message-ID:
>         <CALGQnGDG5i_Fr9PqPBNxwdJ3YtRWsf=
> fM2HjoB4qGe_io3AUTw at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> 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/renice -15 -p
> $(/usr/bin/pgrep -f /opt/google/chrome/chrome)'` every 15 seconds, for
> example.
>
> On Fri, Jul 8, 2016 at 5:06 PM, Mantas Mikulėnas <grawity at gmail.com>
> wrote:
>
> > On Fri, Jul 8, 2016 at 4:35 PM, One Infinite Loop <6pozmo at gmail.com>
> > 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 "r" and "R" types in `man tmpfiles.d`.
> >
> >
> >> 2)I want to free RAM using sync command and `echo 3 >
> >> /proc/sys/vm/drop_caches` every 15 seconds
> >>
> >
> > Why would you do that? There are better ways to make a computer slower.
> >
> >
> >> 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 same
> >> thing.
> >>
> >
> > That's a service option. It's not related to timers.
> >
> > I don't know how to quote and how to reply because it's my first time
> when
> >> I use a mailing list.
> >>
> >
> > Surely not the first time using Gmail though. Press 'a' or click "Reply
> to
> > all".
> >
> > --
> > Mantas Mikulėnas <grawity at gmail.com>
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> https://lists.freedesktop.org/archives/systemd-devel/attachments/20160708/b197e66d/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 6
> Date: Fri, 8 Jul 2016 16:39:32 +0200
> From: Reindl Harald <h.reindl at thelounge.net>
> To: systemd-devel at lists.freedesktop.org
> Subject: Re: [systemd-devel] Adding a Timer section to .service files
> Message-ID: <a10462e0-2353-9be1-bab9-764aa4c1802f at thelounge.net>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
>
> 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 nearly real time and is for a browser similar
> *censored* than `echo 3 > /proc/sys/vm/drop_caches` every 15 minutes
> because under load combined with a hanging javascript your computer will
> no longer respond to anything
>
> for a real usecase not allowing your browser to eat all ressources when
> you visit a buggy website "nice -n 15" in the .desktop file which starts
> your browser would be the way to go
>
> think about a better example - don't get me wrong but that and "i don't
> know how to reply" togehter don't qualify you for any technical proposal
>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: signature.asc
> Type: application/pgp-signature
> Size: 181 bytes
> Desc: OpenPGP digital signature
> URL: <
> https://lists.freedesktop.org/archives/systemd-devel/attachments/20160708/2481e76c/attachment.sig
> >
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
>
> ------------------------------
>
> End of systemd-devel Digest, Vol 75, Issue 19
> *********************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20160708/f487f51b/attachment-0001.html>


More information about the systemd-devel mailing list