public
Last active

Clean Java hsperfdata files

  • Download Gist
clean-hsperfdata.sh
Shell
1 2 3 4 5 6 7 8 9
#!/bin/sh
# Looks for /tmp/hsperfdata_* files leaved by unclean Java processes
# shutdowns and remove them.
# This should be executed by a user without sufficient rights to delete
# other users files...
 
for hsperfdata in /tmp/hsperfdata_*/*; do
ps -p `basename ${hsperfdata}` &> /dev/null || rm -vf $hsperfdata
done

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.