Datasheet

“main” (Installation and Administration) 2004/6/25 13:29 page 714 #740
i
i
i
i
i
i
i
i
28.8 Memory Usage: free
The utility free examines RAM usage. Details of both free and used mem-
ory (and swap areas) are shown:
$ free
total used free shared buffers cached
Mem: 514736 273964 240772 0 35920 42328
-/+ buffers/cache: 195716 319020
Swap: 1794736 104096 1690640
With -m, have all sizes expressed in megabytes:
$ free -m
total used free shared buffers cached
Mem: 502 267 235 0 35 41
-/+ buffers/cache: 191 311
Swap: 1752 101 1651
The really interesting information is contained in this line:
-/+ buffers/cache: 191 311
It calculates the amount of memory taken up with buffers and caches.
The parameter -d hdelayi ensures that the display is refreshed every
hdelayi seconds. For example, free -d 1.5 produces an update every
1.5 seconds.
28.9 Kernel Ring Buffer: dmesg
The Linux kernel keeps certain messages in a ring buffer. To view these
messages, enter the command dmesg:
$ dmesg
[...]
sdc : READ CAPACITY failed.
sdc : status = 1, message = 00, host = 0, driver = 08
Info fld=0xa00 (nonstd), Current sd00:00: sense key Not Ready
sdc : block size assumed to be 512 bytes, disk size 1GB.
sdc: test WP failed, assume Write Enabled
sdc: I/O error: dev 08:20, sector 0
I/O error: dev 08:20, sector 0
I/O error: dev 08:20, sector 2097144
714
28.8. Memory Usage: free