Reported by Claudio Martella
this is what i get:
junior:~# dd if=/dev/cdrom of=/dev/null
dd: opening `/dev/cdrom': Cannot allocate memory
junior:~# strace dd if=/dev/hdc of=/dev/null bs=1024
execve("/bin/dd", ["dd", "if=/dev/hdc", "of=/dev/null",
"bs=1024"], [/*
31 vars */]) = 0
uname({sys="Linux", node="junior", ...}) = 0
brk(0) = 0x804fcd8
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No
such file or
directory)
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No
such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=57835, ...}) = 0
old_mmap(NULL, 57835, PROT_READ, MAP_PRIVATE, 3, 0) =
0x40012000
close(3) = 0
open("/lib/libc.so.6", O_RDONLY) = 3
read(3,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@Z\1\000"...,
1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=1109900,
...}) = 0
old_mmap(NULL, 1122692, PROT_READ|PROT_EXEC,
MAP_PRIVATE, 3, 0) =
0x40021000
mprotect(0x4012a000, 37252, PROT_NONE) = 0
old_mmap(0x4012a000, 20480, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED,
3, 0x109000) = 0x4012a000
old_mmap(0x4012f000, 16772, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4012f000
close(3) = 0
open("/lib/libc.so.6", O_RDONLY) = 3
read(3,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@Z\1\000"...,
1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=1109900,
...}) = 0
old_mmap(NULL, 1122692, PROT_READ|PROT_EXEC,
MAP_PRIVATE, 3, 0) =
0x40021000
mprotect(0x4012a000, 37252, PROT_NONE) = 0
old_mmap(0x4012a000, 20480, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED,
3, 0x109000) = 0x4012a000
old_mmap(0x4012f000, 16772, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4012f000
close(3) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40134000
munmap(0x40012000, 57835) = 0
brk(0) = 0x804fcd8
brk(0x8050cd8) = 0x8050cd8
brk(0x8051000) = 0x8051000
close(0) = 0
open("/dev/hdc", O_RDONLY|O_LARGEFILE) = -1 ENOMEM
(Cannot allocate
memory)
write(2, "dd: ", 4dd: ) = 4
write(2, "opening `/dev/hdc\'", 18opening `/dev/hdc')
= 18
write(2, ": Cannot allocate memory", 24: Cannot
allocate memory) = 24
write(2, "\n", 1
) = 1
_exit(1) = ?
junior:~# free
total used free shared
buffers
cached
Mem: 126508 117052 9456
0
5796 55684
-/+ buffers/cache: 55572 70936
Swap: 151192 78200 72992
junior:~# cat /proc/meminfo
total: used: free: shared: buffers: cached:
Mem: 129544192 125943808 3600384 0
7217152 69705728
Swap: 154820608 78082048 76738560
MemTotal: 126508 kB
MemFree: 3516 kB
MemShared: 0 kB
Buffers: 7048 kB
Cached: 56000 kB
CCacheAlloc: 14952 kB
CCacheUsed: 4162504 kB
SwapCached: 12072 kB
Active: 64032 kB
Inactive: 33272 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 126508 kB
LowFree: 3516 kB
SwapTotal: 151192 kB
SwapFree: 74940 kB
junior:~# uname -a
Linux junior 2.4.19-ck10 #2 Tue Oct 15 14:31:43 CEST
2002 i686 unknown
unknown GNU/Linux
junior:/usr/src# cat /proc/comp_cache_*
compressed cache - fragmentation histogram (free space
x fragmented space)
total <1000 -2000 -3000 -4000 -5000
-6000 -7000 -8000 8192
1 - 400: 1639 1522 91 22 4 0 0
0 0 0
401 - 800: 118 111 7 0 0 0 0
0 0 0
801 - 1200: 64 62 2 0 0 0 0
0 0 0
1201 - 1600: 30 29 0 0 0 1 0
0 0 0
1601 - 2000: 19 19 0 0 0 0 0
0 0 0
2001 - 2400: 9 9 0 0 0 0 0
0 0 0
2401 - 2800: 3 3 0 0 0 0 0
0 0 0
2801 - 3200: 0 0 0 0 0 0 0
0 0 0
3201 - 3600: 1 1 0 0 0 0 0
0 0 0
3601 - 4000: 0 0 0 0 0 0 0
0 0 0
4001 - 4400: 0 0 0 0 0 0 0
0 0 0
4401 - 4800: 0 0 0 0 0 0 0
0 0 0
4801 - 5200: 0 0 0 0 0 0 0
0 0 0
5201 - 5600: 0 0 0 0 0 0 0
0 0 0
5601 - 6000: 0 0 0 0 0 0 0
0 0 0
6001 - 6400: 0 0 0 0 0 0 0
0 0 0
6401 - 6800: 0 0 0 0 0 0 0
0 0 0
6801 - 7200: 0 0 0 0 0 0 0
0 0 0
7201 - 7600: 0 0 0 0 0 0 0
0 0 0
7601 - 8000: 0 0 0 0 0 0 0
0 0 0
8001 - 8192: 0 0 0 0 0 0 0
0 0 0
compressed cache - free space histogram (free space x
number of fragments)
total 0f 1f 2f 3f 4f
5f 6f more
total 9149 act 3743 pages 3774
0: 4 0 0 1 0 2
1 0 0
1 - 400: 1639 0 0 2 210 575
404 235 213
401 - 800: 118 0 0 1 28 34
27 14 14
801 - 1200: 64 0 0 3 19 19
14 3 6
1201 - 1600: 30 0 0 3 7 13
3 3 1
1601 - 2000: 19 0 0 1 6 7
3 2 0
2001 - 2400: 9 0 0 0 3 6
0 0 0
2401 - 2800: 3 0 0 0 1 1
1 0 0
2801 - 3200: 0 0 0 0 0 0
0 0 0
3201 - 3600: 1 0 0 0 1 0
0 0 0
3601 - 4000: 0 0 0 0 0 0
0 0 0
4001 - 4400: 0 0 0 0 0 0
0 0 0
4401 - 4800: 0 0 0 0 0 0
0 0 0
4801 - 5200: 0 0 0 0 0 0
0 0 0
5201 - 5600: 0 0 0 0 0 0
0 0 0
5601 - 6000: 0 0 0 0 0 0
0 0 0
6001 - 6400: 0 0 0 0 0 0
0 0 0
6401 - 6800: 0 0 0 0 0 0
0 0 0
6801 - 7200: 0 0 0 0 0 0
0 0 0
7201 - 7600: 0 0 0 0 0 0
0 0 0
7601 - 8000: 0 0 0 0 0 0
0 0 0
8001 - 8192: 0 0 0 0 0 0
0 0 0
compressed cache - statistics
general
- (S) swap cache support enabled
- (P) page cache support enabled
- compressed swap support enabled
- maximum used size: 16384 KiB
- comp page size: 8 KiB
- failed allocations: 742
algorithm LZO
- (C) compressed pages: 4134129 (S: 3% P: 96%)
- (D) decompressed pages: 1059944 (S: 8% P: 91%)
D/C: 25%
- (R) read pages: 1012456 (S: 2% P: 97%)
R/C: 24%
- (W) written pages: 55168 (S: 100% P: 0%)
W/C: 1%
compression ratio: 51% (S: 32% P: 51%)
junior:/usr/src# vmstat
procs memory swap
io system cpu
r b w swpd free buff cache si so bi
bo in cs us sy id
0 0 0 76240 3388 7816 53404 0 0 5
17 16 20 1 0 99
junior:/usr/src# uptime
12:10:33 up 20 days, 22:18, 4 users, load average:
0.10, 0.10, 0.09
after a reboot everything was fine.