linux 系统内存检测;

如果系统内存使用过高 就会产生 out of memory exception 内存不足异常现象;

通常 在mongo 默认服务运行资源是不受限制的、也会占用而同一系统运行的其他服务;

当消耗整个系统资源时、也会导致系统杀死其他服务使用内存。

查看系统内存占用得排序:

#!/bin/bash
for proc in $(find /proc -maxdepth 1 -regex '/proc/[0-9]+'); do
    printf "%2d %5d %s\n" \
        "$(cat $proc/oom_score)" \
        "$(basename $proc)" \
        "$(cat $proc/cmdline | tr '\0' ' ' | head -c 50)"
done 2>/dev/null | sort -nr | head -n 30

 

相关文章:

  • 2021-11-15
  • 2021-10-16
  • 2021-11-15
  • 2021-10-16
  • 2021-11-05
  • 2021-06-10
猜你喜欢
  • 2021-06-17
  • 2022-01-17
  • 2022-12-23
  • 2021-11-05
  • 2022-12-23
  • 2022-12-23
  • 2021-09-14
相关资源
相似解决方案