DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2011-06-08 13:49:27

KyleK
Member
From: Dresden, Germany
Registered: 2007-12-05
Posts: 1178

Changing max number of open files

Through discussions in the MediaTomb/minidlna threads I discovered that the reason for inotify failing when indexing my music collection is due to a low value for "max number of open files" (ulimit -n).

Now I've been trying to raise that value a bit, but so far I've failed.

Adding "ulimit -n 4096" to either funplug.local or /ffp/etc/profile does not work. The latter gives an error message when logging in.

Googling the issue, I tried creating a file /etc/security/limits.conf with soft and hard limits for 'nofile'. Nothing.


Since minidlna runs as root, I only need to raise the value for the root user, but I'm out of ideas.

Any help?

Offline

 

#2 2011-06-08 15:07:22

FunFiler
Member
Registered: 2010-05-23
Posts: 577

Re: Changing max number of open files

I set mine in /mnt/HD_a2/.bootstrap/setup.sh

Snippet

Code:

#!/ffp/bin/sh

# .bootstrap/setup.sh
# This script is called by FFP fun_plug early in the run, before all the 
# other scripts in ffp/start so it is a good place to perform setup operations
# such as loading the USB device etc

export PATH=$PATH:/ffp/sbin:/ffp/bin:/usr/sbin:/sbin:/usr/bin:/bin

# fixup firmware issues

# increase the number of open files
/bin/echo "Setting the ulimit number of open files to 65535"
ulimit -n 65535
echo `ulimit -a`

Result in log

Code:

**** fun_plug script for DNS-323 (2008-08-11 tp@fonz.de) ****
Tue Mar 22 13:56:13 GMT 2011
* Running /mnt/HD_a2/.bootstrap/setup.sh ...
Setting the ulimit number of open file handles to 65535
time(seconds) unlimited
file(blocks) unlimited 
data(kbytes) unlimited 
stack(kbytes) 8192 
coredump(blocks) 0 
memory(kbytes) unlimited 
locked memory(kbytes) 32 
process(processes) 512 
nofiles(descriptors) 65535
Setting Time Zone information in /etc/TZ to EST5EDT,M3.2.0,M11.1.0

Last edited by FunFiler (2011-06-08 15:10:41)


3 * (DNS-323 with 2 * 2TB) = 12TB Running FW v1.08 & FFP v0.5
Useful Links: Transmission, Transmission Remote, Automatic

Offline

 

#3 2011-06-08 18:32:53

KyleK
Member
From: Dresden, Germany
Registered: 2007-12-05
Posts: 1178

Re: Changing max number of open files

Thanks, that worked!

I wonder why putting it in funplug.local didn't give the same result, though ...

Offline

 

#4 2011-06-08 19:26:06

scaramanga
Member
Registered: 2010-08-04
Posts: 251

Re: Changing max number of open files

KyleK wrote:

Thanks, that worked!

I wonder why putting it in funplug.local didn't give the same result, though ...

I was curious about that myself, so I checked the fun-plug script. The /mnt/HD_a2/.bootstrap/setup.sh script is sourced whereas /ffp/etc/fun_plug.local isn't (i.e. spawns in a separate process).


DNS-323 HW Rev. C1 FW 1.10 fun-plug 0.5
2 x WD10EARS-00Y5B1 in Standard mode (LCC set to 5 min; Aligned to 4K)
Transmission with Transmission Remote GUI

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB