[systemd-devel] Starting a unit on resume from suspend/hibernate

Dimitrios Apostolou jimis at gmx.net
Fri Apr 3 13:21:51 PDT 2015


On Fri, 3 Apr 2015, Lennart Poettering wrote:

> On Thu, 02.04.15 21:24, Dimitrios Apostolou (jimis at gmx.net) wrote:
>
>>> Usually if one wants to do that one is just working around some
>>> problems that are better solved in a different way.
>>>
>>> Why precisely do you need this feature?
>>
>> I need to properly terminate system accounting, in the same way that it
>> happens when shutting down, so that a relevant record is written. Same when
>> resuming, I need it to be identical to booting the system.
>
> Well, but why? What's the problem with leaving system accounting open
> while the system is hibernated or suspended?

One example is that the utility that plots the data needs to leave blank 
the time of sleep. Without inserted records for stopping and starting the 
accounting process, it would have to incorporate some logic, like "this 
time difference looks too big, don't plot in-between".

It's doable, but it makes sense to be solved at a different level.


Thanks,
Dimitris



More information about the systemd-devel mailing list