dmesg时间转换工具
来源:互联网 发布:域名续费怎么收费 编辑:程序博客网 时间:2024/03/28 18:13
最近在排查一个core问题,对dmesg的时间戳,做了一个转化工具:ts_dmesg.sh
借助awk 和shell实现:
#!/bin/shuptime_ts=`cat /proc/uptime | awk '{ print $1}'`#echo $uptime_tsdmesg | awk -v uptime_ts=$uptime_ts 'BEGIN { now_ts = systime(); start_ts = now_ts - uptime_ts; #print "system start time seconds:", start_ts; #print "system start time:", strftime("[%Y/%m/%d %H:%M:%S]", start_ts); }{ print strftime("[%Y/%m/%d %H:%M:%S]", start_ts + substr($1, 2, length($1) - 2)), $0}'
关于dmesg的原始时间戳,是系统的产生mesg的系统uptime时间,故需要获取系统的启动时间;
关于系统uptime时间:
/proc/uptime详解
0 0
- dmesg时间转换工具
- dmesg时间转换工具
- dmesg 时间转换
- linux 时间戳转换/dmesg 时间转换
- linux 时间戳转换/dmesg 时间转换
- 查看dmesg中的时间
- JSON时间转换工具
- 时间转换工具类
- 时间转换工具
- 时间转换工具类
- 时间转换工具类
- 最近在排查一个core问题,对dmesg的时间戳,做了一个转化工具
- dmesg
- dmesg
- dmesg
- dmesg
- dmesg
- dmesg
- Gridpanel符合条件的行有颜色
- python程序编译成exe文件
- libmad编译移植到A20
- P29 (**) Compose arbitrarily many procedures of one argument.
- 警告: A docBase inside the host appBase has been specified, and will be ignore2
- dmesg时间转换工具
- ubuntu 寝室拨号上网以及在家上网
- LeetCode24. Swap Nodes in Pairs简单到一次性通过
- 重构的七宗罪
- RecyclerView完全解析,让你从此爱上它(二十八)
- 大话设计模式-单例模式
- Python Redis数据结构服务器
- 闪屏页,持续三秒自动进入主页面
- Oracle初学者需要知道的常用数据表如EMP、DEPT、SALGRADE等是如何操作的?图解操作