Apache rotatelogs命令
一、简介
rotatelogs 是 Apache 自带的管道日志程序,可以完美的实现日志的轮转功能。
二、语法
Usage: rotatelogs [-v] [-l] [-L linkname] [-p prog] [-f] [-t] [-e] [-c] <logfile> {<rotation time in seconds>|<rotation size>(B|K|M|G)} [offset minutes from UTC]
Add this:
TransferLog "|rotatelogs /some/where 86400"
or
TransferLog "|rotatelogs /some/where 5M"
to httpd.conf. By default, the generated name will be
<logfile>.nnnn where nnnn is the system time at which the log
nominally starts (N.B. if using a rotation time, the time will
always be a multiple of the rotation time, so you can synchronize
cron scripts with it). If <logfile> contains strftime conversion
specifications, those will be used instead. At the end of each
rotation time or when the file size is reached a new log is
started.
Options:
-v Verbose operation. Messages are written to stderr.
-l Base rotation on local time instead of UTC.
-L path Create hard link from current log to specified path.
-p prog Run specified program after opening a new log file. See below.
-f Force opening of log on program start.
-t Truncate logfile instead of rotating, tail friendly.
-e Echo log to stdout for further processing.
-c Create log even if it is empty.
The program is invoked as "[prog] <curfile> [<prevfile>]"
where <curfile> is the filename of the newly opened logfile, and
<prevfile>, if given, is the filename of the previously used logfile.
三、实例
Apache rotatelogs命令的更多相关文章
- Mac中Apache常用命令
Apache常用命令记录,还是记一下吧,总是忘记. Apache常用命令: # sudo apachectl start // 启动Apache服务 # sudo apachectl stop // ...
- Apache htpasswd命令用法详解
一. 基础 htpasswd建立和更新存储用户名.密码的文本文件, 用于对HTTP用户的basic认证. # /usr/local/apache/bin/htpasswd –help Usage: h ...
- Apache配置命令
Apache的主配置文件: 1.DocumentRoot——指定网站的根目录 提示:该目录必须存在.目录上不能有汉字或空格. 2.DirectoryIndex (1)描述:设置网站的默认首页文件.访问 ...
- Apache apachectl命令
一.简介 apachectl命令是Apache的Web服务器前端控制工具,用以启动.关闭和重新启动Web服务器进程. 二.语法 http://www.jinbuguo.com/apache/menu2 ...
- Apache htdigest命令
一.简介 htdigest命令是Apache的Web服务器内置工具,用于创建和更新储存用户名.域和用于摘要认证的密码文件.服务器上的资源可以被限制为仅允许由htdigest建立的文件中的用户访问.使用 ...
- Apache fcgistarter命令
一.简介 fcgistarter命令用于启动FastCGI程序. 二.语法 fcgistarter -c command -p port [ -i interface ] -N num 参考:http ...
- ubuntu中安装apache ab命令进行简单压力测试
1.安装ab命令 写道 apt-get install apache2-utils 2.ab命令参数说明. 写道 Usage: ab [options] [http[s]://]hostname[:p ...
- apache管理命令
常用的 httpd.exe -k [install(安装).uninstall(卸载).start(启动).stop(停止).restart(重启)] 说明:要执行命令,需进入到apache安装目录/ ...
- Apache Flink - 命令
$flink命令位置 命令 选项 jar包位置 \ --input 输入文件位置 --out 输出文件位置 ./bin/flink run ./examples/batch/WordCount.jar ...
随机推荐
- PS基础教程[7]如何为照片瘦身
有没有对自己的身材有所抱怨,有没有想过让自己的照片便得苗条一些,其实只有你想不到的,没有我们做不到的,PS中可以很简单的将我们的身体进行美化瘦身,本次经验我们就来学习一下简单的操作. 方法 1.打卡P ...
- C# 方法、类等的默认访问修饰符
C# 方法默认访问级别 : private C# 类默认访问级别 : internal 1.命名空间下的元素的默认访问修饰符 public : 同一程序集的其他任何代码或引用该程序集的其他程序集都可以 ...
- UIActivityViewController
//UIImage *imageToShare = [UIImage imageNamed:@"iosshare.jpg"]; //NSURL *urlToShare = [NSU ...
- matlab滤波器的设计
求出濾波器的階數以及 3dB 截止頻率後,可用相應的 Matlab 函數計算出實現傳遞函數的分子分母係數來.巴特沃斯型濾波器是通帶內最大平坦.帶外單調下降型的,其計算命令是:[b,a] = butte ...
- Oracle GoldenGate理论
1Oracle GoldenGate处理方法和支持的数据库Oracle GoldenGate在多样和异构的基础IT平台中,可以在事务级别上进行数据交换和数据操作.在保证交易完整性和最小的开销的条件下, ...
- bzoj 4319 cerc2008 Suffix reconstruction——贪心构造
题目:https://www.lydsy.com/JudgeOnline/problem.php?id=4319 如果字符集有 5e5 那么大的话,挨个填上去就行了.但只有26个字符,所以要贪心地尽量 ...
- python学习之logging
学习地址:http://blog.csdn.net/zyz511919766/article/details/25136485 首先如果我们想简要的打印出日志,可以: import logging l ...
- flask 之 mongodb
查看mongod 是否启动,启动了会显示进程ID和程序名 pgrep mongod -l 查找mongod的位置whereis mongod 或locate mongod 启动mongodmongod ...
- RecyclerView(滚动控件)的用法
1.首先在build.gradle中添加依赖库 compile 'com.android.support:recyclerview-v7:24.2.1' 2.修改activity_main.xml & ...
- php排序集合
如果你已经使用了一段时间PHP的话,那么,你应该已经对它的数组比较熟悉了——这种数据结构允许你在单个变量中存储多个值,并且可以把它们作为一个集合进行操作. 经常,开发人员发现在PHP中使用这种数据结构 ...