1

I have AWS ec2 micro instance, suddenly it shows memory full. I have checked the folder using df -hcommand. The result is displayed below.

Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1      7.8G  7.1G  257M  97% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
udev            285M  8.0K  285M   1% /dev
tmpfs            59M  184K   59M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            295M     0  295M   0% /run/shm
none            100M     0  100M   0% /run/user

I have cleared all the temporary folder,log files but still it shows the same size.Why this happening? How to delete the unwanted files? and increase the space?

2
  • Well...are you using all that space? It doesn't look "full" ...and by memory, do you actually mean disk space? Micro instances have a very small RAM allocation.
    – Nathan C
    Apr 23, 2015 at 12:34
  • 3
    Try a du -sh /* to see where the disk space is being used and post up the result.
    – James Yale
    Apr 23, 2015 at 12:36

1 Answer 1

5

On CLI type:

 lsof -nP | grep '(deleted)'

that processes have some reources allocated and u can free them killing them by pid

kill -9 [pid]

after this check your disc usage with:

df -h
2
  • 1
    use sudo before lsof
    – Anders B
    Jul 4, 2017 at 11:26
  • 1
    that seems to work, but never try on production system :P
    – Adiii
    Jul 23, 2019 at 5:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .