Hi,
I experience some difficulties trying to access FTP server.
I have an Asus RT-N16 router (FW Kernel 2.6 (experimental) for MIPSR2, build 48) and together with an IP camera I use them in a surveillance system. My camera save a screenshot every 4sec on an USB stick. At begining this system works as a charm. But after a while when the number of files is higher(thousands), it is harder and harder to access files on FTP. And more than this, also IP camera fails to logon FTP server when the number of files is almost 12-13 thousands)
The same problem if I use an external HDD.
Some ideas?
Thx
number of files is almost 12-13 thousands
Wow ;)! Remember, this is the router you're dealing with - not a full blown computer, and it has very limited resources.
FTP server has to read the list of all files in your directories and send it to the client.
If this is acceptable, you can try to disable directory listings in FTP server settings (I'm not sure though how much that will help) - but then your client will have to know the exact file names to download the files.
Another option that might help is to create a new directory every for images every hour, so each directory won't have more than ~1000 files, and also create a top-level directories for each day, so your tree structure looks like that:
Jan 1 2010
|- 12AM
|- 01AM
|- 02AM
|-......
Jan 2 2010
|-......
Jan 3 2010
|-......
This way each directory will have a limited number of files and/or sub-directories, and shouldn't take so long to read. If your camera software can't do this kind of splitting, you may need to write scripts to do so.
Dear teddy_b,
Thank you for your patience and advice.
Yes, I try to not forget that it is only about a router.
Unfortunately, I do not have an IP camera that should handle the files in the manner you ask. And me, in this moment, the skill to write a script. But I'll dig.
Anyhow, right in this moment, with an external Pacard HDD, I count almost 30k files and everything looks great. And accessing FTP is OK. With some patience. But I understood the problem from you and just I want to know how far the thing can be pushed.
Regards
You can setup sheduled script to make archive of that pictures, this way you can leave 2-10 files in FTP, nor 12000. Goggle for that tar like scripts, setup it in sheduler at 1 hour, so all pictures moves to arhive (named as current date), and old ones deleted automatically.