You are not logged in.
Pages: 1
Topic closed
I would like to tell systemd to put core dumps in current working directory, not in /var/lib/systemd/coredump as is happening by default.
The Storage line in /etc/systemd/coredump.conf looks promising. man 5 coredump.conf gives me this:
Storage=
Controls where to store cores. One of "none", "external",
"journal", and "both". When "none", the coredumps will be logged
but not stored permanently. When "external" (the default), cores
will be stored in /var/lib/systemd/coredump. When "journal", cores
will be stored in the journal and rotated following normal journal
rotation patterns. When "both", cores will be stored in both
locations.I guess what I need is the default external setting, but with a directive somewhere else to specify that $pwd should be the storage location, not /var/lib/systemd/coredump. I checked the wiki (Core dump) but no luck there.
Please, how do I change the core dump storage location from /var/lib/systemd/coredump to the current directory?
Offline
why not just create a symbolic link?
ln -s /var/lib/systemd/coredump /path/to/directoryLast edited by ponyrider (2014-11-25 03:51:12)
Offline
why not just create a symbolic link?
ln -s /var/lib/systemd/coredump /path/to/directory
That location could change very often.
bdantas, remember you have to have write permissions for the directory.
Offline
The location is variable so the symlink idea won't work, unfortunately.
karol: yes, I'd have write permissions for all the directories I'd be working in.
EDIT: If there is no way to redirect systemd with this, I'd be perfectly happy to use another route (i.e., to turn off systemd's coredump management and use some other utility to create and store coredumps in $pwd).
Last edited by bdantas (2014-11-25 13:11:10)
Offline
It's an old question, but just in case someone is still looking for the answer, dumping core to the current working directory is the default Linux behavior, all one needs to do is to replace the contents of their, likely systemd-installed,
/proc/sys/kernel/core_patternto
core, for example:
$ echo core | sudo tee /proc/sys/kernel/core_pattern.
man [-s 5] coreis useful for understanding the gore details.
kiss dry pola
Offline
Closing this ancient thread.
Offline
Pages: 1
Topic closed