[systemd-devel] looking at journal of other users

2016-07-09 Thread Michał Zegan
Hello.

I believe administrators, like groups wheel and adm at least, have
access to read system journal and journals of all users.
journalctl can show the journal of the current user, system journal or
merge both of them. Could you please add the possibility to see the logs
of others, if not already present?



signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2016-07-09 Thread Chris Murphy
On Fri, Jul 8, 2016 at 12:39 PM, Lennart Poettering
 wrote:

> Well, personally I am not convinced that a policy of "automatic time-based
> degrading" is a good default policy, and that a policy of "require
> manual intervention to proceed with degrading" is a better default
> policy.

I think that's true, otherwise it second guesses the default behavior
of Btrfs when a volume's devices aren't all present.

But conversely right now there is no way to proceed with manual intervention.

>
> That all said, I am sure in many setups such an automatic degrading is
> useful too, but I am also sure that any fancier policies like that
> really shouldn't be implemented in systemd, but via some daemon or so
> shipped in btrfs-progs really.

That's being floated on the Btrfs list also. The caveat is this ends
up looking something like LVM's dmeventd or mdadm --monitor daemon.

-- 
Chris Murphy
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2016-07-09 Thread Kai Krakow
Am Fri, 8 Jul 2016 19:34:48 +0300
schrieb One Infinite Loop <6po...@gmail.com>:

> 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 file) can coexist. It's
> just a suggestion.

It won't work that way. Because you need to enable timers. If the timer
is enabled, it will trigger the service by the same name (per default,
this can be configured). That service itself is not enabled - it just
sits there and will be started by the timer.

If you would enable said service, it would run at boot. Combining timer
and service into one file would thus just run the service at boot - I
don't think this is your intention.

If anything makes sense at all, then it would probably be to allow
ExecStart* within timer units - but that would only make sense for
Type=oneshot items - otherwise such a "timer" would fire once and stay
active.

Timer and service are split for good reason. It makes stuff so much
simpler from systemd view and much more flexible from admin view.

PS: Please do not top-post.

> On Fri, Jul 8, 2016 at 7:16 PM, Lennart Poettering
>  wrote:
> 
> > On Fri, 08.07.16 16:35, One Infinite Loop (6po...@gmail.com) 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/vm/drop_caches` every 15 seconds  
> >
> > Uh. Oh. I don't see why anyone would want to do this...
> >  
> > > 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.  
> >
> > Doing this with a service timer appears very strange to me. Simply
> > set "Nice=-15" in the unit file starting your service and the nice
> > level will be properly inherited by all processes of your services.
> >
> > But, in general, you could do all of the above with a combination of
> > .timer and .service file just fine already. These usecases are
> > perfectly covered, the only difference between what you are
> > proposing and what has been implemented is whether it's adding two
> > unit files per item instead of one, which I don't think is too
> > bad...
> >
> > Lennart


-- 
Regards,
Kai

Replies to list-only preferred.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2016-07-09 Thread Michael Biebl
2016-07-08 18:11 GMT+02:00 Lennart Poettering :
> On Fri, 08.07.16 19:00, One Infinite Loop (6po...@gmail.com) 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 that would mean quite a redundancy in our most core file format, 
> and I
> am not a fan of that I must say. After all this way you'd have two
> ways to define a time-triggered service: via a pair of timer+service
> unit file, or via a service file with embedded timer section...

To be fair, there is some precedent here with tmpfiles and RuntimeDirectory.


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2016-07-09 Thread Mikhail Kasimov

Seems, AccuracySec=1us parameter resolves this problem indeed:
=
Июл 09 10:55:30 linux-mk500 systemd[1]: Started VBA32 Anti-Virus Update 
Service.
Июл 09 11:00:30 linux-mk500 systemd[1]: Starting VBA32 Anti-Virus Update 
Service...


Июл 09 11:00:32 linux-mk500 systemd[1]: Started VBA32 Anti-Virus Update 
Service.
Июл 09 11:05:32 linux-mk500 systemd[1]: Starting VBA32 Anti-Virus Update 
Service...


Июл 09 11:05:35 linux-mk500 systemd[1]: Started VBA32 Anti-Virus Update 
Service.
Июл 09 11:10:35 linux-mk500 systemd[1]: Starting VBA32 Anti-Virus Update 
Service...

=

Haven't read about AccuracySec parameter in man-page carefully. :(

Resolved. Thank you again!

09.07.2016 08:23, 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.service in 1 hour after previous update-session is
over (OnUnitInactiveSec=1h).

 From man-page: "|OnUnitInactiveSec=| defines a timer relative to when
the unit the timer is activating was last deactivated."

Ok, here is log-snippet:
==
Июл 08 22:05:00 linux-mk500 systemd[1]: Starting VBA32 Anti-Virus Update
Service...
Июл 08 22:05:00 linux-mk500 vbacl[14768]: Vba32 console scanner update
process started
Июл 08 22:05:00 linux-mk500 vbacl[14768]: Reading configuration options
from ./vbacl.ini
Июл 08 22:05:00 linux-mk500 vbacl[14768]: Using direct connection for
update
Июл 08 22:05:02 linux-mk500 vbacl[14768]: Current dir is ./
Июл 08 22:05:02 linux-mk500 vbacl[14768]: Start update from
http://anti-virus.by/update
Июл 08 22:05:02 linux-mk500 vbacl[14768]: Receiving file list
Июл 08 22:05:02 linux-mk500 vbacl[14768]: File list received
Июл 08 22:05:02 linux-mk500 vbacl[14768]: Update is not needed
Июл 08 22:05:02 linux-mk500 systemd[1]: Started VBA32 Anti-Virus Update
Service.


...


We see 22:05:02 (end of update-session) --> 23:05:13 (start of next
update-session) --> 23:05:17 (end of update-session) --> 00:05:20 (start
of next update-session) --> 00:05:24 (end of update-session) -->
01:05:50 (start of next update-session) --> 01:05:55 (end of
update-session).

Question: Why time of new update-session is *not* equal to time of end
of previous update-session + 1h in section of seconds, e.g. 23:05:17 +1h
= 00:05:17; 00:05:24 + 1h = 01:05:24 and so on? Is here a way to reach
this precise coincidence?


Please check with "systemctl status" or "systemctl show" when unit was
actually deactivated. Also see "AccuracySec" timer parameter.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel