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 ...
随机推荐
- 数据结构之最小生成树Kruskal算法
1. 克鲁斯卡算法介绍 克鲁斯卡尔(Kruskal)算法,是用来求加权连通图的最小生成树的算法. 基本思想:按照权值从小到大的顺序选择n-1条边,并保证这n-1条边不构成回路. 具体做法:首先构造一个 ...
- Servlet中的Filter(过滤器)
Filter,过滤器,是处于客户端与服务器资源文件之间的一道过滤网,在访问资源文件之前,通过一系列的过滤器对请求进行修改.判断等,把不符合规则的请求在中途拦截或修改.也可以对响应进行过滤,拦截或修改 ...
- Fragment详解及举例
1.为什么用Fragment(Android3.0提出)来替代TabActivity(Android4.0以后正式被弃用)? 因为Fragment可以适应各种不同屏幕大小,也就是适应不同屏幕的分辨率. ...
- Sapnco3 RfcTable Structure
RfcTable 中字段 并不固定,以下内容仅供参考 1. 包含IDOC的 RfcTable SDATA字段值为IDOC数据,解析IDOC数据需依据IDOC字段长度对SDATA进行截取 functio ...
- 【2】基于zookeeper,quartz,rocketMQ实现集群化定时系统
<一>项目结构图 (1)ZK协调分配 ===>集群中的每一个定时服务器与zookeeper交互,由集群中的master节点进行任务划分,并将划分结果分配给集群中的各个服务器节点. = ...
- CoreDNS kubernetes 安装使用
kubernetes 以前是skydns 后面变为 dnsmasq,coredns 也是一个不错的工具 1. 准备环境 安装 kubernetes 配置 kubelet 的cluster-dns 2 ...
- Spring AOP声明式事务异常回滚
近日测试用例,发现这样一个现象:在业务代码中,有如下两种情况,比如:throw new RuntimeException("xxxxxxxxxxxx"); 事物回滚throw ne ...
- Windows下安装Object C开发环境,及Hello Word(转)
Windows下安装Object C开发环境,及Hello Word 最近想学习iphone开发,但是由于没有c基础,只有java基础.所以先从基础学习,首先是搭建环境,目前手头没有mac机子,只能先 ...
- eclipse配置storm1.1.0开发环境并本地跑起来
storm的开发环境搭建比hadoop(参见前文http://www.cnblogs.com/wuxun1997/p/6849878.html)简单,无需安装插件,只需新建一个java项目并配置好li ...
- java多线程的练习------------。加深
总结:线程的理解不够.还不够 package com.aa; public class MyThread implements Runnable {// 我们可以继承一个Thread.但是我们可以实现 ...