How large is your install?
#1
I'm running XBMCbuntu on an external thumb drive that is 32GB in size. I'm starting to get a little concerned about free drive space. df -h yields this:
Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              24G   15G  7.6G  67% /
udev                  3.0G  4.0K  3.0G   1% /dev
tmpfs                 3.0G   12K  3.0G   1% /tmp
tmpfs                 1.2G  428K  1.2G   1% /run
none                  5.0M  4.0K  5.0M   1% /run/lock
none                  3.0G     0  3.0G   0% /run/shm
freenas:/mnt/Media    7.8T  1.1T  6.8T  13% /media/Media
I'm pretty sure that the fanart is stored somewhere on the /dev/sda1 thumb drive so, is there a way I can clean up old fanart or does XBMC do it's own housecleaning? I've tried apt-get clean and that gave me almost a gig, but I' still a ways out. How can I find out which directories are taking up the most space?

Then I try to run du -sh and I get:
Code:
aaron@HTPC:/$ sudo du -sh
du: cannot access `./proc/5049/task/5049/fd/4': No such file or directory
du: cannot access `./proc/5049/task/5049/fdinfo/4': No such file or directory
du: cannot access `./proc/5049/fd/4': No such file or directory
du: cannot access `./proc/5049/fdinfo/4': No such file or directory

am I having problems I'm not aware of?

Are most XBMCbuntu installs under 32GB?

Thx,
Reply
#2
XBMCbuntu should easily fit on an 8GB thumbdrive. Are you storing any media files on that 32GB drive?
Reply
#3
Nope, just the single OS. All media is stored in a FreeNAS system.
Reply
#4
Have a look at this article http://ubuntuforums.org/showthread.php?t=1122670

uNi
Reply
#5
Check your .xbmc/temp folder, it usually fills up with junk quite quickly, especially if all your movies have subtitles and/or much of your library is RARed.
Reply
#6
start at /

sudo du --max-depth=1 |sort -n

sudo - to see directories and files you are not allowed to see
--max-depth=1 - only report one level down (although all files in a directory and all subdirectories are counted)
sort -n - sort numerically not alphabetically, so 100000 is greater than 8 Smile

then cd into the biggest directory, rinse and repeat.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#7
Thanks for all the places to look and how to do it. I'll go through the referenced article as well as follow the terminal commands listed. I'll post back with results and any updates/findings.

uNi: thanks for the nvidia assistance from your sig

EDIT:
Code:
aaron@HTPC:/$ sudo du --max-depth=1 | sort -n
du: cannot access `./proc/2137/task/2137/fd/4': No such file or directory
du: cannot access `./proc/2137/task/2137/fdinfo/4': No such file or directory
du: cannot access `./proc/2137/fd/4': No such file or directory
du: cannot access `./proc/2137/fdinfo/4': No such file or directory
0       ./proc
0       ./sys
4       ./cdrom
4       ./dev
4       ./mnt
4       ./opt
4       ./selinux
4       ./srv
4       ./tmp
16      ./lost+found
160     ./root
416     ./run
8112    ./etc
8680    ./bin
12408   ./sbin
164728  ./boot
437952  ./var
770428  ./lib
1904676 ./usr
11310604        ./home
1091788799      ./media
1106407011      .

./media is a mount point for the freeNAS - not a local resource

EDIT2:
Found a bunch of "rogue" videos ... fpsrussia (HA!) stuff that was downloaded from the YouTube addon. They were downloaded to /home/aaron/.xbmc/userdata/addon_data/script.module.simple.downloader/ so I checked the download path within the addon and the addon has them set to a location on the freeNAS. So one of the kids must of downloaded a queue but then it never showed up where the addon said it would - saved to the local drive instead. Odd. Now drive space is better but I'll keep looking for more:
Code:
aaron@HTPC:/$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              24G   13G   11G  55% /
udev                  3.0G  4.0K  3.0G   1% /dev
tmpfs                 3.0G   12K  3.0G   1% /tmp
tmpfs                 1.2G  412K  1.2G   1% /run
none                  5.0M  4.0K  5.0M   1% /run/lock
none                  3.0G     0  3.0G   0% /run/shm
freenas:/mnt/Media    7.8T  1.1T  6.8T  14% /media/Media
Reply
#8
(2013-03-28, 23:31)awsic Wrote: Thanks for all the places to look and how to do it. I'll go through the referenced article as well as follow the terminal commands listed. I'll post back with results and any updates/findings.

uNi: thanks for the nvidia assistance from your sig

Welcome, thats why I have those links in sig. Looks like two birds one stone.

uNi

++
Reply
#9
(2013-03-28, 23:31)awsic Wrote: Thanks for all the places to look and how to do it. I'll go through the referenced article as well as follow the terminal commands listed. I'll post back with results and any updates/findings.

uNi: thanks for the nvidia assistance from your sig

EDIT:
Code:
aaron@HTPC:/$ sudo du --max-depth=1 | sort -n
du: cannot access `./proc/2137/task/2137/fd/4': No such file or directory
du: cannot access `./proc/2137/task/2137/fdinfo/4': No such file or directory
du: cannot access `./proc/2137/fd/4': No such file or directory
du: cannot access `./proc/2137/fdinfo/4': No such file or directory
0       ./proc
0       ./sys
4       ./cdrom
4       ./dev
4       ./mnt
4       ./opt
4       ./selinux
4       ./srv
4       ./tmp
16      ./lost+found
160     ./root
416     ./run
8112    ./etc
8680    ./bin
12408   ./sbin
164728  ./boot
437952  ./var
770428  ./lib
1904676 ./usr
11310604        ./home
1091788799      ./media
1106407011      .

./media is a mount point for the freeNAS - not a local resource
OK so now cd /home and run the same command. Keep drilling down into the biggest directories - you have probably found where all your extra files are by now, but just to emphasise you can keep doing this directory by directory until you have found all the biggies Smile

Also adding the -x option to du will skip other filesystems (ie won't trawl through /proc and /media)
Quote:EDIT2:
Found a bunch of "rogue" videos ... fpsrussia (HA!) stuff that was downloaded from the YouTube addon. They were downloaded to /home/aaron/.xbmc/userdata/addon_data/script.module.simple.downloader/ so I checked the download path within the addon and the addon has them set to a location on the freeNAS. So one of the kids must of downloaded a queue but then it never showed up where the addon said it would - saved to the local drive instead. Odd. Now drive space is better but I'll keep looking for more:
Code:
aaron@HTPC:/$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              24G   13G   11G  55% /
udev                  3.0G  4.0K  3.0G   1% /dev
tmpfs                 3.0G   12K  3.0G   1% /tmp
tmpfs                 1.2G  412K  1.2G   1% /run
none                  5.0M  4.0K  5.0M   1% /run/lock
none                  3.0G     0  3.0G   0% /run/shm
freenas:/mnt/Media    7.8T  1.1T  6.8T  14% /media/Media
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#10
Looks like at this point it's the ./Thumbnails dir taking up the most space.
Code:
aaron@HTPC:~/.xbmc/userdata$ sudo du --max-depth=1 -b -m | sort -n
1       ./keymaps
1       ./library
1       ./peripheral_data
1       ./playlists
1       ./profiles
11      ./Database
28      ./addon_data
8402    ./Thumbnails
8440    .
aaron@HTPC:~/.xbmc/userdata$ cd ./Thumbnails
aaron@HTPC:~/.xbmc/userdata/Thumbnails$ sudo du --max-depth=1 -b -m | sort -n
1       ./Music
5       ./generated
463     ./5
468     ./a
475     ./2
479     ./1
481     ./c
485     ./b
490     ./7
491     ./8
492     ./f
494     ./6
496     ./d
500     ./e
506     ./4
509     ./9
511     ./0
516     ./3
548     ./Video
8402    .

I've gone through the whole drive and this is the space hog I've been hunting for. 8.4GB in thumbnails sounds steep but at least I know where the space is being spent. If anyone thinks this is a problem let me know but I'm ok marking this one as "resolved".

I've only had this XBMCbuntu install for about four months so I can see down the road I'll need to purge this dir down to clean out older thumbnails. There wouldn't be a clean up util built into the XBMC GUI somewhere would there? Like, once I delete the media it also deletes that/those thumbnail(s)?

Thank you nickr, uNi, negge and artrafael for the assistance; I greatly appreciate it.
Reply
#11
Not in the gui, but a handy utility here Smile

http://forum.xbmc.org/showthread.php?tid=158373
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#12
Yes run that script nickr said with it will cleanup your Thumbnails folder from al unnecessary stuff it will take a while tooo but it works a treat.

./texturecache.py P

uNi
Reply
#13
Great script. Thanks for the heads up on that!
Reply

Logout Mark Read Team Forum Stats Members Help
How large is your install?0