Author |
Message |
mattbatt
|
Posted: Tue Sep 18, 2007 1:26 am |
|
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1343
Location:
Orlando FL
|
I'm having issues with the / partition getting too full. More specifically what can't I delete from /tmp. Here is some helpful info ( I hope ) .
The drive space left (not much eh)
Code: sh-3.1$ df -h Filesystem Size Used Avail Use% Mounted on /dev/hda1 4.7G 4.2G 259M 95% / /dev/hda3 144G 132G 12G 92% /myth tmpfs 188M 4.0K 188M 1% /dev/shm
and here is what is in the /tmp folder Code: sh-3.1$ dir 27409204Cacv_partners.pdf mythtv_ddp_YAdhLm ssh-WQACDX3048 350 mythtv_ddp_jv3UnD ssh-WpbvNb2998 Democracy_Download_Daemon_100.txt mythtv_post_GA0Vni ssh-XVQkEj3022 KnoppMyth.sql mythtv_post_OAiVkc ssh-ZoeHQo2947 MythTV.out.sql mythtv_result_MFq6we ssh-btjlko3054 _KnoppMyth-main.3435-24517 mythtv_result_gJ4FCq ssh-cqUPrV3145 _KnoppMyth-main.3690-29103 mythweather ssh-cuhDDB3014 channel.sql nsfu9q1a.gz ssh-eyPuAV2993 channel.txt orbit-mythtv ssh-hRtSSG2949 crontab.rtnzqi orbit-root ssh-kvErrK2989 fah plugtmp ssh-pPYzAY3029 fileBUFTom plugtmp-1 ssh-phiQog3147 fileDQFnce plugtmp-2 ssh-sCBKde3032 fileKD4oRv plugtmp-3 ssh-ulAaww3031 filev5IaBQ romdb-20051116-02.sql ssh-vUhkTz3261 folding@home.username ssh-AUUBoP3072 ssh-vZnWGe3026 gbs ssh-Clipmu3037 ssh-vmepwj5069 gconfd-mythtv ssh-DBEypS3033 ssh-xRrrvK2968 gconfd-root ssh-DNyuky3000 ssh-xdNtXH3041 icons ssh-FOvqqm3010 ssh-xlUFzn3027 iokcs30c.gz ssh-GgJVPc2996 ssh-ylUFzn3027 kde-mythtv ssh-IQSoBv2944 tmp5PZPeT.html ksocket-mythtv ssh-MtCzQm3223 tmppD3Pre.html locale.txt ssh-NtCzQm3223 tvterm mplayer-af_export_mythtv ssh-QlERRF4145 ver mythplugins ssh-RnPSHZ3012 videosource.sql mythtv_cookies_KeQxRy ssh-SeUAmc3057 videosource.txt mythtv_cookies_eqANIg ssh-SnPSHZ3012 weathercomXML.2.pl mythtv_ddp_2xzieH ssh-TeUAmc3057 mythtv_ddp_SwHtYG ssh-UUsFyx3005
[/code]
|
|
Top |
|
|
Liv2Cod
|
Posted: Tue Sep 18, 2007 1:28 am |
|
Joined: Fri May 21, 2004 11:55 pm
Posts: 1206
Location:
Silicon Valley, CA
|
Tell me the size of the log files in /var/log/mythtv. That frontend log can sure get big fast!
_________________ Do you code to live, or live to code? Search LinHES forum through Google
|
|
Top |
|
|
stevetv
|
Posted: Tue Sep 18, 2007 4:30 am |
|
Joined: Sat Apr 08, 2006 7:27 am
Posts: 125
|
Liv2Cod wrote: Tell me the size of the log files in /var/log/mythtv. That frontend log can sure get big fast!
whats a good way to shrink it? i presume deleting the file is bad... deleting it's contents?
|
|
Top |
|
|
mjl
|
Posted: Tue Sep 18, 2007 5:39 am |
|
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location:
Warwick, RI
|
Hi,
What version are you running? R5C7 needed a tweak to stop a log issue.
I zero out a file with: echo "" > /path/to/filename use with caution.
Mike
|
|
Top |
|
|
mattbatt
|
Posted: Fri Sep 21, 2007 9:11 am |
|
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1343
Location:
Orlando FL
|
Sorry that I disappeared on this post got busy at work and life and such.
I'm using version R5E50.
I'm not at home right now so I can't give you the size of the /var/log/mythtv folder I'll look at it when I get home how big should it be?
What does echo ""> /path.etc do and how should I use it?
So my real question is are the files in the /tmp folder really temporary?
and can all of those ssh- "random text" be deleted
Thanks everyone.
|
|
Top |
|
|
bradpvr
|
Posted: Fri Sep 21, 2007 10:43 am |
|
Joined: Tue Mar 27, 2007 11:55 am
Posts: 40
|
Deleting stuff out of tmp generally won't gain you much disk space.
if you do a du -h from /tmp it'll how much space the contents is taking up.
More then likely the mythback/frontend.log are taking up the space.
The echo line basically write "nothing" to the file, hence overwriting what's existing, and ultimately shrinking the file.
As a more permanent solution, you'll want to rotate the myth logs based on file size and only keep a few (or turn it off if you don't need it)
|
|
Top |
|
|
mattbatt
|
Posted: Fri Sep 21, 2007 6:19 pm |
|
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1343
Location:
Orlando FL
|
here you go for the /var/log/mythtv Code: root@mythtv:/var/log/mythtv# dir -S -l -h total 244K -rw-r--r-- 1 mythtv mythtv 39K Sep 16 06:26 mythbackend.log.6 -rw-r--r-- 1 mythtv mythtv 37K Sep 19 06:25 mythbackend.log.3 -rw-r--r-- 1 mythtv mythtv 36K Sep 15 06:25 mythbackend.log.7 -rw-r--r-- 1 mythtv mythtv 34K Sep 20 06:25 mythbackend.log.2 -rw-r--r-- 1 mythtv mythtv 26K Sep 21 20:00 mythbackend.log -rw-r--r-- 1 mythtv mythtv 21K Sep 17 06:25 mythbackend.log.5 -rw-r--r-- 1 mythtv mythtv 19K Sep 21 06:25 mythbackend.log.1 -rw-r--r-- 1 mythtv mythtv 14K Sep 18 06:25 mythbackend.log.4 -rw-r--r-- 1 root mythtv 566 Apr 24 02:45 KnoppMyth-run.log
I did a du -h from /tmp and after 5000 lines of results putty stopped remembering the files. Here is a small sample Code: 272K ./mythplugins/mythnews/i18n/.svn 388K ./mythplugins/mythnews/i18n 120K ./mythplugins/mythnews/mythnews/.svn/text-base 44K ./mythplugins/mythnews/mythnews/.svn/prop-base 4.0K ./mythplugins/mythnews/mythnews/.svn/props 4.0K ./mythplugins/mythnews/mythnews/.svn/tmp/text-base 4.0K ./mythplugins/mythnews/mythnews/.svn/tmp/prop-base 4.0K ./mythplugins/mythnews/mythnews/.svn/tmp/props 16K ./mythplugins/mythnews/mythnews/.svn/tmp 204K ./mythplugins/mythnews/mythnews/.svn 16K ./mythplugins/mythnews/mythnews/images/.svn/text-base 8.0K ./mythplugins/mythnews/mythnews/images/.svn/prop-base 4.0K ./mythplugins/mythnews/mythnews/images/.svn/props 4.0K ./mythplugins/mythnews/mythnews/images/.svn/tmp/text-base 4.0K ./mythplugins/mythnews/mythnews/images/.svn/tmp/prop-base 4.0K ./mythplugins/mythnews/mythnews/images/.svn/tmp/props 16K ./mythplugins/mythnews/mythnews/images/.svn/tmp 60K ./mythplugins/mythnews/mythnews/images/.svn 76K ./mythplugins/mythnews/mythnews/images 400K ./mythplugins/mythnews/mythnews 932K ./mythplugins/mythnews 49M ./mythplugins 8.0K ./gconfd-mythtv/lock 12K ./gconfd-mythtv 4.0K ./_KnoppMyth-main.3435-24517 4.0K ./ssh-hRtSSG2949 4.0K ./ksocket-mythtv/artsd-samples 12K ./ksocket-mythtv 4.0K ./.ICE-unix 44K ./kde-mythtv 4.0K ./ssh-QlERRF4145 4.0K ./orbit-root 4.0K ./_KnoppMyth-main.3690-29103 4.0K ./gconfd-root 4.0K ./ssh-phiQog3147 4.0K ./ssh-vmepwj5069 4.0K ./ssh-AUUBoP3072 3.7M ./mythweather 4.0K ./plugtmp 4.0K ./ssh-xlUFzn3027 4.0K ./ssh-XVQkEj3022
So what next?
|
|
Top |
|
|
Liv2Cod
|
Posted: Fri Sep 21, 2007 7:50 pm |
|
Joined: Fri May 21, 2004 11:55 pm
Posts: 1206
Location:
Silicon Valley, CA
|
So close... What we really needed from your "du" was the summary of space used. It usually puts the total at the bottom of the display. I think you can even do du -t to get the totals only. I may have that switch wrong, tho.
_________________ Do you code to live, or live to code? Search LinHES forum through Google
|
|
Top |
|
|
Greg Frost
|
Posted: Fri Sep 21, 2007 8:16 pm |
|
Joined: Mon May 10, 2004 8:08 pm
Posts: 1891
Location:
Adelaide, Australia
|
do this:
Code: cd / du -m --max-depth=1 Then look for the dir with the most stuff, change to that and do it again until you find the runaway file. example: Code: root@mythtv:~# cd / root@mythtv:/# du -m --max-depth=1 1 ./lost+found 154430 ./myth 4 ./bin 5 ./boot 1 ./dev 11 ./etc 182 ./home 1 ./initrd 73 ./lib 1 ./media 1 ./mnt 1 ./opt 261 ./proc 12 ./root 10 ./sbin 1 ./srv 0 ./sys 2 ./tmp 1941 ./usr 252 ./var 1 ./cdrom 1 ./.qt 4 ./tftpboot 334 ./nfsroot 157516 .
You can ignore /myth since that is on the other partition. In this case there are no real standouts, but often you may find a log file somewhere under /var/log that is getting really big.
|
|
Top |
|
|
mihanson
|
Posted: Fri Sep 21, 2007 8:32 pm |
|
Joined: Sun Sep 25, 2005 3:50 pm
Posts: 1013
Location:
Los Angeles
|
I don't want to confuse the issue, but I'd check /home/mythtv/.xsession-errors
Code: ls -l /home/mythtv/.xsession-errors This file has given many people trouble in the past. If it's huge, add the following to the end of /etc/logrotate.conf Code: /home/mythtv/.xsession-errors { rotate 5 daily }
This will rotate the file daily, keeping only the last 5 days of logs.
_________________ Mike
My Hardware Profile
|
|
Top |
|
|
mjl
|
Posted: Fri Sep 21, 2007 10:54 pm |
|
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location:
Warwick, RI
|
Hi,
Actually, once you find the large file you may want to do a tail -200 /path/to/bad/guy.log |less and look to see what is causing the entries. Then shrink it and fix the issue so it doesn't re-occur.
There are three logs that have gotten large in the recent past that come to mind,
mysql (R5C7)
mythfrontend
& mythbackend
and the others are usually somethng not set correctly.
Mike
|
|
Top |
|
|
mattbatt
|
Posted: Sat Sep 22, 2007 7:28 am |
|
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1343
Location:
Orlando FL
|
Thanks for all of your help I unfortunately won't be able to work on this until tomorrow night (I'm Working this stupid event) and I can't get Putty to work from the work network. The IT guys probably have something locked down.
to Liv2Cod there were no totals at the end of that file there were only file names.
Is there a way to sort du by size (make the biggest float to the top)?
Thanks again
|
|
Top |
|
|
tjc
|
Posted: Sat Sep 22, 2007 9:50 am |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
Code: du -k | sort -n
That leaves the biggest ones at the end, which is convenient if you just run it and look at the last page or so of results.
BTW - This an much more is covered in the LinuxTips page on the wiki.
|
|
Top |
|
|
mattbatt
|
Posted: Sat Sep 22, 2007 8:57 pm |
|
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1343
Location:
Orlando FL
|
du -k | sort N of the / the last page or two
Code: 20984 ./home/mythtv/.mozilla 21376 ./usr/share/mythtv/themes/blootube-wide 21384 ./usr/src/debs 21728 ./home/mythtv/mythtv/i18n 22696 ./var/lib/apt/lists 22704 ./var/lib/apt 22768 ./home/mythtv/mythplugins/mytharchive/mythburn/intro 23068 ./myth/folding@home 23772 ./root/.mythtv/themecache/Titivillus.1680.1050 23776 ./root/.mythtv/themecache 24824 ./var/lib/dpkg/info 25392 ./home/mythtv/bin/2007-08-13 26764 ./var/lib/dpkg 26836 ./myth/firefox 26948 ./usr/sbin 27144 ./usr/share/man 27288 ./root/.mythtv 27316 ./home/mythtv/mythtv/libs/libavcodec 27892 ./home/mythtv/bin/2007-08-14 29448 ./var/cache/apt 29796 ./home/mythtv/mythplugins/mytharchive/mythburn 30692 ./home/mythtv/bin/2007-08-15 30884 ./home/mythtv/bin/2007-08-20 31544 ./lib/modules/2.6.18-chw-13/kernel/drivers 32064 ./usr/lib/dri 32448 ./home/mythtv/bin/2007-08-23 32780 ./home/mythtv/bin/2007-08-30 33420 ./usr/lib/codecs 34232 ./home/mythtv/mythplugins/mytharchive 35408 ./usr/include 36448 ./usr/share/fonts 37820 ./var/cache 37928 ./home/mythtv/bin/2007-08-16 38744 ./usr/games 44356 ./root 44528 ./usr/src 46596 ./home/mythtv/mythtv/libs/libmythtv 46756 ./lib/modules/2.6.18-chw-13/kernel 48236 ./home/mythtv/bin/2007-08-29 49760 ./tmp/mythplugins 51884 ./myth/stream/downloads/feeds.feedburner.com/~r/TikiBarTV/~5/107016620 52276 ./myth/stream/downloads/feeds.feedburner.com/~r/TikiBarTV/~5/132038917 52700 ./var/backups 55176 ./usr/share/locale 56128 ./home/mythtv/bin/2007-08-22 59728 ./lib/modules/2.6.18-chw-13 59732 ./lib/modules 62876 ./home/mythtv/bin/2007-08-28 69744 ./usr/share/mythtv/themes 69924 ./lib 74928 ./usr/share/webmin 83360 ./var/lib/mysql/mythconverg 91524 ./myth/music/Green Day/American Idiot 91528 ./myth/music/Green Day 91532 ./myth/music 99108 ./home/mythtv/mythplugins 102208 ./myth/stream/downloads/www.podtrac.com/pts 102212 ./myth/stream/downloads/www.podtrac.com 102364 ./usr/share/mythtv 104588 ./var/lib/mysql 113860 ./usr/share/doc 121768 ./home/mythtv/mythtv/libs 135388 ./tmp 150680 ./usr/bin 170360 ./var/lib 178104 ./myth/stream/downloads/feeds.feedburner.com/~r/TikiBarTV/~5 178108 ./myth/stream/downloads/feeds.feedburner.com/~r/TikiBarTV 178112 ./myth/stream/downloads/feeds.feedburner.com/~r 178116 ./myth/stream/downloads/feeds.feedburner.com 192220 ./home/mythtv/mythtv 197120 ./home/mythtv/bin/2007-08-12 280332 ./myth/stream/downloads 281040 ./myth/stream 299976 ./home/mythtv/bin/2007-08-21 373876 ./home/mythtv/bin/2007-08-24 398575 ./proc 460184 ./var/log/mysql 463504 ./var/log 498428 ./usr/lib 557144 ./usr/share 726480 ./var 1266200 ./home/mythtv/bin 1361564 ./usr 2046136 ./home/mythtv 2046184 ./home 2993668 ./myth/backup 141278048 ./myth/tv 144698184 ./myth 149506527 .
Last edited by mattbatt on Sat Sep 22, 2007 9:02 pm, edited 1 time in total.
|
|
Top |
|
|
mattbatt
|
Posted: Sat Sep 22, 2007 9:01 pm |
|
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1343
Location:
Orlando FL
|
the result of a du -k | sort -n of the /home/mythtv/bin
Code: root@mythtv:/home/mythtv/bin# du -k | sort -n 4 ./2007-08-17 4 ./2007-08-19 4 ./2007-08-25 4 ./2007-08-26 4 ./2007-08-27 4 ./2007-08-31 4 ./2007-09-01 4 ./2007-09-02 4 ./2007-09-03 9904 ./2007-08-18 25392 ./2007-08-13 27892 ./2007-08-14 30692 ./2007-08-15 30884 ./2007-08-20 32448 ./2007-08-23 32780 ./2007-08-30 37928 ./2007-08-16 48236 ./2007-08-29 56128 ./2007-08-22 62876 ./2007-08-28 197120 ./2007-08-12 299976 ./2007-08-21 373876 ./2007-08-24 1266200 .
|
|
Top |
|
|