Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion Debian/Ubuntu
  • Search

/home/admin/tmp using up too much space/inodes

Debian/Ubuntu related topics
Post Reply
  • Print view
Advanced search
3 posts • Page 1 of 1
prxbl
Posts: 17
Joined: Fri Aug 14, 2015 5:28 pm

/home/admin/tmp using up too much space/inodes
  • Quote

Post by prxbl » Sun Nov 27, 2016 9:41 am

I noticed my Ubuntu 14.04 web server stopped serving pages because it had no more disk space left for caching so i started looking for the issue.

Code: Select all

root@domain:/# df -h
Filesystem                 Size  Used Avail Use% Mounted on
udev                       487M  4.0K  487M   1% /dev
tmpfs                      100M  388K  100M   1% /run
/dev/disk/by-label/DOROOT   30G   21G  7.0G  75% /
none                       4.0K     0  4.0K   0% /sys/fs/cgroup
none                       5.0M     0  5.0M   0% /run/lock
none                       498M     0  498M   0% /run/shm
none                       100M     0  100M   0% /run/user
I seem to have some free space on disk, let's check inodes.

Code: Select all

root@domain:/# df -i
Filesystem                 Inodes   IUsed  IFree IUse% Mounted on
udev                       124520     402 124118    1% /dev
tmpfs                      127234     374 126860    1% /run
/dev/disk/by-label/DOROOT 1966080 1965882    198  100% /
none                       127234       2 127232    1% /sys/fs/cgroup
none                       127234       2 127232    1% /run/lock
none                       127234       1 127233    1% /run/shm
none                       127234       2 127232    1% /run/user
I seem to be using them all so I checked which directory is using the most and I found:

Code: Select all

root@domain:/# find / -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -n
1781695 /home/admin/tmp
Is it okay to just delete everything inside tmp? but before doing that how can I find out what caused the issue to prevent it from happening again?

When I try to list the tmp directory, I'm just seeing a bunch of files called "sess_g0ks0nh06o2h243bjka4b3cvq1" . These look to be session files for my opencart online shop. I've been running the server for about 1 year now, is this normal to happen over time and I need to clear that directory manually?

Thank you
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: /home/admin/tmp using up too much space/inodes
  • Quote

Post by skurudo » Mon Nov 28, 2016 1:19 pm

You can delete all sessions insid tmp via command

Code: Select all

find /home/*/tmp -type f -name 'sess_*' -ctime +5 -delete
And you can make script and add it to cron.. ;-)
Top

Wiizard
Posts: 9
Joined: Mon Apr 04, 2016 1:53 pm

Re: /home/admin/tmp using up too much space/inodes
  • Quote

Post by Wiizard » Wed Jun 27, 2018 10:52 am

How to create a cron from this

Many thanks
Top


Post Reply
  • Print view

3 posts • Page 1 of 1

Return to “Debian/Ubuntu”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password