• 3
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

cannot create temp file - No Space left on device

I have some problems running some commands, the console gives me: *

bash: cannot create temp file for here-document: No space left on device

roo@Server: df -h
    Filesystem                 Size  Used Avail Use% Mounted on
    udev                       991M  4.0K  991M   1% /dev
    tmpfs                      201M  408K  200M   1% /run
    /dev/disk/by-label/DOROOT   40G   20G   18G  54% /
    none                       4.0K     0  4.0K   0% /sys/fs/cgroup
    none                       5.0M     0  5.0M   0% /run/lock
    none                      1001M     0 1001M   0% /run/shm
    none                       100M     0  100M   0% /run/user

I search and verify, the Inodes is full 100%:

root@Server: df -i
Filesystem                 Inodes   IUsed  IFree IUse% Mounted on
udev                       253531     402 253129    1% /dev
tmpfs                      256244     339 255905    1% /run
/dev/disk/by-label/DOROOT 2621440 2620484    956  100% /
none                       256244       2 256242    1% /sys/fs/cgroup
none                       256244       1 256243    1% /run/lock
none                       256244       1 256243    1% /run/shm
none                       256244       3 256241    1% /run/user

How i delete the right files, is secure delete inodes files? I researched on the Internet several commands to delete, but I'm not sure if it will delete system files / useful files.

root@Server:   for i in /*; do echo $i; find $i |wc -l; done
/lib
11347
/proc
66820
/root
115
/run
338
/sbin
180
/sys
20920
/tmp
1
/usr
198764
/var
2407447

How i fix this problem?

      • 2
    • 2.5 million files in /var/ appears to be lot, descend into that directory and find out which application/process is creating those files.

Like @HBrujn suggest, i search by big files:

for i in /var/lib/*; do echo $i; find $i |wc -l; done

I noticed were the session files from php5

/var/lib/php5/

Where i run this code to remove the old sessions file (+1 day)

now=$(date +%s); time for i in /var/lib/php5/sess_5*; do if ((($(stat "$i" -c '%Z') + (86400 )) < $now)); then rm -fv $i; fi; done
  • 1
Reply Report

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags