MINICOREDUMPER.CFG.JSON(5) | minicoredumper | MINICOREDUMPER.CFG.JSON(5) |
minicoredumper.cfg.json - the main configuration file for minicoredumper(1)
minicoredumper.cfg.json is the main configuration file for minicoredumper(1). It serves 2 purposes:
The file uses the JSON format. The options are:
A condition can contain any combination of these options:
Both exe and comm can contain the * character for wildcard matching.
The conditions are checked to find a match in the order specified. The first match will cause the minicoredumper to use the recept for that condition. If no conditions match, the minicoredumper will exit and no core(5) dump will be generated.
If exe and/or comm are not specified for a condition, they will use a default value "*".
If recept is not specified for a condition, the built-in minicoredumper defaults are used.
exe and comm have a "logical AND" relationship. A "logical OR" behavior can be achieved by specifying one condition with only exe and another condition with only comm.
The exact path where data is dumped is logged to syslog(3).
If an 8th argument of minicoredumper(1) is provided, the name and location of this file will depend on that value.
Here is an example configuration file:
{ "base_dir": "/tmp", "watch": [ { "exe": "*/my_example_app", "recept": "/etc/minicoredumper/example.recept.json" }, { "comm": "example_app" "recept": "/etc/minicoredumper/example.recept.json" }, { "exe": "/bin/*" }, { "recept": "/etc/minicoredumper/generic.recept.json" } ] }
In this example, dumped data will be stored in a directory named:
For example, if there is a symbolic link:
and the user runs "example_app" and it crashes, the
newly created files could be found here:
The example above contains 4 conditions that will be checked in order.
The first condition will match if the binary
"*/my_example_app" caused the core dump. It will use the recept
file:
The second condition will match if the basename of the command is
"example_app". It will also use the recept file:
The third condition will match for any binaries under "/bin/*". It will use the built-in minicoredumper(1) defaults.
The fourth condition will match everything. It will use the recept
file:
In the example where the user runs "example_app", the first condition will match since example_app is a symbolic link to /opt/my_apps/bin/my_example_app.
A minimal (yet still useful) configuration file could look like this:
{ "base_dir": "/tmp", "watch": [ { "exe": "*" } ] }
/etc/minicoredumper/minicoredumper.cfg.json
minicoredumper(1), libminicoredumper(7), minicoredumper.recept.json(5)
The DiaMon Workgroup: <http://www.diamon.org>
2016-09-16 | minicoredumper |