免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
1234下一页
最近访问板块 发新帖
查看: 12601 | 回复: 34
打印 上一主题 下一主题

高手帮忙看看这个错误是什么意思 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-06-27 12:07 |只看该作者 |倒序浏览
20可用积分
远程登陆系统后提示如下:
Last login: Mon Jun 25 04:24:19 2007 from ×.×.×.×

-bash: /bin/egrep: Cannot allocate memory

-bash: /bin/egrep: Cannot allocate memory

-bash: /bin/egrep: Cannot allocate memory

-bash: /bin/egrep: Cannot allocate memory

[ 本帖最后由 ideovo 于 2007-6-27 13:58 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2007-06-27 14:42 |只看该作者
您有太多的进程在运行或者内存不够。
如果能够登录,请将以下三个命令的执行结果贴出来,再进一步分析原因:
ps -ef | wc -l
ulimit -a
free -m

如果不能登录,那么就是进程过多,或则内存耗尽(包括虚拟内存)。

论坛徽章:
0
3 [报告]
发表于 2007-06-27 15:29 |只看该作者
[root@p04-tt ~]# ps -ef | wc -l
70
[root@p04-tt ~]# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
file size               (blocks, -f) unlimited
pending signals                 (-i) 1024
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 45056
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
[root@p04-tt ~]# free -m
             total       used       free     shared    buffers     cached
Mem:          3930        597       3333          0         60        421
-/+ buffers/cache:        114       3816
Swap:         1027          0       1027

论坛徽章:
0
4 [报告]
发表于 2007-06-27 15:30 |只看该作者
[root@p04-tt /]# ls
-bash: /bin/ls: Cannot allocate memory

论坛徽章:
0
5 [报告]
发表于 2007-06-27 15:44 |只看该作者
楼主如果能登陆上去把下边两个命令执行结果也贴出来吧
vmstat 2 5
top

论坛徽章:
0
6 [报告]
发表于 2007-06-27 17:16 |只看该作者
[root@p04-tt ~]# vmstat 2 5
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id wa
0  0      0 3413584  61992 431960    0    0     1     2   34    20  0  0 100  0
0  0      0 3413584  61992 431960    0    0     0     0 1007    36  0  0 100  0
0  0      0 3413584  61992 431960    0    0     0     0 1007    38  0  0 100  0
0  0      0 3413584  61992 431960    0    0     0    20 1006    44  0  0 100  0
0  0      0 3413584  61992 431960    0    0     0     0 1011    37  0  0 100  0

论坛徽章:
0
7 [报告]
发表于 2007-06-27 17:17 |只看该作者
top - 17:16:05 up 5 days, 20:20,  1 user,  load average: 0.00, 0.00, 0.00
Tasks:  68 total,   1 running,  67 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0% us,  0.0% sy,  0.0% ni, 100.0% id,  0.0% wa,  0.0% hi,  0.0% si
Mem:   4025340k total,   611832k used,  3413508k free,    61992k buffers
Swap:  1052248k total,        0k used,  1052248k free,   431960k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                               
    1 root      16   0  4748  524  440 S    0  0.0   0:00.85 init                                                                  
    2 root      RT   0     0    0    0 S    0  0.0   0:00.11 migration/0                                                            
    3 root      34  19     0    0    0 S    0  0.0   0:00.00 ksoftirqd/0                                                            
    4 root      RT   0     0    0    0 S    0  0.0   0:00.07 migration/1                                                            
    5 root      34  19     0    0    0 S    0  0.0   0:00.01 ksoftirqd/1                                                            
    6 root       5 -10     0    0    0 S    0  0.0   0:00.27 events/0                                                               
    7 root       5 -10     0    0    0 S    0  0.0   0:00.01 events/1                                                               
    8 root       5 -10     0    0    0 S    0  0.0   0:00.00 khelper                                                               
    9 root      15 -10     0    0    0 S    0  0.0   0:00.00 kacpid                                                                 
   51 root       5 -10     0    0    0 S    0  0.0   0:00.00 kblockd/0                                                              
   52 root       5 -10     0    0    0 S    0  0.0   0:00.00 kblockd/1                                                              
   53 root      15   0     0    0    0 S    0  0.0   0:00.00 khubd                                                                  
   76 root      15   0     0    0    0 S    0  0.0   0:00.26 pdflush                                                               
   77 root      15   0     0    0    0 S    0  0.0   0:00.16 pdflush                                                               
   79 root      11 -10     0    0    0 S    0  0.0   0:00.00 aio/0                                                                  
   80 root       5 -10     0    0    0 S    0  0.0   0:00.00 aio/1                                                                  
   78 root      15   0     0    0    0 S    0  0.0   0:00.38 kswapd0                                                               
  224 root      21   0     0    0    0 S    0  0.0   0:00.00 kseriod                                                               
  331 root      21   0     0    0    0 S    0  0.0   0:00.00 scsi_eh_0                                                              
  344 root       5 -10     0    0    0 S    0  0.0   0:00.00 ata/0                                                                  
  345 root       7 -10     0    0    0 S    0  0.0   0:00.00 ata/1                                                                  
  349 root      20   0     0    0    0 S    0  0.0   0:00.00 scsi_eh_1                                                              
  350 root      21   0     0    0    0 S    0  0.0   0:00.00 scsi_eh_2                                                              
  360 root      15   0     0    0    0 S    0  0.0   0:02.19 kjournald                                                              
1567 root       6 -10  3604  500  404 S    0  0.0   0:00.00 udevd                                                                  
1936 root       6 -10     0    0    0 S    0  0.0   0:00.00 kauditd                                                               
2017 root       7 -10     0    0    0 S    0  0.0   0:00.00 kmirrord                                                               
2036 root      19   0     0    0    0 S    0  0.0   0:00.00 kjournald                                                              
2037 root      19   0     0    0    0 S    0  0.0   0:00.00 kjournald                                                              
2765 root      16   0  3628  564  452 S    0  0.0   0:02.01 syslogd                                                               
2769 root      16   0  2536  376  300 S    0  0.0   0:00.00 klogd                                                                  
2779 root      16   0  2548  304  204 S    0  0.0   0:00.00 irqbalance                                                            
2797 rpc       16   0  4748  576  456 S    0  0.0   0:00.00 portmap                                                               
2816 root      16   0  7956  828  688 S    0  0.0   0:00.00 rpc.statd                                                              
2844 root      16   0 20916  648  288 S    0  0.0   0:00.00 rpc.idmapd                                                            
2924 root      19   0  2536  488  400 S    0  0.0   0:00.00 acpid                                                                  
2981 root      16   0 21920 1264  856 S    0  0.0   0:02.24 sshd                                                                  
3008 root      16   0  8712  848  672 S    0  0.0   0:00.79 xinetd                                                                 
3027 root      16   0 36040 2480 1004 S    0  0.1   0:00.00 sendmail                                                               
3035 smmsp     16   0 28840 1916  832 S    0  0.0   0:00.00 sendmail

论坛徽章:
0
8 [报告]
发表于 2007-06-28 11:12 |只看该作者
根据楼主贴出的几个系统状态来看:
(1)进程没有受到限制。 (2)内存足够使用(呵呵,而且错绰绰有余)。 (3)有的程序能够执行(系统已经正常启动,并且在运行ps,top,free等程序时没有任何错误提示)。(4)在执行某些程序时有错误提示,例如egrep,ls

初步估计,两种可能性比较大:(1)物理内存的某些单元损坏。(2)在64位的系统上执行32位的程序?或者在32位的系统上执行64位程序?总之很大的可能性是64位与32位的库相混合。呵呵,不太确定,还望高手指点,关注中。如果楼主自己查出原因,望共享。

另外,如果可以的话,希望楼主将以下几个命令的结果帖出来,让别人再帮助分析一下:
uname -a
file /bin/bash
file /bin/ls

论坛徽章:
0
9 [报告]
发表于 2007-06-28 11:18 |只看该作者
原帖由 ideovo 于 2007-6-27 15:30 发表于 4楼  
# ls
-bash: /bin/ls: Cannot allocate memory



你是不是中飙了??
看看 rpm -qfV /bin/ls 结果吧
要不就试试
rpm -qaV

论坛徽章:
0
10 [报告]
发表于 2007-06-28 11:36 |只看该作者
哈哈,楼主,你把该贴的都贴出来算了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP