Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-02-2012, 04:15 AM
|
#1
|
LQ Newbie
Registered: Nov 2011
Distribution: WindRiver, RedHat
Posts: 17
Rep: 
|
Low memory problem
Hi All,
The rootfs on my target is present on the ramdisk, but the memory of my target is very low (64M). Now, when I FTP to my target and try to copy a new file to it, the total free memory gets used up, and my target becomes non-responsive and restarts after few seconds.
The users for my target use WinSCP to copy files to it.
Is there any way so that I can restrict the FTP transfer if there is less memory on my board?
Thanks in advance,
Mantis
|
|
|
04-02-2012, 02:14 PM
|
#2
|
Senior Member
Registered: Apr 2009
Posts: 1,901
Rep: 
|
Is there another storage except RAM, such as flash, on your target?
|
|
|
04-03-2012, 12:40 AM
|
#3
|
LQ Newbie
Registered: Nov 2011
Distribution: WindRiver, RedHat
Posts: 17
Original Poster
Rep: 
|
Hi nini,
Thanks for the reply.
Yes, there is a compact flash for permanent storage on my board. But the problem is, the files have to be copied to /tmp on my target which is a tmpfs.
Mantis
Last edited by PrayingMantis; 04-03-2012 at 12:41 AM.
|
|
|
04-03-2012, 06:02 AM
|
#4
|
Member
Registered: Nov 2010
Location: Thailand
Distribution: Fedora 12, Ubuntu 10.10
Posts: 167
Rep:
|
If you platform supports it, you could try to setup quotas: http://www.yolinux.com/TUTORIALS/Lin...ialQuotas.html.
If the quota is exceeded the FTP server should return 553 Disk full - please upload later.
|
|
|
04-04-2012, 03:14 AM
|
#5
|
LQ Newbie
Registered: Nov 2011
Distribution: WindRiver, RedHat
Posts: 17
Original Poster
Rep: 
|
Hi cnxsoft,
I could use disk and memory quotas for my users but I think I may face the following problem - Any user of the admin group and start an ftp upload into tmpfs. So, if I have set the memory quota for each user to be (say) 8M, and I'm already running low on memory (<4M for eg), a new user of the same group can login at this point and start the upload, thinking he still can use 8M of the physical memory.
Or is it that, if the minimum quota allocated for a user is not present, he will be denied login?
|
|
|
04-04-2012, 02:27 PM
|
#6
|
Senior Member
Registered: Apr 2009
Posts: 1,901
Rep: 
|
If your new file is very big, it is better to save in flash instead of ramdisk. FTP can save file in anywhere you want. The tmpfs is for small and temporary file.
|
|
|
04-04-2012, 11:20 PM
|
#7
|
Member
Registered: Nov 2010
Location: Thailand
Distribution: Fedora 12, Ubuntu 10.10
Posts: 167
Rep:
|
Hi PrayingMantis,
I'm not sure about the details, I just gave some ideas, you'd have to try if you want to use quotas. Another solution could be to modify the code of your FTP server (or should I say ssh daemon since your users use winscp) to prevent the issue, e.g. check the free space + size of current downloads before starting downloading a new file.
Having said that, mini09 is right: it's a probably better idea to save your files in flash instead.
The only reason to do what you want to do would be to have another binary program which looks for files in /tmp.
|
|
|
All times are GMT -5. The time now is 04:38 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|