Go to file
Heiko Carstens cad2d1ac92 lsmem: new tool
Move the s390 specific lsmem tool to util-linux.

The lsmem tool was originally written in perl and is part of the
s390-tools package which can be found here:
https://www.ibm.com/developerworks/linux/linux390/s390-tools.html

Given that the tool is architecture independent, there is no reason to
keep it in an s390 specific repository. It seems to be useful for
other architectures as well.

This patch converts the tool to C and adds it to util-linux, while the
command line options stay compatible. The only exception is the option
"-v" which used to be the short form of "--version". That got changed
to "-V" so it behaves like most other tools contained within
util-linux.

The lsmem tool inspect the contents of /sys/devices/system/memory and
prints a summary output similar to what lscpu does:

RANGE                                 SIZE STATE   REMOVABLE BLOCK
0x0000000000000000-0x000000005fffffff 1,5G online  yes       0-5
0x0000000060000000-0x000000007fffffff 512M online  no        6-7
0x0000000080000000-0x000000013fffffff   3G online  yes       8-19
0x0000000140000000-0x000000014fffffff 256M offline -         20
0x0000000150000000-0x000000017fffffff 768M online  no        21-23

Memory block size   :     256M
Total online memory :     5,8G
Total offline memory:     256M

In order to keep the output small the tool merges subsequent address
ranges where the attributes are identical. To avoid merging of line
the "-a" option can be used.

The lsmem tool also has "--extendend" and "--parsable" option which
can be used to customize the output, e.g.  limit the output to
specified columns. This is quite similar to what the lscpu tool does.

This is based on a patch from Clemens von Mann.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2016-11-09 10:02:32 +01:00
Documentation docs: update v2.29-ReleaseNotes 2016-11-08 11:34:10 +01:00
bash-completion Fix: list all block device from /dev and all symbolic links to block devices 2016-10-04 14:48:06 +02:00
config build-sys: inform gtk-doc about __ul_attribute__ 2013-03-15 14:58:08 +01:00
disk-utils fdisk: fix memleak in list_disk_geometry() 2016-10-27 11:03:16 +02:00
include lib,strutils: add strtoux[16|32|64]_or_err functions 2016-11-09 10:02:32 +01:00
lib lib,strutils: add strtoux[16|32|64]_or_err functions 2016-11-09 10:02:32 +01:00
libblkid misc: once again some printf format strings 2016-10-27 11:03:27 +02:00
libfdisk libfdisk: fix typo 2016-11-02 12:56:06 +01:00
libmount mount: append inverting options for mount.<type> on "users" 2016-10-27 15:30:20 +02:00
libsmartcols libsmartcols: make scols_sort_table() usable for trees 2016-11-02 14:39:08 +01:00
libuuid build-sys: use AC_PROG_MKDIR_P and remove a few gnuisms 2016-03-13 21:48:09 +01:00
login-utils misc: fix unsigned int usage for ctype.h functions 2016-10-26 10:13:47 +02:00
m4 build-sys: fix typo on ncurses-config command line 2016-10-20 17:30:30 +02:00
misc-utils lsblk: add note about --sort and --list relation 2016-11-02 14:47:37 +01:00
po po: merge changes 2016-11-08 11:16:52 +01:00
schedutils chrt: fix HAVE_SCHED_SETATTR fallback case 2016-10-27 11:03:21 +02:00
sys-utils lsmem: new tool 2016-11-09 10:02:32 +01:00
term-utils misc: always check setenv(3) return value 2016-08-12 21:25:36 +01:00
tests tests: let lsmod fail silently 2016-11-07 10:51:43 +01:00
text-utils misc: fix some compiler warnings 2016-10-27 11:03:24 +02:00
tools tools: make ko-release-gen usable with gpg2 2016-10-01 01:20:06 +02:00
.editorconfig add .editorconfig 2016-01-25 00:12:14 +01:00
.gitignore lsmem: new tool 2016-11-09 10:02:32 +01:00
.travis-functions.sh build-sys: improve libncursesw5 install for travis 2016-10-21 18:48:10 +02:00
.travis.yml travis: add OSX build 2016-03-13 21:51:18 +01:00
AUTHORS docs: update AUTHORS file 2016-10-19 14:30:19 +02:00
COPYING docs: corrections to FSF license files, and postal address 2012-02-24 14:13:35 +01:00
ChangeLog build-sys: use AUTOMAKE_OPTIONS = gnu 2011-05-26 15:04:01 +02:00
Makefile.am build-sys: add tools/Makemodule.am 2016-05-25 15:59:15 +02:00
NEWS build-sys: release++ (v2.29) 2016-11-08 11:35:40 +01:00
README docs: update links to http://git.kernel.org/ web repository views 2013-11-12 11:47:57 +01:00
README.licensing COPYING: fix grammar of referring phrase, and indicate location better 2013-10-08 15:38:39 +02:00
autogen.sh build-sys: fix [g]libtoolize version for OSX 2016-02-18 12:53:48 +01:00
configure.ac lsmem: new tool 2016-11-09 10:02:32 +01:00
util-linux.doap doap: fix download URL 2016-01-25 15:42:53 +01:00

README

                                  util-linux

              util-linux is a random collection of Linux utilities

     Note that in years 2006-2010 this project used the name "util-linux-ng".

MAILING LIST:

      E-MAIL: util-linux@vger.kernel.org
      URL:    http://vger.kernel.org/vger-lists.html#util-linux


DOWNLOAD:

      ftp://ftp.kernel.org/pub/linux/utils/util-linux/


SOURCE CODE:

      Web interface:
          http://git.kernel.org/cgit/utils/util-linux/util-linux.git
          https://github.com/karelzak/util-linux
      Checkout:
          git clone git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git util-linux


NLS (PO TRANSLATIONS):

      PO files are maintained by:
          http://translationproject.org/domain/util-linux.html


VERSION SCHEMA:

      Standard releases:

          <major>.<minor>[.<maint>[.<bugfix>]]

             major = fatal and deep changes
             minor = typical release with new features
             maint = maintenance releases; bug fixes only
             bugfix = unplanned releases for critical/security bugs

      Development releases:

         <major>.<minor>-rc<N>