Ubuntu – How to clean up dev/sda1 as it’s full

disk-usagememory usage

I've been doing jmeter tests and have had a few OutOfMemoryExceptions, so I've bumped up the heap memory in JMeter. But now it seems I can't run anymore tests as it says I'm using 94.9% of 14Gb.

When I use df -h it says dev/sda1 is full

I was wondering if anyone can help me? I think it has to do with the JVM from the jmeter

Best Answer

Start by tracking down where the excess usage is being stored. If you have no idea, start from the mountpoint for /dev/sda1:

mount | grep sda1

Use the du command. If /dev/sda1 is mounted on / ("root"):

du --max-depth=1 --human-readable / | sort --human-numeric-sort

This will list the first level of directories contained in the specified path, in order from smallest to largest. You can increase the depth past 1 to get details of the subdirectories, or change the path to specify a single directory. You can also use the short flags.

For instance, if your username is ubuntu and you want to inspect your home directory:

du -d1 -h /home/ubuntu | sort -h
Related Question