- 论坛徽章:
- 2
|
本帖最后由 djzhangxing 于 2015-09-03 14:54 编辑
Linux中敲dmesg第一列默认输出的时间是时间戳格式,需要date转换才能得到正常时间,第一列的时间戳手动转换命令是
date -d "1970-01-01 UTC `echo "$(date +%s)-$(cat /proc/uptime|cut -f 1 -d' ')+1.360552"|bc ` seconds"
红色的数字就是dmesg第一列,每一行都手动,太麻烦了,如何全部全换了,让每一行都转后在打印。
- [root@new55 ~]# dmesg | grep ttyS*
- [ 1.360552] s5pv210-uart.0: ttySAC0 at MMIO 0xe2900000 (irq = 16) is a S3C6400/10
- [ 1.373853] s5pv210-uart.1: ttySAC1 at MMIO 0xe2900400 (irq = 20) is a S3C6400/10
- [ 1.388846] s5pv210-uart.2: ttySAC2 at MMIO 0xe2900800 (irq = 24) is a S3C6400/10
- [ 1.403845] s5pv210-uart.3: ttySAC3 at MMIO 0xe2900c00 (irq = 28) is a S3C6400/10
复制代码 |
|