Getting memory Info on Ubuntu

# cat /proc/meminfo | grep MemTotal
MemTotal:        4076552 kB

# top
top - 13:22:48 up 2 days,  6:00,  1 user,  load average: 0.00, 0.01, 0.05
Tasks: 130 total,   1 running, 129 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.0 us,  0.2 sy,  0.0 ni, 99.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem:   4076552 total,   598824 used,  3477728 free,   133848 buffers
KiB Swap:  5279740 total,        0 used,  5279740 free,   306816 cached

# dmidecode -t memory
<snipit>


Handle 0x000D, DMI type 16, 15 bytes
Physical Memory Array
    Location: System Board Or Motherboard
    Use: System Memory
    Error Correction Type: Single-bit ECC
    Maximum Capacity: 8 GB
    Error Information Handle: Not Provided
    Number Of Devices: 8

Handle 0x000E, DMI type 17, 27 bytes
Memory Device
    Array Handle: 0x000D
    Error Information Handle: No Error
    Total Width: 128 bits
    Data Width: 64 bits
    Size: 512 MB
    Form Factor: DIMM
    Set: 1
    Locator: DIMM 0
    Bank Locator: Bank 0
    Type: DDR2
    Type Detail: Synchronous
    Speed: Unknown
    Manufacturer: Not Specified
    Serial Number: Not Specified
    Asset Tag: Not Specified
    Part Number: Not Specified