Sign up here and you can log into the forum!

confSpace.app.bin

Here is the place to inquire about app.bins--Only currently available apps for sigma 8655 based wdtv's belong in this forum. requests go in 'Application Questions'

confSpace.app.bin   

Postby mad_ady » Mon Mar 12, 2012 4:43 am

About a year ago when the webend first took the shape that we all know and love I asked for statistics on /conf space usage. I was told it wouldn't be implemented because users would be tempted to start storing files in there and wiping their /conf in the process.

Well, I still want to know how much space is available, so I made an override as an app.bin.

This app.bin allows you to see the free/used space in your /conf partition from the webend. The size of /conf is hardcoded at 100KB (although it is probably 128KB, but I took a margin to account for filesystem overhead). Each file is calculated to occupy blocks of 1024 bytes - so if you have a 300byte file it will be counted as a 1024 byte file. This may mean it will report more than it is actually used, but it isn't a bad thing - going over the capacity of /conf will cause it to be wiped and you would loose your settings.

The app.bin overwrites the functions.php file in the webend, but will only work on 0.5.x.x firmwares (it checks the file size before overriding it). You would see the free space in conf under the webend, in the Available Disks/Disk Usage sections:

Image

Let me know if there are problems with this, or if you know how it can be improved.
The app.bin is available via Addon Manager.
User avatar
mad_ady
Developer
 
Posts: 4564
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: confSpace.app.bin   

Postby dentex » Tue Mar 13, 2012 2:46 am

Installed.
Useful, thanks!
Image
User avatar
dentex
Supporter
 
Posts: 179
Joined: Fri Apr 15, 2011 4:57 am
Location: Italy

Re: confSpace.app.bin   

Postby mad_ady » Tue Mar 13, 2012 3:06 am

Glad you found it useful :)
User avatar
mad_ady
Developer
 
Posts: 4564
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: confSpace.app.bin   

Postby dentex » Tue Mar 13, 2012 8:18 am

...after a reboot, I have this:
:shock:
Image
User avatar
dentex
Supporter
 
Posts: 179
Joined: Fri Apr 15, 2011 4:57 am
Location: Italy

Re: confSpace.app.bin   

Postby RMerlin » Tue Mar 13, 2012 9:10 am

dentex wrote:...after a reboot, I have this:
:shock:
Image


You're screwed. You've filled your nvram with so much data, that it has to put part of it on your smartphone to be able to fit it all.
WDLXTV Webend maintainer. Visit http://www.lostrealm.ca/wdlxtv to see my other WDLXTV projects.
If you like my work, please consider donating.
User avatar
RMerlin
WDLXTV Team
 
Posts: 3236
Joined: Sat Jun 26, 2010 9:25 am
Location: Montreal, Canada

Re: confSpace.app.bin   

Postby mad_ady » Tue Mar 13, 2012 9:55 am

@dentex: looks like a bug. If you still see the same output, can you give me the output of these commands?
Code: Select all
ls -l /tmp/conf/ | awk '{print $5}' | awk '{s+=int($1/1024)*1024+1024} END {print s}'
ls -l /tmp/conf/
User avatar
mad_ady
Developer
 
Posts: 4564
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: confSpace.app.bin   

Postby dentex » Tue Mar 20, 2012 8:43 am

Hi mad_ady, sorry for the late answer. I think I know what happened. I renamed the folder where my S99user-script makes a /conf backup (I was testing your app.bin to do so), so /conf was retaining some .tar backup archives. Not sure, anyway. After a reboot and a renaming fix now all works ok.

Image

Anyway, your commands give:
Code: Select all
# ls -l /tmp/conf/ | awk '{print $5}' | awk '{s+=int($1/1024)*1024+1024} END {print s}'
40960
# ls -l /tmp/conf/
-rwxr-xr-x    1 root     root         1415 Jan  1  2000 HDDstop.sh
-rwxr-xr-x    1 root     root          890 Jan  1  2000 S99user-script
-rw-r--r--    1 root     root          950 Jan  1  2000 account_list.xml
-rw-r--r--    1 root     root         9319 Mar 20 18:20 config
-rw-------    1 root     root          458 Jan  1  2000 dss_key
-rw-rw-rw-    1 root     root          348 Jan  1  2000 fileman_config.php
-rw-r--r--    1 root     root          153 Jan  1  2000 group
-rw-r--r--    1 root     root          142 Jan  1  2000 group-
-rw-r--r--    1 root     root           54 Jan  1  2000 htpasswd
-rw-------    1 root     root         1692 Jan  1  2000 id_rsa
-rw-rw-rw-    1 root     root            0 Jan  1  2000 irc_config.php
-rw-r--r--    1 root     root          274 Jan  1  2000 known_hosts
-rw-r--r--    1 root     root          345 Jan  1  2000 mt-daapd.conf
-rw-r--r--    1 root     root           18 Jan  1  2000 ntsc_pal_config
-rw-r--r--    1 root     root          489 Jan  1  2000 passwd
-rw-r--r--    1 root     root          489 Jan  1  2000 passwd-
-rw-r--r--    1 root     root         1373 Jan  1  2000 profile
-rw-r--r--    1 root     root            0 Jan  1  2000 reboot-test
-rw-------    1 root     root          811 Jan  1  2000 rsa_key
-rw-r--r--    1 root     root          385 Jan  1  2000 shadow
-rw-r--r--    1 root     root          385 Jan  1  2000 shadow-
-rw-------    1 root     root            0 Jan  1  2000 smbpasswd
-rw-r--r--    1 root     root           13 Jan  1  2000 umsp-plugins
-rw-r--r--    1 root     root         1208 Jan  1  2000 umsp-plugins-status
-rw-rw-rw-    1 root     root          177 Jan  1  2000 unrar.conf
-rw-r--r--    1 root     root          266 Mar 20 18:20 wdtvext-plugins
-rw-r--r--    1 root     root          448 Jan  1  2000 youtube-key

Thanks for your time.
User avatar
dentex
Supporter
 
Posts: 179
Joined: Fri Apr 15, 2011 4:57 am
Location: Italy

Re: confSpace.app.bin   

Postby mad_ady » Tue Mar 20, 2012 9:55 am

I'm curious - did you by chance fill up /conf with backups? If you got them out before rebooting it's possible your conf was not wiped...
So it seems data is kept in RAM (you can go over the 100KB limit), but the data written to "disk" will be truncated to 100KB (and if you go over it will be invalid).
It's interesting to know. Glad the app showed you when you went overboard :)
User avatar
mad_ady
Developer
 
Posts: 4564
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: confSpace.app.bin   

Postby dentex » Tue Mar 20, 2012 10:23 am

/conf was wiped, because on the next reboot after having the long red bar, all was reset to default (wallpaper, ssh password, etc...).
Just to be clear on what I think it happened:
my user-script does:
Code: Select all
tar -cf conf_backup-$SUF.tar /tmp/conf;
mv /conf/conf_backup-$SUF.tar /tmp/mnt/<<USB_pen_UUID>>/conf_backup/;

because if I use
Code: Select all
tar -cf conf_backup-$SUF.tar /tmp/mnt/<<USB_pen_UUID>>/conf_backup/;

it doesn't work (even though I think should be safer).
So changing the name of the conf_backup dir, brought to some tar files to remain in /conf.

ciao.
User avatar
dentex
Supporter
 
Posts: 179
Joined: Fri Apr 15, 2011 4:57 am
Location: Italy

Re: confSpace.app.bin   

Postby recliq » Tue Mar 20, 2012 11:20 am

you have a syntax problem....
try this ;)
Code: Select all
tar -cf /tmp/mnt/<<USB_pen_UUID>>/conf_backup-$SUF.tar /tmp/conf

if you want to backup /tmp/conf to /tmp/mnt/<<USB_pen_UUID>>/conf_backup-$SUF.tar.
:ugeek:
­WDLXTV Project Maintainer
-:] If you like my contributions feel free to donate for a beer or a new flash drive. ...and always remember: RTFM! (README, FAQ, WIKI) [:-
User avatar
recliq
WDLXTV Team
 
Posts: 5513
Joined: Thu Apr 15, 2010 8:09 am
Location: Kiel, Germany

Next

Return to WDLXTV-G2 & WDLXTV-Live/Plus app.bins

Who is online

Users browsing this forum: No registered users and 1 guest