什么是dmesg源代码?如何查找系统日志是否正常工作?
dmesg输出:
[Mon Jul 6 21:56:27 2015] 736kB, rss:156kB, swap:0kB
[Fri Feb 26 11:11:43 2016] Out of memory in UB 6547: OOM killed process 15935 (getty) score 0 vm:12736kB, rss:156kB, swap:0kB
[Fri Feb 26 11:11:43 2016] Out of memory in UB 6547: OOM killed process 5898 (python) score 0 vm:1122780kB, rss:1063096kB, swap:0kB
[Fri Feb 26 13:50:13 2016] Out of memory in UB 6547: OOM killed process 3840 (getty) score 0 vm:12736kB, rss:152kB, swap:0kB
[Fri Feb 26 13:50:13 2016] Out of memory in UB 6547: OOM killed process 3841 (getty) score 0 vm:12736kB, rss:156kB, swap:0kB
[Fri Feb 26 13:50:13 2016] Out of memory in UB 6547: OOM killed process 6502 (getty) score 0 vm:12736kB, rss:168kB, swap:0kB
[Fri Feb 26 13:50:13 2016] Out of memory in UB 6547: OOM killed process 6504 (getty) score 0 vm:12736kB, rss:220kB, swap:0kB
[Fri Feb 26 13:50:14 2016] Out of memory in UB 6547: OOM killed process 6506 (getty) score 0 vm:12736kB, rss:328kB, swap:0kB
[Fri Feb 26 13:50:14 2016] Out of memory in UB 6547: OOM killed process 6508 (getty) score 0 vm:12736kB, rss:348kB, swap:0kB
[Fri Feb 26 13:50:14 2016] Out of memory in UB 6547: OOM killed process 6491 (python) score 0 vm:993704kB, rss:934084kB, swap:0kB
[Fri Feb 26 13:51:29 2016] Out of memory in UB 6547: OOM killed process 6510 (getty) score 0 vm:12736kB, rss:276kB, swap:0kB
[Fri Feb 26 13:51:29 2016] Out of memory in UB 6547: OOM killed process 6512 (getty) score 0 vm:12736kB, rss:276kB, swap:0kB
[Fri Feb 26 13:51:29 2016] Out of memory in UB 6547: OOM killed process 6534 (getty) score 0 vm:12736kB, rss:320kB, swap:0kB
[Fri Feb 26 13:51:29 2016] Out of memory in UB 6547: OOM killed process 6536 (getty) score 0 vm:12736kB, rss:316kB, swap:0kB
[Fri Feb 26 13:51:29 2016] Out of memory in UB 6547: OOM killed process 6525 (python) score 0 vm:992252kB, rss:932812kB, swap:0kB
[Fri Feb 26 13:52:09 2016] Out of memory in UB 6547: OOM killed process 6538 (getty) score 0 vm:12736kB, rss:276kB, swap:0kB
[Fri Feb 26 13:52:09 2016] Out of memory in UB 6547: OOM killed process 6540 (getty) score 0 vm:12736kB, rss:280kB, swap:0kB
[Fri Feb 26 13:52:09 2016] Out of memory in UB 6547: OOM killed process 6576 (getty) score 0 vm:12736kB, rss:284kB, swap:0kB
[Fri Feb 26 13:52:09 2016] Out of memory in UB 6547: OOM killed process 6578 (getty) score 0 vm:12736kB, rss:360kB, swap:0kB
[Fri Feb 26 13:52:09 2016] Out of memory in UB 6547: OOM killed process 6580 (getty) score 0 vm:12736kB, rss:332kB, swap:0kB
[Fri Feb 26 13:52:09 2016] Out of memory in UB 6547: OOM killed process 6582 (getty) score 0 vm:12736kB, rss:320kB, swap:0kB
[Fri Feb 26 13:52:09 2016] Out of memory in UB 6547: OOM killed process 6584 (getty) score 0 vm:6428kB, rss:356kB, swap:0kB
[Fri Feb 26 13:52:09 2016] Out of memory in UB 6547: OOM killed process 6586 (getty) score 0 vm:6428kB, rss:440kB, swap:0kB
[Fri Feb 26 13:52:09 2016] Out of memory in UB 6547: OOM killed process 6588 (getty) score 0 vm:12736kB, rss:372kB, swap:0kB
[Fri Feb 26 13:52:09 2016] Out of memory in UB 6547: OOM killed process 6589 (getty) score 0 vm:12736kB, rss:404kB, swap:0kB
[Fri Feb 26 13:52:09 2016] OOM killer in rage, 1 tasks killed
[Fri Feb 26 13:52:09 2016] OOM killer in rage, 1 tasks killed
[Fri Feb 26 13:52:09 2016] OOM killer in rage, 1 tasks killed
[Fri Feb 26 13:52:10 2016] OOM killer in rage, 1 tasks killed
[Fri Feb 26 13:52:10 2016] Out of memory in UB 6547: OOM killed process 1126 (beam.smp) score 0 vm:2922908kB, rss:508796kB, swap:0kB
[Sun Feb 28 09:48:26 2016] Out of memory in UB 6547: OOM killed process 6593 (getty) score 0 vm:12736kB, rss:156kB, swap:0kB
[Sun Feb 28 09:48:26 2016] Out of memory in UB 6547: OOM killed process 6597 (getty) score 0 vm:12736kB, rss:148kB, swap:0kB
[Sun Feb 28 09:48:26 2016] Out of memory in UB 6547: OOM killed process 4354 (python) score 0 vm:2192548kB, rss:2056640kB, swap:0kB
[Sun Feb 28 13:57:25 2016] Out of memory in UB 6547: OOM killed process 11648 (getty) score 0 vm:12736kB, rss:160kB, swap:0kB
[Sun Feb 28 13:57:25 2016] Out of memory in UB 6547: OOM killed process 11649 (getty) score 0 vm:12736kB, rss:152kB, swap:0kB
[Sun Feb 28 13:57:25 2016] Out of memory in UB 6547: OOM killed process 6599 (cron) score 0 vm:23604kB, rss:232kB, swap:0kB
[Sun Feb 28 13:57:25 2016] Out of memory in UB 6547: OOM killed process 30284 (java) score 0 vm:3811464kB, rss:463996kB, swap:0kB
服务器时间似乎错误(2016年)一段时间(我不知道为什么),但它现在已经修复:
ali@server:~$ date
Mon Aug 31 04:14:05 EDT 2015
答案 0 :(得分:4)
什么是dmesg soruce - Dmesg读取存储在内核缓冲区中的日志log_buf。 Dmesg立即读取printk缓冲区并将其转储到shell上。
cat / proc / kmsg可用于查看日志是否存储在printk缓冲区中,该缓冲区会在存储时记录printk日志。
但是你上周试过杀戮过程并在dmesg中显示这些日志,所以我建议你检查系统的日期和时间设置。