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

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

时间: 2024-10-07 10:09:46

Developers, do consider different user roles! - A bad experience with cron的相关文章

编写简洁的 JavaScript 代码

作者:尹锋链接:https://www.zhihu.com/question/20635785/answer/223515216来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出处. 避免使用 js 糟粕和鸡肋 这些年来,随着 HTML5 和 Node.js 的发展,JavaScript 在各个领域遍地开花,已经从"世界上最被误解的语言"变成了"世界上最流行的语言".但是由于历史原因,JavaScript 语言设计中还是有一些糟粕和鸡肋,比如

代码整洁之道——2、函数

一.函数参数(两个或者更少) 限制函数的参数至关重要,因为这样测试函数会更简单.有超过三个以上的参数,测试的时候就要使用不同参数测无数的场景. 一个或者两个参数是理想情况.如果可能的话避免三个参数.三个以上的参数应该杜绝.通常,如果有两个以上的参数,说明这个函数做的太多了.大多数情况下,一个高质量的对象就足够充当一个参数了,当你发现你需要多个参数的时候,你可以使用一个对象来代替. 可以用ES6解构赋值,使函数期望的参数清晰化.这样做有几个好处: 1.他人阅读的时候,一下子就看明白了使用了哪些属性

Apple Developer Program Roles Overview

Apple Developer Program Roles Overview There are three roles that can be assigned to Apple Developer Program members: Team Agent, admin, or member. These roles are used to assign certain responsibilities to a developer, such as accepting program agre

eclipseIDE for javaee developers 开发环境搭建详解图文

使用eclipse真的有年头了,相信java程序员没有不知道它的,最近在给团队中新来的应届生做指导,专门讲解了一下Eclipse开发环境的搭建过程,一是帮助他们尽快的熟悉IDE的使用,二也是保证团队开发环境的一致性(顺便说一下,这点在敏捷开发团队中尤为重要,方便知识传播,提升团队快速响应能力). 培训的过程中想起了自己当年初涉java时的情景,不免感慨万千啊.正所谓"工欲善其事必先利其器",话不多说,赶紧搭吧. 本文主要介绍在windows下搭建eclipse环境的过程,主要包括jdk

[转]:What happens to older developers?

原文链接可能失效. This post is old but will remain on the front page for the time being. 140313. Jeff Jenkins posted these questions and others recently at Ask Hacker News: What happens to older developers? Is there a plateau in pay? Is there a drop in pay s

Ansible自动化部署之ROLES

一.ROLES 角色 1.目录层级结构 2.角色调用 3.层级结构展示 示例1:利用ansible角色安装nginx 示例2:变量调用 示例3:在playbook调用角色方法:传递变量给角色 示例4:条件测试角色调用 示例5:角色安装 示例6:角色变量调整memcached内存大小 一.ROLES 角色 对于以上所有的方式有个弊端就是无法实现复用假设在同时部署Web.db.ha 时或不同服务器组合不同的应用就需要写多个yml文件.很难实现灵活的调用.. roles 用于层次性.结构化地组织pla

Ansible的roles功能(五)

针对大型项目使用Roles进行编排,更便利 目录结构编排 一键安装httpd并提供服务 创建目录结构 [[email protected] ansible]# mkdir -p roles/httpd/{tasks,files,vars} [[email protected] ansible]# cd roles/httpd/tasks [[email protected] roles]#touch httpd/{files/main.yml,tasks/{groupadd.yml,instal

3.3 playbook roles

ansible role ansilbe自1.2版本引入的新特性,用于层次性.结构化地组织playbook; roles能够根据层次型结构自动装载变量文件.tasks以及handlers等.要使用roles只需要在playbook中使用include指令即可. 简单来讲,roles就是通过分别将变量.文件.任务.模块及处理器放置于单独的目录中,并可以便捷地include它们的一种机制.角色一般用于基于主机构建服务的场景中,但也可以是用于构建守护进程等场景中. #创建role的步骤 (1) 创建以

100 high quality blogs from java developers

This list collects 100 high quality blogs from Java developers from all over the world. Some of these blogs may not be written by Java developers, but at least Java developers should find it useful or interesting. Reading those blogs should be fun an