Difference between revisions of "Free hard disk space"

From Kolmisoft Wiki
Jump to navigationJump to search
Line 1: Line 1:
<br><br>
=Check disk usage=
=Check disk usage=
To check how many free space is available on your server put this command into terminal:<br>
To check how many free space is available on your server put this command into terminal:<br>
Line 5: Line 4:
Put this command into terminal to check biggest files in system:<br>
Put this command into terminal to check biggest files in system:<br>
  du -k | sort -n | perl -ne 'if ( /(\d+)\s+(.*$)/){$l=log($1+.1);$m=int($l/log(1024)); printf ("%6.1f\t%s\t%25s %s\n",($1/(2**(10*$m))),(("K","M","G","T","P")[$m]),"*"x (1.5*$l),$2);}'
  du -k | sort -n | perl -ne 'if ( /(\d+)\s+(.*$)/){$l=log($1+.1);$m=int($l/log(1024)); printf ("%6.1f\t%s\t%25s %s\n",($1/(2**(10*$m))),(("K","M","G","T","P")[$m]),"*"x (1.5*$l),$2);}'
<br><br>
 
==Workflow==
==Workflow==
Possible location on system created by mor which can use a lot of space:<br>
Possible location on system created by mor which can use a lot of space:<br>

Revision as of 16:33, 21 February 2013

Check disk usage

To check how many free space is available on your server put this command into terminal:

df -h

Put this command into terminal to check biggest files in system:

du -k | sort -n | perl -ne 'if ( /(\d+)\s+(.*$)/){$l=log($1+.1);$m=int($l/log(1024)); printf ("%6.1f\t%s\t%25s %s\n",($1/(2**(10*$m))),(("K","M","G","T","P")[$m]),"*"x (1.5*$l),$2);}'

Workflow

Possible location on system created by mor which can use a lot of space:
1. Recordings files are stored in this directory:

cd /var/spool/asterisk/monitor 

2. Log files are stored:

/tmp/mor/debug

3. Here are stored backups made from MOR GUI.

cd /usr/local/mor/backups

It is recommended to keep on server 3 backups
Do not allow to create backup when disk space is less when 10%

4. CSV files are stored here:

cd /var/log/asterisk/cdr-csv/

5. MOR GUI logs:

cd /home/mor/log