[minicoredumper] Fix some autotools related issues and add coredump rotation

John Ogness john.ogness at linutronix.de
Tue Mar 12 09:57:24 CET 2019


On 2019-03-12, Juergen Borleis <jbe at pengutronix.de> wrote:
>> Over the past few years I have received various requests for tasks
>> like this. However, they all vary to some degree. I was thinking that
>> rather than implementing all kinds of pre-/post-processing features,
>> the minicoredumper should just support calling
>> pre-/post-scripts. Then the rotation feature, for example, could be
>> implemented as a pre-script.
>>
>> Until now my advice for people has always been to write a wrapper
>> script that does what they want, then exec's minicoredumper. But if
>> minicoredumper actually had a pre-/post-script feature, then the
>> scripts could be recept-based (so that different scripts are called
>> depending on what crashed).
>>
>> What are your thoughts on this? Do you agree that a pre-/post-script
>> feature would be better than implementing things like rotation?
>
> Hmm, the implementation in C is simple and small and IMHO thus follows
> the leading intentional "mini" in the "minicoredumper" name.  But
> sure, my rotate feature doesn't cover all use cases we can imagine.
>
> On the other hand, adding script support adds more and more run-time
> dependencies to this small and powerful tool. If a system is under
> some pressure the smaller this tool is and the less dependencies it
> has, the more successfully it can work.

Adding script support does not add runtime dependencies. The
dependencies come from the scripts that the users/administrators choose.

Also, if the script feature did exist, certain existing features could
be removed. For example, I really do not like the "write_proc_info"
feature. This is something that could be better implemented as a script.

> Maybe both features - script based pre/post handling for big machines
> and 'simple rotation' for small machines - would be useful. And one
> can select one out of these two features at compile time?

Removing features later (such as the "write_proc_info" feature I'd like
to remove) is more difficult. Although this is a relatively small
feature, I wonder if it is really needed.

I will do some testing with a pre-/post-script feature. (This feature is
needed regardless.) Once I have this feature I will implement your
rotation feature as a script and post it to this thread. I think once we
have a working example to compare, we can decide if a script-version is
acceptable.

John Ogness



More information about the minicoredumper mailing list