Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Page 1 of 2 1 2 >
Topic Options
#183835 - 09/10/2003 08:15 Hijack v344: fids subdirectories support
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14483
Loc: Canada
Hijack v344 is now available.

New in this version:

(1) FTP Filesystem source code is in the kernel source tree, but NOT configured or compiled in by default. No bloat that way, but it's still there for people like me who build their own kernels. This will eventually move to the RioReceiver kernels.

(2) Added a new Hijack config.ini option: trace_fs=1 When set, this option causes all file accesses to be logged via the serial port. Very useful for seeing what the player thinks it is doing at any point in time..

(3) More comprehensive support for /empeg/fids?/_xxxxx/ subdirectories. Hijack now detects the "new" fids (tunes & playlists) layout in /empeg/fids?/*, and automatically redirects ALL accesses to the appropriate subdirectory, if one exists. This means that if you convert your fids subdirs to this new format using the attached script, fidsift.sh (download and run it on your player, once ever), Hijack will ensure that all subsequent sync operations respect and use the new structure, whether they want to or not!

Background: the player software (v2 and v3) already supports the new structure, but has a deficiency whereby it normally does not download new tunes into the subdirs, even when such subdirs already exist. For playback and database rebuilds, the player software DOES look in the subdirs, as well as the top level /empeg/fids?/ directories. This and subsequent hijack versions now force the player software to always use the subdirectories if they exist, and ONLY the subdirectories -- preventing accidental duplication and confusion when the same file name may exist in both places.

Switching your player over to the new structure is EASY -- just download and run the attached script once on your player. Running it more than once is okay too, but not needed (harmless).

EDIT: script is available here.

Why do this? It can dramatically speed up access to tunes on a heavily loaded player (thousands of tracks, or even tens of thousands of tracks), cutting "sync" times by 20-50% or more. It also speeds up the Hijack web interface, and helps the player slightly during normal music playback.

Why not do it? If you ever upload new tracks to the player later without Hijack installed, then things will work just fine -- until you reinstall Hijack. At that point, nothing bad happens, but you will need to re-run the attached script before the uploaded tunes can be accessed through Hijack. Hardly a blip for anyone, I suspect.

I would especially like to see Paul try this out.

Cheers


Edited by mlord (09/10/2003 08:21)

Top
#183836 - 09/10/2003 08:31 Re: Hijack v344: fids subdirectories support [Re: mlord]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4174
Loc: Cambridge, England
Background: the player software (v2 and v3) already supports the new structure, but has a deficiency whereby it normally does not download new tunes into the subdirs, even when such subdirs already exist.
I think that only applies to v2 -- doesn't v3 always put new tunes into the subdirectories, unless it's replacing another file with the same FID?

Peter

Top
#183837 - 09/10/2003 08:44 Re: Hijack v344: fids subdirectories support [Re: peter]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
Sure looks like it. Running v3, fidsifted, made a (delete/create) change, still looks fine (nothing other than dirs in /drive?/fids/)

Top
#183838 - 09/10/2003 08:49 Re: Hijack v344: fids subdirectories support [Re: Daria]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14483
Loc: Canada
What I observed was that the player was happy to re-use "available" FIDs in existing subdirs, but when it ran out of those it would NOT create a new higher numbered subdir for subsequent downloads. Hijack now does that for it.

EDIT: not sure about v3 -- most of my testing yesterday was with v2. Takes a while to test this too -- JEmplode is too clever about spotting duplicates for me!

Cheers


Edited by mlord (09/10/2003 08:50)

Top
#183839 - 09/10/2003 09:21 Re: Hijack v344: fids subdirectories support [Re: mlord]
image
old hand

Registered: 28/04/2002
Posts: 770
Loc: Los Angeles, CA
JEmplode is too clever about spotting duplicates for me


uncheck dedupe in options. hash won't be created

Top
#183840 - 09/10/2003 09:49 Re: Hijack v344: fids subdirectories support [Re: image]
pgrzelak
carpal tunnel

Registered: 15/08/2000
Posts: 4859
Loc: New Jersey, USA
Greetings!

Busy day. I just stumbled on the thread. I will take a look at it later this evening or this weekend. Things are a bit crazy at the moment, but I will give it a shot.
_________________________
Paul Grzelak
200GB with 48MB RAM, Illuminated Buttons and Digital Outputs

Top
#183841 - 09/10/2003 10:39 Re: Hijack v344: fids subdirectories support [Re: mlord]
crazymelki
enthusiast

Registered: 16/02/2001
Posts: 373
Loc: Switzerland
Hello

Can someone explain me exactly how to run this script? Step by step? Please...

Thanks in advance....

bye
_________________________
crazymelki.com

Top
#183842 - 09/10/2003 10:53 Re: Hijack v344: fids subdirectories support [Re: crazymelki]
loren
carpal tunnel

Registered: 23/08/2000
Posts: 3826
Loc: SLC, UT, USA
_________________________
|| loren ||

Top
#183843 - 09/10/2003 11:00 Re: Hijack v344: fids subdirectories support [Re: loren]
crazymelki
enthusiast

Registered: 16/02/2001
Posts: 373
Loc: Switzerland
Thanks!
_________________________
crazymelki.com

Top
#183844 - 09/10/2003 11:23 Re: Hijack v344: fids subdirectories support [Re: mlord]
Taym
carpal tunnel

Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
just download and run the attached script once on your player. Running it more than once is okay too, but not needed (harmless).

Ok, as a linux newbie, what should I do precisely? FTP the script somewhere in my empeg, then enter the command prompt via serial by poressing the Q at boot, and then?

Thank you
_________________________
= Taym =
MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg

Top
#183845 - 09/10/2003 11:43 Re: Hijack v344: fids subdirectories support [Re: Taym]
Micman2b
addict

Registered: 27/12/2001
Posts: 441
Loc: Central, NC, USA
This is what I did on an Xp machine
Connect player to serial
Start empeg
Upload new HiJack 344
Open FTP client (FTP)
Open Hyperterminal (HT)
Set RW in FTP - site RW
send file to player root /
Connect to player via HT then press q [enter]
Send chmod 0755 fidsift.sh command via HT
Set RO in FTP - site RO
Type QUIT in HT
Press ctrl+c in HT
Type /fidsift.sh into HT
Wait until folders are written in HT.
End HT
End FTP
Reboot empeg


If this is wrong or i missed something let me know.




_________________________
_____________
Sean in NC
130gb MK2a w/ 32mb ram
80gb MK2a empeg spare

Top
#183846 - 09/10/2003 11:50 Re: Hijack v344: fids subdirectories support [Re: Micman2b]
Taym
carpal tunnel

Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
Sprry, I did not notoce other messages had already answered to my question.
I still have a problem: I can't enter the command prompt. Q does not seem to work. Same with CTRL-C. Same with the Quit menu on the empeg.
WHen shoudl I press Q/CTRL-V ?
_________________________
= Taym =
MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg

Top
#183847 - 09/10/2003 11:52 Re: Hijack v344: fids subdirectories support [Re: Taym]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31575
Loc: Seattle, WA
I can't enter the command prompt.
Then please look here.
_________________________
Tony Fabris

Top
#183848 - 09/10/2003 11:55 Re: Hijack v344: fids subdirectories support [Re: Taym]
Micman2b
addict

Registered: 27/12/2001
Posts: 441
Loc: Central, NC, USA
you will need the Developers version of the player software to access the player, I think..

Edited to remove apostrophe

Sean in NC


Edited by Micman2b (09/10/2003 11:57)
_________________________
_____________
Sean in NC
130gb MK2a w/ 32mb ram
80gb MK2a empeg spare

Top
#183849 - 09/10/2003 12:00 Re: Hijack v344: fids subdirectories support [Re: tfabris]
Taym
carpal tunnel

Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
I actually did, Tony, and I have entered the command prompt several times in the past, altough never with v. 3.0b3a, which I am running now.
I see the boot messages as I recycle the power to the player, but somehow it does not seem to get input fro the keyboard. If select Quit from the empeg menu, it actually tells me this:

Restored terminal settings
Remounting first music partition read-only
Remounting second music partition read-only
Player exited normally: 0
Switching to shell-player loop
Starting bash.
empeg:/empeg/bin#

but at that point nothing that I type shows on screen, and the empeg simply stays there and wait. :? What am I doing wrong?


Edit:
And yes, I do have the developer version.


Edited by taym (09/10/2003 12:02)
_________________________
= Taym =
MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg

Top
#183850 - 09/10/2003 12:30 Re: Hijack v344: fids subdirectories support [Re: Taym]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
And flow control is off?

Top
#183851 - 09/10/2003 15:42 Re: Hijack v344: fids subdirectories support [Re: mlord]
SE_Sport_Driver
carpal tunnel

Registered: 05/01/2001
Posts: 4903
Loc: Detroit, MI USA
Mark, is the version of your script in this thread newer than the second on in your original thread? (swapon/swapoff)?
_________________________
Brad B.

Top
#183852 - 09/10/2003 17:11 Re: Hijack v344: fids subdirectories support [Re: SE_Sport_Driver]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14483
Loc: Canada
Yes, the version linked in this thread is the newest: v1.03, with swapon/swapoff included.

Cheers

Top
#183853 - 09/10/2003 17:40 Re: Hijack v344: fids subdirectories support [Re: mlord]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Worked great for me. Haven't done a sync yet but the Hijack web interface is indeed noticably snappier. Thanks, Mark!
_________________________
- Tony C
my empeg stuff

Top
#183854 - 09/10/2003 23:17 Re: Hijack v344: fids subdirectories support [Re: mlord]
TigerJimmy
old hand

Registered: 15/02/2002
Posts: 1049
Well, my player is not exactly Grzelakian:

2 60GB drives (111GB usable)
14709 tracks
8.72GB free

Pre-sift synchronization time: 8:47
fidsift execution time: 24:45
Post-sift synchronization time: 4:35

48% reduction! Awesome. It seems like the player loads the music database significantly faster on boot, too (I wish I had done before & after timings of that process). Haven't experimented with navigation, etc.

Thank you again, Mark!

Bedtime...

Jim
PS: Everyone should do this to their player. In fact, I think we should move or copy this entire thread to General, since I doubt everyone reads Programming.

Edit: While the capacity may not be Grzelakian, the drives are! My player has 2 of Paul's old 60GB drives...


Edited by TigerJimmy (09/10/2003 23:18)

Top
#183855 - 10/10/2003 02:55 Re: Hijack v344: fids subdirectories support [Re: Daria]
Taym
carpal tunnel

Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
And flow control is off?

That was it! How could I forget? I did this tens of times... Sorry guys, too much work I guess... Thank you!

Edit: script run, it took more or less 10 minuts on my 3500-songs collection. All is working well and I'll try now to notice improvements...


Edited by taym (10/10/2003 03:09)
_________________________
= Taym =
MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg

Top
#183856 - 10/10/2003 04:25 Re: Hijack v344: fids subdirectories support [Re: Taym]
pgrzelak
carpal tunnel

Registered: 15/08/2000
Posts: 4859
Loc: New Jersey, USA
Greetings!

I ran into delays last night. I will do this upgrade this weekend!
_________________________
Paul Grzelak
200GB with 48MB RAM, Illuminated Buttons and Digital Outputs

Top
#183857 - 10/10/2003 04:45 Re: Hijack v344: fids subdirectories support [Re: TigerJimmy]
SE_Sport_Driver
carpal tunnel

Registered: 05/01/2001
Posts: 4903
Loc: Detroit, MI USA
Jimmy, I too wish that I had timed the "Loading Music Database" on boot up, maybe Paul can do this for us.

Mark, is it necessary to ftp this file on the player? If we have to be connected via serial to execute the script, can't we just direct connect to the player in serial, do a rw, then send the file (like we'd send a anna-vu logo), do a "chmod 755 filename.fs", type RO and quit? Seems like it'd save time.

Some people might be scared by this because they don't want to ftp, but this might be easier.
_________________________
Brad B.

Top
#183858 - 10/10/2003 06:06 Re: Hijack v344: fids subdirectories support [Re: SE_Sport_Driver]
mtempsch
pooh-bah

Registered: 02/06/2000
Posts: 1996
Loc: Gothenburg, Sweden
Any way you can get the file on the player is good.
Nowadays, people are probably more used to "put"ting files with ftp than using rz/sz...

/Michael
_________________________
/Michael

Top
#183859 - 10/10/2003 07:59 Re: Hijack v344: fids subdirectories support [Re: SE_Sport_Driver]
TigerJimmy
old hand

Registered: 15/02/2002
Posts: 1049
Yeah, I suppose FTP might scare some people off, but the UNIX command line will scare them off even more. I figure those folks probably don't have the developer image or hijack anyway.

I used the player to do a bunch of playlist adds and navigating while on the way to work today. The whole player seems somewhat more responsive. The sync times under 5 minutes are the biggest advantage, though.

Jim

Top
#183860 - 10/10/2003 08:17 Re: Hijack v344: fids subdirectories support [Re: TigerJimmy]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14483
Loc: Canada
The database files themselves are mostly unaffected by this change -- sure, I mighta shaved a few milliseconds off (dubious), but it cannot be measured by the human eye. However, in addition to reading the database files at that time, the player also does a very quick scan of the fids directories. That part could be as much as a second or so quicker now (for loaded players), but I've not tried to measure it.

EDIT: and how did I shave a few milliseconds away? Well, because Hijack is now FORCING redirection to the subdirs, attempts to access files in the FIDS directories now succeed on the first syscall for each, rather than requiing two syscalls from the player (one for the old location, then one for the new location..).

Cheers


Edited by mlord (10/10/2003 08:19)

Top
#183861 - 10/10/2003 14:45 Re: Hijack v344: fids subdirectories support [Re: mlord]
TigerJimmy
old hand

Registered: 15/02/2002
Posts: 1049
Well, OK. I was probably just delighted about the sync time and my "world view" was effected. :-)

Like I said, I wish I had timed it. Anyhow, great job and thanks!

Top
#183862 - 10/10/2003 15:31 Re: Hijack v344: fids subdirectories support [Re: TigerJimmy]
pgrzelak
carpal tunnel

Registered: 15/08/2000
Posts: 4859
Loc: New Jersey, USA
Greetings!

And so it begins... I will edit this post as I go along. How are you timing your syncs, and under what conditions?

-------------------
Empeg State:
Version 2.0 Final, Developer, Hijack 344
2 x 80GB Hard Drives (160GB nominal, 149GB useable)
27066 Tracks (as defined by soup view in emplode)
6.4 GB Free (as defined by status bar in emplode)
73EF <29679 Decimal> Highest FID # (via serial port examination, leaving off last digit)

Pre:
Power-on time = 21 seconds : (timed from power applied by pushing into dock until standby mode entered)
Power-on time = 16.2 seconds : (using "time player" from shell, and quitting player as soon as possible)
Load player into emplode = 7 minutes 46 seconds : (using serial connect - slower, but known constant transfer rate)

Groan - one of my music filesystems (where I also hold utilities and stuff) needs an FSCK. I need to resolve that before getting any sync times... While this occurs (45 min per drive), does anyone have timing tests they would like?


Edited by pgrzelak (10/10/2003 16:20)
_________________________
Paul Grzelak
200GB with 48MB RAM, Illuminated Buttons and Digital Outputs

Top
#183863 - 11/10/2003 08:17 Re: Hijack v344: fids subdirectories support [Re: pgrzelak]
pgrzelak
carpal tunnel

Registered: 15/08/2000
Posts: 4859
Loc: New Jersey, USA
Greetings!

So, after cleaning out the drives with an FSCK, I can continue... Also, I have a clone player (working on LabRat, clone is Archive) that I can use to get comparisons and timings after the fact. They are (well, were) in perfect rsync.

-------------------
Empeg State:
Version 2.0 Final, Developer, Hijack 344
2 x 80GB Hard Drives (160GB nominal, 149GB useable)
27066 Tracks (as defined by soup view in emplode)
6.4 GB Free (as defined by status bar in emplode)
73EF <29679 Decimal> Highest FID # (via serial port examination, leaving off last digit)

Before:
Power-on time = 21 seconds : (timed from power applied by pushing into dock until standby mode entered)
Power-on time = 16.2 seconds : (using "time player" from shell, and quitting player as soon as possible)
Load player into emplode = 7 minutes 46 seconds : (using serial connect - slower, but known constant transfer rate)
Sync = infinity * : (emplode using serial connect - deleted one song from one playlist)
Database Rebuild = 21 minutes 8 seconds : (going into shell, setting drives read/write and running the player application to rebuild database files)
FSCK Time = 61 minutes 2 seconds : (time fsck -fay /drive0, assuming clean drive to begin with)

During:
fidsift.sh = less than 1 hour (time ./fidsift.sh) - Sorry. The first time around, the time command did not return a value to me. My PC went into a full system virus scan, and my hyperterm results became choppy. So, trusting that I would see useful results, I wandered away... The command succeeded, though.

After:
Power-on time = 23 seconds : (timed from power applied by pushing into dock until standby mode entered)
Power-on time = 19.7 seconds : (using "time player" from shell, and quitting player as soon as possible)
Load player into emplode = 7 minutes 48 seconds : (using serial connect - slower, but known constant transfer rate)
Sync = infinity * : (emplode using serial connect - deleted one song from one playlist)
Database Rebuild = 6 minutes 52 seconds : (going into shell, setting drives read/write and running the player application to rebuild database files)
FSCK Time = 60 minutes 12 seconds : (time fsck -fay /drive0, assuming clean drive to begin with)

* infinity - my players FID count seems to be giving emplode and database creation grief. I am able to upload the tracks with emplode, but further syncs seems to cause an error 0x8004003e from emplode. The "building databases" part of the sync goes by unnaturally fast, and then Emplode crashes during the "writing player configuration" phase, causing a Dr. Watson dump. The player just sits there with "Building music databases..." on the screen. After over 30 minutes passed, the building database phase appeared to complete, and the player application completed its load. Going in with a serial link, the /drive0/var directory has no database files. I will rebuild them by hand as above... After that rebuild, the player works normally, with all changes made from the sync in place. It is just an inconvenience. No other problems noticed yet from beyond beyond max-fid-count. See this thread for more information.

WOW!!! I did not expect to see that kind of improvement, given that I am so far out there with the FID count. Note: Since normal syncs do not work for me, I am probably a bad example for this... All times that involve human interaction (quitting player, watching the clock) are dependent on human response time, and are all +/- a second or two...


Edited by pgrzelak (11/10/2003 13:01)
_________________________
Paul Grzelak
200GB with 48MB RAM, Illuminated Buttons and Digital Outputs

Top
#183864 - 11/10/2003 13:02 Re: Hijack v344: fids subdirectories support [Re: pgrzelak]
pgrzelak
carpal tunnel

Registered: 15/08/2000
Posts: 4859
Loc: New Jersey, USA
*bump*

To change the "last updated" time for the forum, and mark the thread as having a new item.
_________________________
Paul Grzelak
200GB with 48MB RAM, Illuminated Buttons and Digital Outputs

Top
Page 1 of 2 1 2 >