NAME
minicoredumper.cfg.json - the main configuration file for minicoredumper(1)DESCRIPTION
minicoredumper.cfg.json is the main configuration file for minicoredumper(1). It serves 2 purposes:-
- 1.
- define where dumped files should be located
- 2.
- specify various minicoredumper(1) recepts for various conditions
FILE FORMAT
The file uses the JSON format. The options are:- base_dir
-
(string) The root directory where the dumped data will be stored.
The dump files will be stored in a sub-directory using the template:
<command_basename>.<timestamp>.<pid> - watch
- (array) A set of conditions, where each condition can specify its own recept file. See CONDITIONS for configuration options for a condition.
CONDITIONS
A condition can contain any combination of these options:- exe
- (string) The full path to the binary being executed as returned by readlink(2).
- comm
- (string) The basename of the command that was run (the 7th argument of the minicoredumper(1) call).
- recept
- (string) The full path to the recept file to use if this condition matches.
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.
NOTES
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.
EXAMPLES
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:
- /tmp/<command_basename>.<timestamp>.<pid>
For example, if there is a symbolic link:
- /usr/bin/example_app -> /opt/my_apps/bin/my_example_app
and the user runs "example_app" and it crashes, the newly created files
could be found here:
- /tmp/example_app.20151103.114054+0100.15143
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:
- /etc/minicoredumper/example.recept.json
The second condition will match if the basename of the command is
"example_app". It will also use the recept file:
- /etc/minicoredumper/example.recept.json
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:
- /etc/minicoredumper/generic.recept.json
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": "*" } ] }
FILES
/etc/minicoredumper/minicoredumper.cfg.jsonSEE ALSO
minicoredumper(1), libminicoredumper(7), minicoredumper.recept.json(5)The DiaMon Workgroup: <http://www.diamon.org>