每天学习一点点

时间:2021-05-09 05:13:08

Java线程在linux实现

  • Java线程在Linux中为进程
  • top -Hp [pid] 查看Java线程
  • pstack [pid] 查看线程的系统调用
  • pstree -a [pid] 或者 pstree -c [pid] 查看线程的父子关系

AWK

正则表达式语法

awk --re-interval '{match($0,/{"appver":"(.*)","time":(.*),"uid":(.*),"usercode":(.*),"eventId":"(.*)"}/,a) ;print a[1]"\x001"a[2]"\x001"a[3]"\x001"a[4]"\x001"a[5]}'

常用函数

awk -F ',' '/":/{gsub("uid == null logger get rmd ","",$5);split($5,a,"&");sub("uid=","",a[1]);sub("usercode=","",a[2]);sub("title=","",a[3]);sub("subtitle=","",a[
#4]
);sub("=","",a[5]); print $1"\x001"a[1]"\x001"a[2]"\x001"a[3]"\x001"a[4]"\x001"a[5]}'