⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 status.awk

📁 这是国外的resip协议栈
💻 AWK
字号:
# $Id: status.awk,v 10.5 2004/09/24 00:43:17 bostic Exp $## Read through db_printlog output and list all the transactions encountered# and whether they committed or aborted.## 1 = started# 2 = committed# 3 = explicitly aborted# 4 = otherBEGIN {	cur_txn = 0}/^\[/{	in_regop = 0	if (status[$5] == 0) {		status[$5] = 1;		txns[cur_txn] = $5;		cur_txn++;	}}/	child:/ {	txnid = substr($2, 3);	status[txnid] = 2;}/txn_regop/ {	txnid = $5	in_regop = 1}/opcode:/ {	if (in_regop == 1) {		if ($2 == 1)			status[txnid] = 2		else if ($2 == 3)			status[txnid] = 3		else			status[txnid] = 4	}}END {	for (i = 0; i < cur_txn; i++) {		if (status[txns[i]] == 1)			printf("%s\tABORT\n", txns[i]);		else if (status[txns[i]] == 2)			printf("%s\tCOMMIT\n", txns[i]);		else if (status[txns[i]] == 3)			printf("%s\tABORT\n", txns[i]);		else if (status[txns[i]] == 4)			printf("%s\tOTHER\n", txns[i]);	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -