Enable core dumps
This commit is contained in:
parent
aa3d98324d
commit
cdf034cd9f
1 changed files with 16 additions and 0 deletions
|
|
@ -104,6 +104,22 @@
|
||||||
|
|
||||||
(%guix-data-service-metrics-registry registry)
|
(%guix-data-service-metrics-registry registry)
|
||||||
|
|
||||||
|
(with-exception-handler
|
||||||
|
(lambda (exn)
|
||||||
|
(simple-format #t "failed enabling core dumps: ~A\n" exn))
|
||||||
|
(lambda ()
|
||||||
|
(setrlimit 'core #f #f))
|
||||||
|
#:unwind? #t)
|
||||||
|
|
||||||
|
(let ((core-file
|
||||||
|
(string-append (getcwd) "/core"))
|
||||||
|
(metric
|
||||||
|
(make-gauge-metric registry
|
||||||
|
"core_dump_file_last_modified_seconds")))
|
||||||
|
(when (file-exists? core-file)
|
||||||
|
(metric-set metric
|
||||||
|
(stat:mtime (stat core-file)))))
|
||||||
|
|
||||||
(with-exception-handler
|
(with-exception-handler
|
||||||
(lambda (exn)
|
(lambda (exn)
|
||||||
(simple-format #t "failed increasing open file limit: ~A\n" exn))
|
(simple-format #t "failed increasing open file limit: ~A\n" exn))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue