码迷,mamicode.com
首页 > 其他好文 > 详细

Developers, do consider different user roles! - A bad experience with cron

时间:2014-07-02 14:30:13      阅读:317      评论:0      收藏:0      [点我收藏+]

标签:des   style   http   strong   os   linux   

The Story:

Last week, I found one of our embedded arm linux device  ran out of flash space( totally only 128M for apps and OS).

After checking for a while, I found that test app created too many files which occupied the major flash space. 

But after deeper checking, also found that cron log file( /var/cron/log) also ocuppied more than 10M space.

I looked at cron‘s source code and saw that there‘s a macro definition(LOG_FILE) to decide logging to /var/cron/log or not.

And we‘re using "angstrom-distribution" which provides pre-compiled .ipk packages, we were not aware that this macro was openned while compiling.

 

The Thoughts:

Firstly, It‘s our requirement  analysis and testing problem that didn‘t check carefully if there‘re potential disk space eaters.

And I really think that it can be better that in original cron developers‘ mind that software package end users  and package providers are different user roles.  

And it‘s better to aware that different users‘ pain points maybe very different like some doesn‘t care about 10M disk usage while some cares a lot.

If considered these factors, they mostly would consider to provide end users a dynamic way to configure logging behavior.

(Btw, good to see that in latest ubuntu distribution,  /etc/default/cron file allow user to define environment variables to control this.)

 

Further readings:

What is cron: http://en.wikipedia.org/wiki/Cron

Cron source code( didn‘t find angstrom‘s but ubuntu‘s) :  https://launchpad.net/ubuntu/+source/cron/3.0pl1-120ubuntu3

 

 

Developers, do consider different user roles! - A bad experience with cron,布布扣,bubuko.com

Developers, do consider different user roles! - A bad experience with cron

标签:des   style   http   strong   os   linux   

原文地址:http://www.cnblogs.com/lifen/p/DifferentUserRoles.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!