Code Monkey home page Code Monkey logo

synology_cleanup_coredumps's Introduction

Synology Cleanup Coredumps

Donate committers.top badge

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

You run the script in a shell with sudo -s or as root.

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.

sudo -s /volume1/scripts/syno_clean_coredumps.sh -a 7
sudo -s /volume1/scripts/syno_clean_coredumps.sh --age 7

Note: Replace /volume1/scripts/ with the path to where the script is located.

synology_cleanup_coredumps's People

Contributors

007revad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

zakucr

synology_cleanup_coredumps's Issues

Improve instructions

Nice project, but I have an improvement. Because you recommend to download the file and put it on your NAS, and if someone were to use Task Scheduler, you'd have to manually update. Instead, you could do this:
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.