查看哪个进程被杀死: grep -i ‘killed process’ /var/log/messages 或者 dmesg | grep -i ‘killed process’
dmesg vs /var/log/messages
两者都是用于记录系统消息的,dmesg是内存缓存的消息,超过大小会丢弃,所以要及时查看;messages里是syslog-ng写进去的,写的内容依赖于其配置/etc/syslog-ng/conf.d,持久化到文件;
total-vm、anon-rss和file-rss含义:
As I understand, the size of the virtual memory that a process uses is listed as “total-vm”. Part of it is really mapped into the RAM itself (allocated and used). This is “RSS”. Part of the RSS is allocated in real memory blocks (other than mapped into a file or device). This is anonymous memory (“anon-rss”) and there is also RSS memory blocks that are mapped into devices and files (“file-rss”).
So, if you open a huge file in vim, the file-rss would be high, on the other side, if you malloc() a lot of memory and really use it, your anon-rss would be high also. On the other side, if you allocate a lot of space (with malloc()), but nevers use it, the total-vm would be higher, but no real memory would be used (due to the memory overcommit), so, the rss values would be low.
查看操作用户:
首先根据dmesg找出占用非法内存的进程,然后找出启动该进程的UID,执行grep UID /etc/password找出该用户;
本文发布于:2024-02-02 04:49:40,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170682059041463.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |