I admit that I did not use Cassandra, but from what I can say, it should not dump any hprof files unless you include it at compile time or if the program throws an OutofMemoryException. Try to look there.
in terms of a shell script, if files are dumped to a specific location, you can use this command to delete all * .hprof files.
find /my/location/ -name *.hprof -delete
this uses the -delete
directive from find
, which deletes all files matching the search. Take a look at the man page for more search options if you need to narrow it down more.
You can use cron
to run the script at a given time, which satisfies the βfrom time to timeβ requirement, most Linux distributions have cron installed and work with the crontab
file. You can learn more about crontab using man crontab
source share