lsdimm is a wrapper around dmidecode that summarises the memory population in a system in a way that's more concise than what's offered by dmidecode.
Since dmidecode requires root privileges this script requires that too;
either by running the command as root, or by using sudo. Under no
circumstances should you use this as a suid-executable; this program
has not been audited for such use, nor is it ever likely to be.
Note that this project is in an early stage of development; it has not reached its first minor version yet. While it has been tested with a variety of configurations, there are no test cases beyond the code standards checks, and it's unlikely to handle various I/O errors in a clean way.
Do not use this script in production environments.