How do you determine the amount of system memory?

Michael ODonnell michael.odonnell at comcast.net
Wed Jul 16 16:04:02 EDT 2008



> it might be enough to compare with the output of free(1)


According to an strace I just ran on "free":

	.
	.
	.
open("/proc/meminfo", O_RDONLY)         = 3
lseek(3, 0, SEEK_SET)                   = 0
read(3, "MemTotal:      2010264 kB\nMemFre"..., 1023) = 728
	.
	.
	.

...so free probably won't help if /proc/meminfo is b0rken.
 


More information about the gnhlug-discuss mailing list