2016年7月26日星期二

proc的pc里面,注释里面不要放引号

比如
// if zhangshan's xxx
这样的注释,编译老报莫名其妙的错误
PCC-S-02010, found end-of-file while scanning string literal
Error at line 0, column 0 in file transtp1.pc
PCC-F-02102, Fatal error while doing C preprocessing

2016年7月11日星期一

rhel dmesg加上时间

http://gabrieleg.altervista.org/enabling-timestamps-for-dmesg-kernel-ring-buffer/

临时的,只需要执行
echo Y > /sys/module/printk/parameters/time
就可以
永久的,
可以修改/boot/grub/grub.conf
追加上printk.time=1,注意等号两边不要与空格。

这样dmesg的前面就有了Unix Timestamp,要转换为我们可以读取的,还需要转换一下。
https://linuxaria.com/article/how-to-make-dmesg-timestamp-human-readable
https://gist.github.com/saghul/542780