db2diag.log 详解
db2diag命令,是用来查看db2数据库运行日志信息的,实际上,db2运行日志是记录在db2diag.log文件中,可以 通过此文件,查看记录的有关DB2数据库详细的错误信息,而db2diag只是查看该日志文件的一个小工具而已。db2数据库在运行过程中如果经常有报错的话,这个文件增长的会很快,需要定期清理,备份移走或者删除,通常有两种方法:
可以通过执行db2 get dbm cfg 来查看Diagnostic data directory path(DIAGPATH) 参数的设置。
1、使用db2diag工具,直接执行命令db2diag -A /db2diagbak (备份至/db2diagbak ,使用db2diag -h查看db2diag帮助),系统会自动移走db2diag.log并将备份的文件名添加上当前日期时间信息。
2、直接备份,在db2停止运行的情况下,将db2diag.log文件备份至其他文件系统,该文件删除后在db2启动后会自动重建。
附录:
$db2diag -h
db2diag - The db2diag.log Analysis Tool
db2diag is a tool for filtering and formatting the db2diag.log file
Command syntax:
.------------. .--------------.
V | V |
>>--db2diag--+------------+--+--------------+--><
| | | |
--option-- --filename--
Command parameters:
filename - one or more space-separated path names of diagnostic logs
-help , -h , ? - help information. To get help on help, try "db2diag -h h"
-filter , -g - case-sensitive search for a list of field-pattern pairs
-gi - case-insensitive search for a list of field-pattern pairs
-gv - case-sensitive invert matching
-gvi , -giv - case-insensitive invert matching
-invert , -v - invert the sense of matching for all filtering options
-exist - record field must exist in order to be processed
-pid - find all records for a list of process IDs
-tid - find all records for a list of thread IDs
-eduid - find all records for a list of EDU IDs
-node , -n - find all records for a list of nodes
-error , -e - find all records for a list of errors
-level , -l - find all records for a list of severity levels
-history, -H - display the history of logged records for a time interval
-time , -t - display all the records within a particular time interval
-count , -c - display a count of matching records
-verbose, -V - display all record fields whether they contain data or not
-strict - display records using one "field: value" pair per line
-cbe - display records in the Common Base Event (CBE) format
-fmt - format tool's output using a format string
-output , -o - save output into a file
-follow , -f - continuously display appended records as the file grows
-archive, -A - archive a diagnostic log file
-readfile - read from a file ignoring terminal input (used in scripts)
-rc - display descriptions of DB2 error return codes, ZRC or ECF
-ecfid - display function info extracted from the numeric ECF ID
-facility, -fac - display messages from a particular facility
"db2diag -h <option1[,option2[,option3...]]>" - displays additional help and
usage examples for one or more options specified in the options list
"db2diag -h brief" - displays help for all options without examples
"db2diag -h examples" - displays a few typical examples to get started
"db2diag -h tutorial" - displays more advanced examples covering all features
"db2diag -h notes" - displays usage notes and restrictions that apply
"db2diag -h all" - displays help in the most complete form with detailed
information about all options and usage examples
db2diag.log 详解相关推荐
- javascript教程:console.log 详解
对应WEB程序员,console.log 可以说是神器,极大地方便了程序开发.程序猿:学习了,用Console写日志比alert方便多了. console.log(object[, object, . ...
- Android之----Log详解(Log.v,Log.d,Log.i,Log.w,Log.e)
Android Log是 android.util.Log 类 常用的方法有以下5个: Log.v () -- VERBOSE Log.d () -- DEBUG Log.i () -- INFO L ...
- tf.log()详解
tf.log(y) 计算元素 y 的自然对数, y=ex 计算出x 返回一个张量,与 y 具有相同的类型. tensor = tf.constant([[1.0,2.0,3.0],[1.0,2.0,3 ...
- JS--Console.log()详解
对于JavaScript程序的调试,相比于alert(),使用console.log()是一种更好的方式,原因在于:alert()函数会阻断JavaScript程序的执行,从而造成副作用:而conso ...
- git log 详解
git log 可以让我们查看提交commit history,接下来我们来一起探索git log提供的参数. $ git log commit 0005d1e3f54b79fe4707fbccc44 ...
- console.log详解
console.log方法用于在控制台输出信息.它可以接受一个或多个参数,将它们连接起来输出. console.log('Hello World') // Hello World console.lo ...
- Mysql的undo log详解
一.简介 redo log是事务持久性的保证,undo log是事务原子性的保证.在事务中更新数据的前置操作其实是要先写入一个undo log. 二.作用 1.用于数据的回滚.比如数据执行时候发生错误 ...
- 你所不知道的console.log()(console.log详解)
console.log,作为一个前端开发者,想必每天都会用它来做分析调试,但这个简单函数背后你所不知道的一面,很多人未必使用过,有一些也是很方便使用的 基础 首先,简单科普这个函数的作用.前端开发者可 ...
- Linux下log详解
日志文件的默认路径是:/var/log 下面是日志文件的路径及其包含的信息: /var/log/syslog:它和/etc/log/messages日志文件不同,它只记录警告信息,常常是系统出问题的信 ...
最新文章
- java list_Java集合-List
- 电感发出声音怎么解决_开关电源有“声音”可以这样解决-电源啸叫解决方案...
- 【OpenCV3】棋盘格角点检测与绘制——cv::findChessboardCorners()与cv::drawChessboardCorners()详解
- 借助axios的拦截器实现Vue.js中登陆状态校验的思路
- OpenCASCADE绘制测试线束:数据交换命令之XDE 图层命令
- echart实现3d地图_3D飞线效果——让线“飞”起来的秘密
- html 再按一次退出,【劲爆、独家】拦截再按一次退出应用,改成单击back隐藏到后台...
- 【专栏精选】Unity中的HTTP网络通信
- 机器学习三个部分:输入、算法、输出 资料收集
- ***_ha_高可用_链路备份
- 【字符编码系列】字符,字符集,字符编码解惑
- 软件测试优秀员工发言稿,2018软件测试国赛获奖感言|2018年优秀员工获奖感言
- 24 - 面向对象1
- Kunbernetes——二进制单节点部署
- 数字化赋能三农 农行、邮储如何保“质”更保“智”?
- solidworks2014方程式添加全局变量存在句法错误的解决方案
- jQuery append( ) 方法
- F-散度(F-divergence)
- android 图片空白,图片显示上下有空白的解决办法
- butter滤波器是iir吗_MATLAB IIR滤波器设计函数buttord与butter
热门文章
- Matlab求常微分方程组的数值解
- Android强制在主线程进行网络请求
- 真武三国java_2010年CPU第三季手机游戏风云榜TOP10名单
- git rebase的两种用法(最全)
- torch-fidelity 简便计算FID,ISC,KID,PPL
- 73. 使用自定义 Query 实现 SAP UI5 页面路由的书签功能
- abap SY-INDEX SY-TABIX
- 关于下载JDK需要注册账号
- 微信群活码以及微信活码防封如何实现技术分享
- 腾讯云服务器支持,腾讯云服务器能拿来干嘛(可以做的事情很多)