Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/007revad/synology_cleanup_coredumps
Cleanup memory core dumps from crashed processes
https://github.com/007revad/synology_cleanup_coredumps
diskstation dsm rackstation synology synology-disk-station synology-dsm synology-nas
Last synced: 4 months ago
JSON representation
Cleanup memory core dumps from crashed processes
- Host: GitHub
- URL: https://github.com/007revad/synology_cleanup_coredumps
- Owner: 007revad
- License: mit
- Created: 2023-07-29T04:25:44.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-12T11:46:20.000Z (9 months ago)
- Last Synced: 2024-05-20T20:39:51.680Z (9 months ago)
- Topics: diskstation, dsm, rackstation, synology, synology-disk-station, synology-dsm, synology-nas
- Language: Shell
- Homepage:
- Size: 186 KB
- Stars: 11
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Synology Cleanup Coredumps
![]()
![]()
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/paypalme/007revad)
[![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/007revad)
[![committers.top badge](https://user-badge.committers.top/australia/007revad.svg)](https://user-badge.committers.top/australia/007revad)### Description
Cleanup memory core dumps from crashed processes
Whenever a process crashes or restarts unexpectedly DSM creates a memory dump of the memory the process was using for debugging. Unless you intend debugging why the process crashed you don't need to keep them.
If you schedule the script to run in Task Scheduler with **Send run details by email** and **Send run details only when the script terminates abnormally** task scheduler will send you an email whenever the script deletes core dump files.
I found 92 coredump files (300MB), dating back to 2021 and DSM 6, on volume 1 of my Synology
Output of the script
### Download the script
1. Download the latest version _Source code (zip)_ from https://github.com/007revad/Synology_Cleanup_Coredumps/releases
2. Save the download zip file to a folder on the Synology.
3. Unzip the zip file.### Scheduling the script in Synology's Task Scheduler
See How to schedule a script in Synology Task Scheduler
### Running the script via SSH
[How to enable SSH and login to DSM via SSH](https://kb.synology.com/en-global/DSM/tutorial/How_to_login_to_DSM_with_root_permission_via_SSH_Telnet)
You run the script in a shell with sudo -s or as root.
```YAML
sudo -s /volume1/scripts/syno_clean_coredumps.sh
```**Note:** Replace /volume1/scripts/ with the path to where the script is located.
### Options:
The script has an to set the age in days so that only coredumps older than that age are deleted.
You can use -a or --age followed by a space then the number of days.
```YAML
sudo -s /volume1/scripts/syno_clean_coredumps.sh -a 7
``````YAML
sudo -s /volume1/scripts/syno_clean_coredumps.sh --age 7
```**Note:** Replace /volume1/scripts/ with the path to where the script is located.