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的更多相关文章
- JavaScript 代码简洁之道
摘要: 可以说是<Clean Code>的JS代码示例了,值得参考. 原文:JavaScript 代码简洁之道 作者:缪宇 Fundebug经授权转载,版权归原作者所有. 测试代码质量的唯 ...
- JavaScript 风格指南
来源于: https://github.com/alivebao/clean-code-js 目录 介绍 变量 函数 对象和数据结构 类 测试 并发 错误处理 格式化 注释 介绍 作者根据 Rober ...
- Top15的golang学习资源网站
We decided to ask the Go expert and CTO at QArea’s, Maksim Kuharenko, to share his personal list of ...
- JS编程规范指南
原文:github.com/ryanmcdermott/clean-code-javascript 说明:本文翻译自 github 上的一个项目,只取部分精华. 一.变量 用有意义且常用的单词命名 / ...
- Clean Code of JavaScript
Clean Code of JavaScript 代码简洁之道 JavaScript 版 https://github.com/ryanmcdermott/clean-code-javascript ...
- Apple Developer Program Roles Overview
Apple Developer Program Roles Overview There are three roles that can be assigned to Apple Developer ...
- eclipse ide for java ee developers 开发环境搭建(j2ee)
转载自:http://www.iteye.com/topic/982182 真的是一片很不错的文章啊! 使用eclipse真的有年头了,相信java程序员没有不知道它的,最近在给团队中新来的应届生做指 ...
- eclipseIDE for javaee developers 开发环境搭建详解图文
使用eclipse真的有年头了,相信java程序员没有不知道它的,最近在给团队中新来的应届生做指导,专门讲解了一下Eclipse开发环境的搭建过程,一是帮助他们尽快的熟悉IDE的使用,二也是保证团队开 ...
- 转载:Practical UML™: A Hands-On Introduction for Developers
原文:http://edn.embarcadero.com/article/31863 By: Randy Miller Abstract: This tutorial provides a quic ...
随机推荐
- Segger RTT : Real Time Terminal SRAM 调试解决方法
http://segger.com/jlink-real-time-terminal.html Real Time Terminal SEGGER's Real Time Terminal (RTT) ...
- word wrap 解惑
源起 我们经常需要“修复”一个老生常谈的“bug”,那就是文本的自动换行问题.在专业术语上,这种期望得到的渲染现象被称作“word wrap”,即文本处理器有能力把超出页边的整个词自动传到下一行. 在 ...
- 一次JQuery性能优化实战
同事写了段JQuey的代码,在某些机器上,会出现IE假死的性能问题. 我测试了一下代码花费的时间,在我的机器上,会花费600多毫秒,但在某些机器上会花费6秒多(10倍的增长),这样就导致了IE的假死. ...
- 12个非常不错的免费HTML后台管理模板
下面介绍的这些免费后端管理HTML模板,都非常不错.建议您收藏. 1. Charisma Admin Template (示例) Charisma是一个响应式管理模板,基于Twitter Boots ...
- Codeforces Gym 100231B Intervals 线段树+二分+贪心
Intervals 题目连接: http://codeforces.com/gym/100231/attachments Description 给你n个区间,告诉你每个区间内都有ci个数 然后你需要 ...
- .NET正则基础——.NET正则类及方法应用
1 概述 初学正则时,对于Regex类不熟悉,遇到问题不知道该用哪种方法解决,本文结合一些正则应用的典型应用场景,介绍一下Regex类的基本应用.这里重点进行.NET类的介绍,对于正则的 ...
- 模拟log4j获取日志对象调用所在的类名、方法名及行号
当我们在记录日志时,每个类中会定义一个日志对象,然后利用这个对象去写日志,那么我们在处理日志时,如何能才能记录日志对象所在的类.方法和行号呢?log4j中已经实现了该功能,那么它是怎么实现的呢? 其实 ...
- Android 开发之异常处理篇(一):SDK Manager 闪退的解决方法
这个问题困扰了我很久,之前没解决,就放一放.后来我又专门拿了一个下午来找解决方法,终于搞定! 我的解决方法是修改 android.bat,直接指定java.exe所在位置,不用去调用find_java ...
- Http网络通信--网络图片查看
1.要在andorid中实现网络图片查看,涉及到用户隐私问题,所以要在AndroidManifest.xml中添加访问网络权限 <uses-permission android:name=&qu ...
- Android自定义长按事件
Android系统自带了长按事件,setOnLongClickListener即可监听.但是有时候,你不希望用系统的长按事件,比如当希望长按的时间更长一点的时候.这时候就需要自己来定义这个长按事件了. ...