Browsing the archives for the 日志 tag

mysqlbinlog:处理mysql binlog二进制日志文件的实用工具

in mysql

服务器生成的二进制日志文件写成二进制格式。要想检查这些文本格式的文件,应使用mysqlbinlog实用工具。 应这样调用mysqlbinlog: shell> mysqlbinlog [options] log-files… 例如,要想显示二进制日志binlog.000003的内容,使用下面的命令: shell> mysqlbinlog binlog.0000003 输出包括在binlog.000003中包含的所有语句,以及其它信息例如每个语句花费的时间、客户发出的线程ID、发出线程时的时间戳等等。 通常情况,可以使用mysqlbinlog直接读取二进制日志文件并将它们用于本地MySQL服务器。也可以使用–read-from-remote-server选项从远程服务器读取二进制日志。 当读取远程二进制日志时,可以通过连接参数选项来指示如何连接服务器,但它们经常被忽略掉,除非你还指定了–read-from-remote-server选项。这些选项是–host、–password、–port、–protocol、–socket和–user。

0 Comments

Kloxo关闭日志和网站统计

in 服务器类

Filesystem Size Used Avail Use% Mounted on /dev/simfs 50G 47G 3.1G 94% / 官方说法: Every day, if the log file’s size is larger than 50MB, they are moved into the client’s home directory. If you set the remove_processed_logs as true, then instead of moving, they will be deleted. Your main statistics calculation will not be [...]

0 Comments

mysql-log-filter

in mysql

官方地址:http://code.google.com/p/mysql-log-filter/ ¶ The script filters the MySQL Slow Query Log to show queries which impacted performance most and is intended to be used by DB admins and application developers. The log file is analyzed and processed as a stream, line after line, so there is no need to load the whole log file into memory. [...]

0 Comments

5种mysql日志分析工具比拼

in mysql

mysql slow log 是用来记录执行时间较长(超过long_query_time秒)的sql的一种日志工具. 启用 slow log 有两种启用方式: 1, 在my.cnf 里 通过 log-slow-queries[=file_name] 2, 在mysqld进程启动时,指定–log-slow-queries[=file_name]选项 比较的五款常用工具 mysqldumpslow, mysqlsla, myprofi, mysql-explain-slow-log, mysqllogfilter mysqldumpslow, mysql官方提供的慢查询日志分析工具. 输出图表如下: 主要功能是, 统计不同慢sql的 出现次数(Count), 执行最长时间(Time),

0 Comments

MYSQL开启错误日志的方法

in mysql

mysql有以下几种日志: 错误日志:   -log-err 查询日志:   -log 慢查询日志:     -log-slow-queries 更新日志:     -log-update 二进制日志:   -log-bin 在mysql的安装目录下,打开my.ini,在后面加上上面的参数,保存后重启mysql服务就行了。 例如: #Enter   a   name   for   the   binary   log.   Otherwise   a   default   name   will   be   used. #log-bin= #Enter   a   name   for   the   query   log   file.   Otherwise   a   default   name   will   be   used. #log= #Enter   a   name   for   the   error   log   file.   Otherwise   a   default   [...]

0 Comments

如何查看FreeBSD的系统日志

in 服务器类

由于FreeBSD是一个多用 户系统,那么就需要管理员进行日常维护,特别是用做网络服务器的系统,一旦因为缺乏维护而造成停机故障,就会造成很大损失。即使对于单用户的 FreeBSD系统,同样也要执行这些不可缺乏的维护任务,只是由于系统归个人使用,那么对维护的要求就不必那么高,维护任务就轻松一些。

系统日志

系统的日志记录提供了对系统活动的详细审计,这些日志用于评估、审查系统的运行环境和各种操作。对于一般情况,日志记录包括记录用户登录时间、登录地点、进行什么操作等内容,如果使用得当,日志记录能向系统管理员提供有关危害安全的侵害或入侵试图等非常有用的信息。

0 Comments

mysqlbinlog:用于处理二进制日志文件的实用工具

in mysql

服务器生成的二进制日志文件写成二进制格式。要想检查这些文本格式的文件,应使用mysqlbinlog实用工具。

应这样调用mysqlbinlog:

shell> mysqlbinlog [options] log-files…

例如,要想显示二进制日志binlog.000003的内容,使用下面的命令:

shell> mysqlbinlog binlog.0000003
输出包括在binlog.000003中包含的所有语句,以及其它信息例如每个语句花费的时间、客户发出的线程ID、发出线程时的时间戳等等。

通常情况,可以使用mysqlbinlog直接读取二进制日志文件并将它们用于本地MySQL服务器。也可以使用–read-from-remote-server选项从远程服务器读取二进制日志。

当读取远程二进制日志时,可以通过连接参数选项来指示如何连接服务器,但它们经常被忽略掉,除非你还指定了–read-from-remote-server选项。这些选项是–host、–password、–port、–protocol、–socket和–user。

0 Comments

安装awstats来分析apache的访问日志

in 服务器类

AWStats: Advanced Web Statistics

AWStats是在Sourceforge上发展很快的一个基于Perl的WEB日志分析工具。相对于另外一个非常优秀的开放源代码的日志分析工具Webalizer,AWStats的优势在于:

0 Comments