CentOS 6.x资源不可用解决办法

 时间:2024-10-13 07:09:45

1、用root用户登录,su - user时提示su: cannot set user id: Resource temporarily unavailable,无法愉桴狁焕进行切换用户,检查cat /etc/security/limits.conf * soft nofile 32768 * hard nofile 65536* soft nproc unlimited* hard nproc unlimited* hard core unlimited* soft core unlimited没有问题 检查系统核心参数cat /etc/sysctl.conf 也没有发现问题

2、接着检查用root用户登录 执行ulimit -acore file size (blocks, -c) unlimiteddata seg size (kbyt髫潋啜缅es, -d) unlimitedscheduling priority (-e) 0file size (blocks, -f) unlimitedpending signals (-i) 1032143max locked memory (kbytes, -l) 64max memory size (kbytes, -m) unlimitedopen files (-n) 32768pipe size (512 bytes, -p) 8POSIX message queues (bytes, -q) 819200real-time priority (-r) 0stack size (kbytes, -s) 10240cpu time (seconds, -t) unlimitedmax user processes (-u) unlimitedvirtual memory (kbytes, -v) unlimitedfile locks (-x) unlimited也没有问题执行ps -ef | grep -v grep | grep username | wc -l和 lsof| grep -v grep | grep username | wc -l 发现数字都不大 没有超出限制top一下 各项都正常

3、无奈 ps -ef | grep username kill -9 pid 干掉一些用户进程,临时登陆进来 执行ulimit -a 发现 max user processes是1024 我晕 怎么没改掉 root用户是没问题的

4、最后在/etc/security/发现有limits.d个目录,好奇之下进去看到有个名为90-nproc.conf的文件 cat一看# Default limit for number of user's processes to prevent# accidental fork bombs.# See rhbz #432903 for reasoning.* soft nproc 1024root soft nproc unlimited呵呵 问题找到了 原来在这里有限制 把那行注释掉重新登陆就可以了

  • oracle q‘转义字符用法
  • win10系统资源管理器经常未响应
  • 用批处理怎么打开局域网电脑的执行程序
  • win7升级补丁怎么获取?
  • Debian source.list详解
  • 热门搜索
    健康知识手抄报图片 讲卫生手抄报内容 文明用餐手抄报 手抄报边框大全 民族传统文化手抄报 感恩节手抄报图片大全 中华美德手抄报 古诗配画手抄报 放飞梦想手抄报图画 垃圾分类手抄报资料