On your local computer it could be the Downloads directory, on your web server it could be your main website directory, lets start there. You will normally have a fairly good idea of where files are likely to build up. There are a few ways you can do this, nearly every result in Google shows a slightly different method, this is what I like to do. In the above example we have plenty of space, there is no need for us to go looking for things to remove, but lets assume we were running low on space and wanted to free some up. Great, that is exactly what we want, we can see at a glance the size of the drive, how much we have used and how much we have left. So we can type df -h /dev/xvda1 Filesystem Size Used Avail Use% Mounted on h will turn those numbers into something that is human readible. df has an option that can help us with that. Now we need to do something about those numbers, they are fairly meaningless. This means next time we can run df /dev/xvda1 and just get back the row we care about Filesystem 1K-blocks Used Available Use% Mounted on In our case it is the top disk ( /dev/xvda1) – we can guess this because it is mounted to / and has the most space allocated to it and in use. The first thing is the amount of rows, we normally only have one disk that we care about, by default the df command returns all disks that it can find. ![]() This can look daunting at first, but we can soon tidy that up. To find out how much space you have left we can run the df command.įrom any directory just type df and hit enter, it will quickly return some results and exit Filesystem 1K-blocks Used Available Use% Mounted on ![]() In this short tutorial I am going to show you some quick ways to see how much disk space is left and how to hone in on the biggest offenders. Log files not getting rotated correctly.Backup files not getting rotated correctly.Large assets going unchecked (uploading video files etc.Just like any other computer your web server can get cluttered up and eventually run out of space.Ĭommon reasons this happens on web servers include
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |