https://launchpad.net/ubuntu/+source/libgtop2/2.38.0-2ubuntu0.18.04.1/+build/14822017 RUN: /usr/share/launchpad-buildd/slavebin/slave-prep Forking launchpad-buildd slave process... Kernel version: Linux bos02-s390x-014 4.4.0-122-generic #146-Ubuntu SMP Mon Apr 23 15:33:03 UTC 2018 s390x Buildd toolchain package versions: launchpad-buildd_161 python-lpbuildd_161 sbuild_0.67.0-2ubuntu7.1 bzr-builder_0.7.3+bzr174~ppa13~ubuntu14.10.1 bzr_2.7.0-2ubuntu3.1 git-build-recipe_0.3.4~git201611291343.dcee459~ubuntu16.04.1 git_1:2.7.4-0ubuntu1.3 dpkg-dev_1.18.4ubuntu1.4 python-debian_0.1.27ubuntu2. Syncing the system clock with the buildd NTP service... 3 May 19:18:48 ntpdate[1758]: adjust time server 10.211.37.1 offset 0.015590 sec RUN: /usr/share/launchpad-buildd/slavebin/in-target unpack-chroot --backend=chroot --series=bionic --arch=s390x PACKAGEBUILD-14822017 /home/buildd/filecache-default/17124f3eec304530bbb077109f97da7d4ad52147 Creating target for build PACKAGEBUILD-14822017 RUN: /usr/share/launchpad-buildd/slavebin/in-target mount-chroot --backend=chroot --series=bionic --arch=s390x PACKAGEBUILD-14822017 Starting target for build PACKAGEBUILD-14822017 RUN: /usr/share/launchpad-buildd/slavebin/in-target override-sources-list --backend=chroot --series=bionic --arch=s390x PACKAGEBUILD-14822017 'deb http://ftpmaster.internal/ubuntu bionic main universe' 'deb http://ftpmaster.internal/ubuntu bionic-security main universe' 'deb http://ftpmaster.internal/ubuntu bionic-updates main universe' 'deb http://ftpmaster.internal/ubuntu bionic-proposed main universe' Overriding sources.list in build-PACKAGEBUILD-14822017 RUN: /usr/share/launchpad-buildd/slavebin/in-target update-debian-chroot --backend=chroot --series=bionic --arch=s390x PACKAGEBUILD-14822017 Updating target for build PACKAGEBUILD-14822017 Get:1 http://ftpmaster.internal/ubuntu bionic InRelease [242 kB] Get:2 http://ftpmaster.internal/ubuntu bionic-security InRelease [69.9 kB] Get:3 http://ftpmaster.internal/ubuntu bionic-updates InRelease [65.4 kB] Get:4 http://ftpmaster.internal/ubuntu bionic-proposed InRelease [242 kB] Get:5 http://ftpmaster.internal/ubuntu bionic/main s390x Packages [943 kB] Get:6 http://ftpmaster.internal/ubuntu bionic/main Translation-en [516 kB] Get:7 http://ftpmaster.internal/ubuntu bionic/universe s390x Packages [8175 kB] Get:8 http://ftpmaster.internal/ubuntu bionic/universe Translation-en [4941 kB] Get:9 http://ftpmaster.internal/ubuntu bionic-security/main s390x Packages [8488 B] Get:10 http://ftpmaster.internal/ubuntu bionic-security/main Translation-en [3352 B] Get:11 http://ftpmaster.internal/ubuntu bionic-security/universe s390x Packages [2168 B] Get:12 http://ftpmaster.internal/ubuntu bionic-security/universe Translation-en [1644 B] Get:13 http://ftpmaster.internal/ubuntu bionic-updates/main s390x Packages [8488 B] Get:14 http://ftpmaster.internal/ubuntu bionic-updates/main Translation-en [3352 B] Get:15 http://ftpmaster.internal/ubuntu bionic-updates/universe s390x Packages [2924 B] Get:16 http://ftpmaster.internal/ubuntu bionic-updates/universe Translation-en [2008 B] Get:17 http://ftpmaster.internal/ubuntu bionic-proposed/main s390x Packages [6508 B] Get:18 http://ftpmaster.internal/ubuntu bionic-proposed/main Translation-en [5464 B] Get:19 http://ftpmaster.internal/ubuntu bionic-proposed/universe s390x Packages [1128 B] Get:20 http://ftpmaster.internal/ubuntu bionic-proposed/universe Translation-en [616 B] Fetched 15.2 MB in 3s (4656 kB/s) Reading package lists... Reading package lists... Building dependency tree... Reading state information... Calculating upgrade... The following packages will be upgraded: linux-libc-dev 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 1002 kB of archives. After this operation, 0 B of additional disk space will be used. Get:1 http://ftpmaster.internal/ubuntu bionic-proposed/main s390x linux-libc-dev s390x 4.15.0-21.22 [1002 kB] debconf: delaying package configuration, since apt-utils is not installed Fetched 1002 kB in 0s (27.2 MB/s) (Reading database ... 12382 files and directories currently installed.) Preparing to unpack .../linux-libc-dev_4.15.0-21.22_s390x.deb ... Unpacking linux-libc-dev:s390x (4.15.0-21.22) over (4.15.0-20.21) ... Setting up linux-libc-dev:s390x (4.15.0-21.22) ... RUN: /usr/share/launchpad-buildd/slavebin/sbuild-package PACKAGEBUILD-14822017 s390x bionic-proposed -c chroot:build-PACKAGEBUILD-14822017 --arch=s390x --dist=bionic-proposed --nolog libgtop2_2.38.0-2ubuntu0.18.04.1.dsc Initiating build PACKAGEBUILD-14822017 with 4 jobs across 4 processor cores. Kernel reported to sbuild: 4.4.0-122-generic #146-Ubuntu SMP Mon Apr 23 15:33:03 UTC 2018 s390x sbuild (Debian sbuild) 0.67.0 (26 Dec 2015) on bos02-s390x-014.buildd +==============================================================================+ | libgtop2 2.38.0-2ubuntu0.18.04.1 (s390x) 03 May 2018 19:18 | +==============================================================================+ Package: libgtop2 Version: 2.38.0-2ubuntu0.18.04.1 Source Version: 2.38.0-2ubuntu0.18.04.1 Distribution: bionic-proposed Machine Architecture: s390x Host Architecture: s390x Build Architecture: s390x I: NOTICE: Log filtering will replace 'build/libgtop2-K1m6hS/libgtop2-2.38.0' with '<>' I: NOTICE: Log filtering will replace 'build/libgtop2-K1m6hS' with '<>' I: NOTICE: Log filtering will replace 'home/buildd/build-PACKAGEBUILD-14822017/chroot-autobuild' with '<>' +------------------------------------------------------------------------------+ | Fetch source files | +------------------------------------------------------------------------------+ Local sources ------------- libgtop2_2.38.0-2ubuntu0.18.04.1.dsc exists in .; copying to chroot Check architectures ------------------- Check dependencies ------------------ Merged Build-Depends: build-essential, fakeroot Filtered Build-Depends: build-essential, fakeroot dpkg-deb: building package 'sbuild-build-depends-core-dummy' in '/<>/resolver-BN84HD/apt_archive/sbuild-build-depends-core-dummy.deb'. Ign:1 copy:/<>/resolver-BN84HD/apt_archive ./ InRelease Get:2 copy:/<>/resolver-BN84HD/apt_archive ./ Release [2119 B] Ign:3 copy:/<>/resolver-BN84HD/apt_archive ./ Release.gpg Get:4 copy:/<>/resolver-BN84HD/apt_archive ./ Sources [214 B] Get:5 copy:/<>/resolver-BN84HD/apt_archive ./ Packages [527 B] Fetched 2860 B in 0s (0 B/s) Reading package lists... Reading package lists... +------------------------------------------------------------------------------+ | Install core build dependencies (apt-based resolver) | +------------------------------------------------------------------------------+ Installing build dependencies Reading package lists... Building dependency tree... Reading state information... The following NEW packages will be installed: sbuild-build-depends-core-dummy 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 852 B of archives. After this operation, 0 B of additional disk space will be used. Get:1 copy:/<>/resolver-BN84HD/apt_archive ./ sbuild-build-depends-core-dummy 0.invalid.0 [852 B] debconf: delaying package configuration, since apt-utils is not installed Fetched 852 B in 0s (0 B/s) Selecting previously unselected package sbuild-build-depends-core-dummy. (Reading database ... 12382 files and directories currently installed.) Preparing to unpack .../sbuild-build-depends-core-dummy_0.invalid.0_s390x.deb ... Unpacking sbuild-build-depends-core-dummy (0.invalid.0) ... Setting up sbuild-build-depends-core-dummy (0.invalid.0) ... Merged Build-Depends: debhelper (>= 11), gettext, pkg-config, libxau-dev, libglib2.0-dev (>= 2.6.0), gnome-pkg-tools (>= 0.10), texinfo, libxt-dev, gtk-doc-tools (>= 1.4), gobject-introspection (>= 0.6.7), libgirepository1.0-dev (>= 0.10.7-1~) Filtered Build-Depends: debhelper (>= 11), gettext, pkg-config, libxau-dev, libglib2.0-dev (>= 2.6.0), gnome-pkg-tools (>= 0.10), texinfo, libxt-dev, gtk-doc-tools (>= 1.4), gobject-introspection (>= 0.6.7), libgirepository1.0-dev (>= 0.10.7-1~) dpkg-deb: building package 'sbuild-build-depends-libgtop2-dummy' in '/<>/resolver-gme7iw/apt_archive/sbuild-build-depends-libgtop2-dummy.deb'. Ign:1 copy:/<>/resolver-gme7iw/apt_archive ./ InRelease Get:2 copy:/<>/resolver-gme7iw/apt_archive ./ Release [2119 B] Ign:3 copy:/<>/resolver-gme7iw/apt_archive ./ Release.gpg Get:4 copy:/<>/resolver-gme7iw/apt_archive ./ Sources [353 B] Get:5 copy:/<>/resolver-gme7iw/apt_archive ./ Packages [641 B] Fetched 3113 B in 0s (0 B/s) Reading package lists... Reading package lists... +------------------------------------------------------------------------------+ | Install libgtop2 build dependencies (apt-based resolver) | +------------------------------------------------------------------------------+ Installing build dependencies Reading package lists... Building dependency tree... Reading state information... The following additional packages will be installed: autoconf automake autopoint autotools-dev bsdmainutils debhelper dh-autoreconf dh-strip-nondeterminism dh-translations docbook docbook-to-man docbook-xml docbook-xsl file fontconfig fontconfig-config fonts-dejavu-core gettext gettext-base gir1.2-freedesktop gir1.2-gdkpixbuf-2.0 gir1.2-glib-2.0 gir1.2-rsvg-2.0 gnome-pkg-tools gobject-introspection groff-base gtk-doc-tools highlight highlight-common intltool intltool-debian jq libarchive-zip-perl libbsd0 libcairo-gobject2 libcairo2 libcroco3 libdatrie1 libelf1 libencode-locale-perl libexpat1 libffi-dev libfile-listing-perl libfile-stripnondeterminism-perl libfile-which-perl libfontconfig1 libfreetype6 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgirepository-1.0-1 libgirepository1.0-dev libglib2.0-0 libglib2.0-bin libglib2.0-data libglib2.0-dev libglib2.0-dev-bin libgraphite2-3 libharfbuzz0b libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libice-dev libice6 libicu60 libio-html-perl libio-socket-ssl-perl libjbig0 libjpeg-turbo8 libjpeg8 libjq1 liblua5.2-0 liblwp-mediatypes-perl liblwp-protocol-https-perl libmagic-mgc libmagic1 libmpdec2 libnet-http-perl libnet-ssleay-perl libonig4 libosp5 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libpipeline1 libpixman-1-0 libpthread-stubs0-dev libpython-stdlib libpython2.7-minimal libpython2.7-stdlib libpython3-stdlib libpython3.6-minimal libpython3.6-stdlib librsvg2-2 libsigsegv2 libsm-dev libsm6 libtext-unidecode-perl libthai-data libthai0 libtiff5 libtimedate-perl libtool libtry-tiny-perl liburi-perl libwww-perl libwww-robotrules-perl libx11-6 libx11-data libx11-dev libxau-dev libxau6 libxcb-render0 libxcb-shm0 libxcb1 libxcb1-dev libxdmcp-dev libxdmcp6 libxext6 libxml-libxml-perl libxml-namespacesupport-perl libxml-parser-perl libxml-sax-base-perl libxml-sax-perl libxml2 libxrender1 libxslt1.1 libxt-dev libxt6 m4 man-db mime-support netbase opensp perl-openssl-defaults pkg-config po-debconf python python-funcsigs python-minimal python-mock python-pbr python-pkg-resources python-six python2.7 python2.7-minimal python3 python3-cairo python3-distutils python3-gi python3-gi-cairo python3-lib2to3 python3-mako python3-markupsafe python3-minimal python3-pkg-resources python3-scour python3-six python3.6 python3.6-minimal scour sgml-base sgml-data shared-mime-info tex-common texinfo ucf x11-common x11proto-core-dev x11proto-dev xml-core xorg-sgml-doctools xsltproc xtrans-dev zlib1g-dev Suggested packages: autoconf-archive gnu-standards autoconf-doc wamerican | wordlist whois vacation dh-make dwz docbook-defguide docbook-dsssl psgml dbtoepub docbook-xsl-doc-html | docbook-xsl-doc-pdf | docbook-xsl-doc-text | docbook-xsl-doc docbook-xsl-saxon fop libsaxon-java libxalan2-java libxslthl-java xalan gettext-doc libasprintf-dev libgettextpo-dev groff dblatex libgirepository1.0-doc libglib2.0-doc libdata-dump-perl libice-doc libcrypt-ssleay-perl librsvg2-bin libsm-doc libtool-doc gfortran | fortran95-compiler gcj-jdk libauthen-ntlm-perl libxcb-doc libxt-doc m4-doc apparmor less www-browser doc-base libmail-box-perl python-doc python-tk python-funcsigs-doc python-mock-doc python-setuptools python2.7-doc binfmt-support python3-doc python3-tk python3-venv python3-beaker python-mako-doc python3-setuptools python3.6-venv python3.6-doc sgml-base-doc perlsgml w3-recs libxml2-utils texlive-base texlive-latex-base texlive-generic-recommended texinfo-doc-nonfree texlive-fonts-recommended Recommended packages: curl | wget | lynx git-buildpackage libarchive-cpio-perl libgdk-pixbuf2.0-bin xdg-user-dirs libhtml-format-perl librsvg2-common libltdl-dev libdata-dump-perl libhtml-form-perl libhttp-daemon-perl libmailtools-perl libx11-doc libxml-sax-expat-perl libmail-sendmail-perl The following NEW packages will be installed: autoconf automake autopoint autotools-dev bsdmainutils debhelper dh-autoreconf dh-strip-nondeterminism dh-translations docbook docbook-to-man docbook-xml docbook-xsl file fontconfig fontconfig-config fonts-dejavu-core gettext gettext-base gir1.2-freedesktop gir1.2-gdkpixbuf-2.0 gir1.2-glib-2.0 gir1.2-rsvg-2.0 gnome-pkg-tools gobject-introspection groff-base gtk-doc-tools highlight highlight-common intltool intltool-debian jq libarchive-zip-perl libbsd0 libcairo-gobject2 libcairo2 libcroco3 libdatrie1 libelf1 libencode-locale-perl libexpat1 libffi-dev libfile-listing-perl libfile-stripnondeterminism-perl libfile-which-perl libfontconfig1 libfreetype6 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgirepository-1.0-1 libgirepository1.0-dev libglib2.0-0 libglib2.0-bin libglib2.0-data libglib2.0-dev libglib2.0-dev-bin libgraphite2-3 libharfbuzz0b libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libice-dev libice6 libicu60 libio-html-perl libio-socket-ssl-perl libjbig0 libjpeg-turbo8 libjpeg8 libjq1 liblua5.2-0 liblwp-mediatypes-perl liblwp-protocol-https-perl libmagic-mgc libmagic1 libmpdec2 libnet-http-perl libnet-ssleay-perl libonig4 libosp5 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libpipeline1 libpixman-1-0 libpthread-stubs0-dev libpython-stdlib libpython2.7-minimal libpython2.7-stdlib libpython3-stdlib libpython3.6-minimal libpython3.6-stdlib librsvg2-2 libsigsegv2 libsm-dev libsm6 libtext-unidecode-perl libthai-data libthai0 libtiff5 libtimedate-perl libtool libtry-tiny-perl liburi-perl libwww-perl libwww-robotrules-perl libx11-6 libx11-data libx11-dev libxau-dev libxau6 libxcb-render0 libxcb-shm0 libxcb1 libxcb1-dev libxdmcp-dev libxdmcp6 libxext6 libxml-libxml-perl libxml-namespacesupport-perl libxml-parser-perl libxml-sax-base-perl libxml-sax-perl libxml2 libxrender1 libxslt1.1 libxt-dev libxt6 m4 man-db mime-support netbase opensp perl-openssl-defaults pkg-config po-debconf python python-funcsigs python-minimal python-mock python-pbr python-pkg-resources python-six python2.7 python2.7-minimal python3 python3-cairo python3-distutils python3-gi python3-gi-cairo python3-lib2to3 python3-mako python3-markupsafe python3-minimal python3-pkg-resources python3-scour python3-six python3.6 python3.6-minimal sbuild-build-depends-libgtop2-dummy scour sgml-base sgml-data shared-mime-info tex-common texinfo ucf x11-common x11proto-core-dev x11proto-dev xml-core xorg-sgml-doctools xsltproc xtrans-dev zlib1g-dev 0 upgraded, 183 newly installed, 0 to remove and 0 not upgraded. Need to get 41.3 MB of archives. After this operation, 207 MB of additional disk space will be used. Get:1 copy:/<>/resolver-gme7iw/apt_archive ./ sbuild-build-depends-libgtop2-dummy 0.invalid.0 [972 B] Get:2 http://ftpmaster.internal/ubuntu bionic/main s390x libpython3.6-minimal s390x 3.6.5-3 [526 kB] Get:3 http://ftpmaster.internal/ubuntu bionic/main s390x libexpat1 s390x 2.2.5-3 [79.3 kB] Get:4 http://ftpmaster.internal/ubuntu bionic/main s390x python3.6-minimal s390x 3.6.5-3 [1333 kB] Get:5 http://ftpmaster.internal/ubuntu bionic/main s390x python3-minimal s390x 3.6.5-3 [23.8 kB] Get:6 http://ftpmaster.internal/ubuntu bionic/main s390x mime-support all 3.60ubuntu1 [30.1 kB] Get:7 http://ftpmaster.internal/ubuntu bionic/main s390x libmpdec2 s390x 2.4.2-1ubuntu1 [80.7 kB] Get:8 http://ftpmaster.internal/ubuntu bionic/main s390x libpython3.6-stdlib s390x 3.6.5-3 [1616 kB] Get:9 http://ftpmaster.internal/ubuntu bionic/main s390x python3.6 s390x 3.6.5-3 [186 kB] Get:10 http://ftpmaster.internal/ubuntu bionic/main s390x libpython3-stdlib s390x 3.6.5-3 [7276 B] Get:11 http://ftpmaster.internal/ubuntu bionic/main s390x python3 s390x 3.6.5-3 [10.2 kB] Get:12 http://ftpmaster.internal/ubuntu bionic/main s390x libbsd0 s390x 0.8.7-1 [40.0 kB] Get:13 http://ftpmaster.internal/ubuntu bionic/main s390x bsdmainutils s390x 11.1.2ubuntu1 [181 kB] Get:14 http://ftpmaster.internal/ubuntu bionic/main s390x groff-base s390x 1.22.3-10 [1174 kB] Get:15 http://ftpmaster.internal/ubuntu bionic/main s390x libpipeline1 s390x 1.5.0-1 [24.1 kB] Get:16 http://ftpmaster.internal/ubuntu bionic/main s390x man-db s390x 2.8.3-2 [1007 kB] Get:17 http://ftpmaster.internal/ubuntu bionic/main s390x libfreetype6 s390x 2.8.1-2ubuntu2 [314 kB] Get:18 http://ftpmaster.internal/ubuntu bionic/main s390x ucf all 3.0038 [50.5 kB] Get:19 http://ftpmaster.internal/ubuntu bionic/main s390x fonts-dejavu-core all 2.37-1 [1041 kB] Get:20 http://ftpmaster.internal/ubuntu bionic/main s390x fontconfig-config all 2.12.6-0ubuntu2 [55.8 kB] Get:21 http://ftpmaster.internal/ubuntu bionic/main s390x libfontconfig1 s390x 2.12.6-0ubuntu2 [132 kB] Get:22 http://ftpmaster.internal/ubuntu bionic/main s390x fontconfig s390x 2.12.6-0ubuntu2 [168 kB] Get:23 http://ftpmaster.internal/ubuntu bionic/main s390x libjpeg-turbo8 s390x 1.5.2-0ubuntu5 [100 kB] Get:24 http://ftpmaster.internal/ubuntu bionic/main s390x libpython2.7-minimal s390x 2.7.15~rc1-1 [334 kB] Get:25 http://ftpmaster.internal/ubuntu bionic/main s390x python2.7-minimal s390x 2.7.15~rc1-1 [1170 kB] Get:26 http://ftpmaster.internal/ubuntu bionic/main s390x python-minimal s390x 2.7.15~rc1-1 [28.1 kB] Get:27 http://ftpmaster.internal/ubuntu bionic/main s390x libpython2.7-stdlib s390x 2.7.15~rc1-1 [1853 kB] Get:28 http://ftpmaster.internal/ubuntu bionic/main s390x python2.7 s390x 2.7.15~rc1-1 [238 kB] Get:29 http://ftpmaster.internal/ubuntu bionic/main s390x libpython-stdlib s390x 2.7.15~rc1-1 [7624 B] Get:30 http://ftpmaster.internal/ubuntu bionic/main s390x python s390x 2.7.15~rc1-1 [140 kB] Get:31 http://ftpmaster.internal/ubuntu bionic/main s390x sgml-base all 1.29 [12.3 kB] Get:32 http://ftpmaster.internal/ubuntu bionic/main s390x tex-common all 6.09 [33.0 kB] Get:33 http://ftpmaster.internal/ubuntu bionic/main s390x libmagic-mgc s390x 1:5.32-2 [185 kB] Get:34 http://ftpmaster.internal/ubuntu bionic/main s390x libmagic1 s390x 1:5.32-2 [66.9 kB] Get:35 http://ftpmaster.internal/ubuntu bionic/main s390x file s390x 1:5.32-2 [21.9 kB] Get:36 http://ftpmaster.internal/ubuntu bionic/main s390x libglib2.0-0 s390x 2.56.1-2ubuntu1 [1077 kB] Get:37 http://ftpmaster.internal/ubuntu bionic/main s390x libgirepository-1.0-1 s390x 1.56.1-1 [79.2 kB] Get:38 http://ftpmaster.internal/ubuntu bionic/main s390x gir1.2-glib-2.0 s390x 1.56.1-1 [129 kB] Get:39 http://ftpmaster.internal/ubuntu bionic/main s390x libelf1 s390x 0.170-0.4 [42.6 kB] Get:40 http://ftpmaster.internal/ubuntu bionic/main s390x libglib2.0-data all 2.56.1-2ubuntu1 [4220 B] Get:41 http://ftpmaster.internal/ubuntu bionic/main s390x libicu60 s390x 60.2-3ubuntu3 [7837 kB] Get:42 http://ftpmaster.internal/ubuntu bionic/main s390x libxml2 s390x 2.9.4+dfsg1-6.1ubuntu1 [587 kB] Get:43 http://ftpmaster.internal/ubuntu bionic/main s390x netbase all 5.4 [12.7 kB] Get:44 http://ftpmaster.internal/ubuntu bionic/main s390x python3-gi s390x 3.26.1-2 [147 kB] Get:45 http://ftpmaster.internal/ubuntu bionic/main s390x shared-mime-info s390x 1.9-2 [425 kB] Get:46 http://ftpmaster.internal/ubuntu bionic/main s390x gettext-base s390x 0.19.8.1-6 [48.3 kB] Get:47 http://ftpmaster.internal/ubuntu bionic/main s390x libxau6 s390x 1:1.0.8-1 [7420 B] Get:48 http://ftpmaster.internal/ubuntu bionic/main s390x libxdmcp6 s390x 1:1.1.2-3 [10.7 kB] Get:49 http://ftpmaster.internal/ubuntu bionic/main s390x libxcb1 s390x 1.13-1 [43.6 kB] Get:50 http://ftpmaster.internal/ubuntu bionic/main s390x libx11-data all 2:1.6.4-3 [114 kB] Get:51 http://ftpmaster.internal/ubuntu bionic/main s390x libx11-6 s390x 2:1.6.4-3 [546 kB] Get:52 http://ftpmaster.internal/ubuntu bionic/main s390x libxext6 s390x 2:1.3.3-1 [27.8 kB] Get:53 http://ftpmaster.internal/ubuntu bionic/main s390x libsigsegv2 s390x 2.12-1 [14.6 kB] Get:54 http://ftpmaster.internal/ubuntu bionic/main s390x m4 s390x 1.4.18-1 [195 kB] Get:55 http://ftpmaster.internal/ubuntu bionic/main s390x autoconf all 2.69-11 [322 kB] Get:56 http://ftpmaster.internal/ubuntu bionic/main s390x autotools-dev all 20180224.1 [39.6 kB] Get:57 http://ftpmaster.internal/ubuntu bionic/main s390x automake all 1:1.15.1-3ubuntu2 [509 kB] Get:58 http://ftpmaster.internal/ubuntu bionic/main s390x autopoint all 0.19.8.1-6 [412 kB] Get:59 http://ftpmaster.internal/ubuntu bionic/main s390x libtool all 2.4.6-2 [194 kB] Get:60 http://ftpmaster.internal/ubuntu bionic/main s390x dh-autoreconf all 17 [15.8 kB] Get:61 http://ftpmaster.internal/ubuntu bionic/main s390x libarchive-zip-perl all 1.60-1 [83.9 kB] Get:62 http://ftpmaster.internal/ubuntu bionic/main s390x libfile-stripnondeterminism-perl all 0.040-1.1~build1 [13.8 kB] Get:63 http://ftpmaster.internal/ubuntu bionic/main s390x libtimedate-perl all 2.3000-2 [37.5 kB] Get:64 http://ftpmaster.internal/ubuntu bionic/main s390x dh-strip-nondeterminism all 0.040-1.1~build1 [5208 B] Get:65 http://ftpmaster.internal/ubuntu bionic/main s390x libcroco3 s390x 0.6.12-2 [74.2 kB] Get:66 http://ftpmaster.internal/ubuntu bionic/main s390x gettext s390x 0.19.8.1-6 [858 kB] Get:67 http://ftpmaster.internal/ubuntu bionic/main s390x intltool-debian all 0.35.0+20060710.4 [24.9 kB] Get:68 http://ftpmaster.internal/ubuntu bionic/main s390x po-debconf all 1.0.20 [232 kB] Get:69 http://ftpmaster.internal/ubuntu bionic/main s390x debhelper all 11.1.6ubuntu1 [902 kB] Get:70 http://ftpmaster.internal/ubuntu bionic/main s390x xml-core all 0.18 [21.3 kB] Get:71 http://ftpmaster.internal/ubuntu bionic/universe s390x sgml-data all 2.0.10 [173 kB] Get:72 http://ftpmaster.internal/ubuntu bionic/universe s390x docbook all 4.5-6 [122 kB] Get:73 http://ftpmaster.internal/ubuntu bionic/universe s390x libosp5 s390x 1.5.2-13ubuntu2 [552 kB] Get:74 http://ftpmaster.internal/ubuntu bionic/universe s390x opensp s390x 1.5.2-13ubuntu2 [139 kB] Get:75 http://ftpmaster.internal/ubuntu bionic/universe s390x docbook-to-man s390x 1:2.0.0-41 [70.9 kB] Get:76 http://ftpmaster.internal/ubuntu bionic/universe s390x docbook-xml all 4.5-8 [71.8 kB] Get:77 http://ftpmaster.internal/ubuntu bionic/universe s390x docbook-xsl all 1.79.1+dfsg-2 [1075 kB] Get:78 http://ftpmaster.internal/ubuntu bionic/main s390x gir1.2-freedesktop s390x 1.56.1-1 [8968 B] Get:79 http://ftpmaster.internal/ubuntu bionic/main s390x libjpeg8 s390x 8c-2ubuntu8 [2142 B] Get:80 http://ftpmaster.internal/ubuntu bionic/main s390x libjbig0 s390x 2.1-3.1build1 [26.3 kB] Get:81 http://ftpmaster.internal/ubuntu bionic/main s390x libtiff5 s390x 4.0.9-5 [142 kB] Get:82 http://ftpmaster.internal/ubuntu bionic/main s390x libgdk-pixbuf2.0-common all 2.36.11-2 [4536 B] Get:83 http://ftpmaster.internal/ubuntu bionic/main s390x libgdk-pixbuf2.0-0 s390x 2.36.11-2 [156 kB] Get:84 http://ftpmaster.internal/ubuntu bionic/main s390x gir1.2-gdkpixbuf-2.0 s390x 2.36.11-2 [7664 B] Get:85 http://ftpmaster.internal/ubuntu bionic/main s390x libpixman-1-0 s390x 0.34.0-2 [135 kB] Get:86 http://ftpmaster.internal/ubuntu bionic/main s390x libxcb-render0 s390x 1.13-1 [14.7 kB] Get:87 http://ftpmaster.internal/ubuntu bionic/main s390x libxcb-shm0 s390x 1.13-1 [5528 B] Get:88 http://ftpmaster.internal/ubuntu bionic/main s390x libxrender1 s390x 1:0.9.10-1 [17.8 kB] Get:89 http://ftpmaster.internal/ubuntu bionic/main s390x libcairo2 s390x 1.15.10-2 [533 kB] Get:90 http://ftpmaster.internal/ubuntu bionic/main s390x libthai-data all 0.1.27-2 [133 kB] Get:91 http://ftpmaster.internal/ubuntu bionic/main s390x libdatrie1 s390x 0.2.10-7 [17.5 kB] Get:92 http://ftpmaster.internal/ubuntu bionic/main s390x libthai0 s390x 0.1.27-2 [18.2 kB] Get:93 http://ftpmaster.internal/ubuntu bionic/main s390x libpango-1.0-0 s390x 1.40.14-1 [148 kB] Get:94 http://ftpmaster.internal/ubuntu bionic/main s390x libgraphite2-3 s390x 1.3.11-2 [71.3 kB] Get:95 http://ftpmaster.internal/ubuntu bionic/main s390x libharfbuzz0b s390x 1.7.2-1ubuntu1 [218 kB] Get:96 http://ftpmaster.internal/ubuntu bionic/main s390x libpangoft2-1.0-0 s390x 1.40.14-1 [31.5 kB] Get:97 http://ftpmaster.internal/ubuntu bionic/main s390x libpangocairo-1.0-0 s390x 1.40.14-1 [19.2 kB] Get:98 http://ftpmaster.internal/ubuntu bionic/main s390x librsvg2-2 s390x 2.40.20-2 [89.9 kB] Get:99 http://ftpmaster.internal/ubuntu bionic/main s390x gir1.2-rsvg-2.0 s390x 2.40.20-2 [3716 B] Get:100 http://ftpmaster.internal/ubuntu bionic/main s390x liburi-perl all 1.73-1 [77.2 kB] Get:101 http://ftpmaster.internal/ubuntu bionic/main s390x libencode-locale-perl all 1.05-1 [12.3 kB] Get:102 http://ftpmaster.internal/ubuntu bionic/main s390x libhttp-date-perl all 6.02-1 [10.4 kB] Get:103 http://ftpmaster.internal/ubuntu bionic/main s390x libfile-listing-perl all 6.04-1 [9774 B] Get:104 http://ftpmaster.internal/ubuntu bionic/main s390x libhtml-tagset-perl all 3.20-3 [12.1 kB] Get:105 http://ftpmaster.internal/ubuntu bionic/main s390x libhtml-parser-perl s390x 3.72-3build1 [85.1 kB] Get:106 http://ftpmaster.internal/ubuntu bionic/main s390x libhtml-tree-perl all 5.07-1 [200 kB] Get:107 http://ftpmaster.internal/ubuntu bionic/main s390x libio-html-perl all 1.001-1 [14.9 kB] Get:108 http://ftpmaster.internal/ubuntu bionic/main s390x liblwp-mediatypes-perl all 6.02-1 [21.7 kB] Get:109 http://ftpmaster.internal/ubuntu bionic/main s390x libhttp-message-perl all 6.14-1 [72.1 kB] Get:110 http://ftpmaster.internal/ubuntu bionic/main s390x libhttp-cookies-perl all 6.04-1 [17.2 kB] Get:111 http://ftpmaster.internal/ubuntu bionic/main s390x libhttp-negotiate-perl all 6.00-2 [13.4 kB] Get:112 http://ftpmaster.internal/ubuntu bionic/main s390x perl-openssl-defaults s390x 3build1 [7012 B] Get:113 http://ftpmaster.internal/ubuntu bionic/main s390x libnet-ssleay-perl s390x 1.84-1build1 [266 kB] Get:114 http://ftpmaster.internal/ubuntu bionic/main s390x libio-socket-ssl-perl all 2.056-1 [172 kB] Get:115 http://ftpmaster.internal/ubuntu bionic/main s390x libnet-http-perl all 6.17-1 [22.7 kB] Get:116 http://ftpmaster.internal/ubuntu bionic/main s390x liblwp-protocol-https-perl all 6.07-2 [8284 B] Get:117 http://ftpmaster.internal/ubuntu bionic/main s390x libtry-tiny-perl all 0.30-1 [20.5 kB] Get:118 http://ftpmaster.internal/ubuntu bionic/main s390x libwww-robotrules-perl all 6.01-1 [14.1 kB] Get:119 http://ftpmaster.internal/ubuntu bionic/main s390x libwww-perl all 6.31-1 [137 kB] Get:120 http://ftpmaster.internal/ubuntu bionic/main s390x libxml-parser-perl s390x 2.44-2build3 [197 kB] Get:121 http://ftpmaster.internal/ubuntu bionic/universe s390x intltool all 0.51.0-5ubuntu1 [44.6 kB] Get:122 http://ftpmaster.internal/ubuntu bionic/universe s390x libonig4 s390x 6.7.0-1 [115 kB] Get:123 http://ftpmaster.internal/ubuntu bionic/universe s390x libjq1 s390x 1.5+dfsg-2 [114 kB] Get:124 http://ftpmaster.internal/ubuntu bionic/universe s390x jq s390x 1.5+dfsg-2 [46.1 kB] Get:125 http://ftpmaster.internal/ubuntu bionic/main s390x libfile-which-perl all 1.21-1 [11.8 kB] Get:126 http://ftpmaster.internal/ubuntu bionic/universe s390x dh-translations all 138 [23.3 kB] Get:127 http://ftpmaster.internal/ubuntu bionic/main s390x libcairo-gobject2 s390x 1.15.10-2 [16.9 kB] Get:128 http://ftpmaster.internal/ubuntu bionic/main s390x python3-cairo s390x 1.16.2-1 [53.9 kB] Get:129 http://ftpmaster.internal/ubuntu bionic/main s390x python3-gi-cairo s390x 3.26.1-2 [6484 B] Get:130 http://ftpmaster.internal/ubuntu bionic/main s390x python3-six all 1.11.0-2 [11.4 kB] Get:131 http://ftpmaster.internal/ubuntu bionic/main s390x python3-pkg-resources all 39.0.1-2 [98.8 kB] Get:132 http://ftpmaster.internal/ubuntu bionic/universe s390x python3-scour all 0.36-2 [44.8 kB] Get:133 http://ftpmaster.internal/ubuntu bionic/universe s390x scour all 0.36-2 [7372 B] Get:134 http://ftpmaster.internal/ubuntu bionic/universe s390x gnome-pkg-tools all 0.20.2ubuntu2 [21.6 kB] Get:135 http://ftpmaster.internal/ubuntu bionic/main s390x python3-lib2to3 all 3.6.5-3 [76.6 kB] Get:136 http://ftpmaster.internal/ubuntu bionic/main s390x python3-distutils all 3.6.5-3 [141 kB] Get:137 http://ftpmaster.internal/ubuntu bionic/main s390x python3-markupsafe s390x 1.0-1build1 [13.3 kB] Get:138 http://ftpmaster.internal/ubuntu bionic/main s390x python3-mako all 1.0.7+ds1-1 [59.3 kB] Get:139 http://ftpmaster.internal/ubuntu bionic/main s390x gobject-introspection s390x 1.56.1-1 [264 kB] Get:140 http://ftpmaster.internal/ubuntu bionic/main s390x pkg-config s390x 0.29.1-0ubuntu2 [44.0 kB] Get:141 http://ftpmaster.internal/ubuntu bionic/main s390x python-funcsigs all 1.0.2-4 [13.5 kB] Get:142 http://ftpmaster.internal/ubuntu bionic/main s390x python-pkg-resources all 39.0.1-2 [128 kB] Get:143 http://ftpmaster.internal/ubuntu bionic/main s390x python-six all 1.11.0-2 [11.3 kB] Get:144 http://ftpmaster.internal/ubuntu bionic/main s390x python-pbr all 3.1.1-3ubuntu3 [53.7 kB] Get:145 http://ftpmaster.internal/ubuntu bionic/main s390x python-mock all 2.0.0-3 [47.4 kB] Get:146 http://ftpmaster.internal/ubuntu bionic/main s390x libxslt1.1 s390x 1.1.29-5 [139 kB] Get:147 http://ftpmaster.internal/ubuntu bionic/main s390x xsltproc s390x 1.1.29-5 [13.2 kB] Get:148 http://ftpmaster.internal/ubuntu bionic/main s390x liblua5.2-0 s390x 5.2.4-1.1build1 [99.9 kB] Get:149 http://ftpmaster.internal/ubuntu bionic/universe s390x highlight-common all 3.41-1 [188 kB] Get:150 http://ftpmaster.internal/ubuntu bionic/universe s390x highlight s390x 3.41-1 [322 kB] Get:151 http://ftpmaster.internal/ubuntu bionic/universe s390x gtk-doc-tools all 1.27-3 [304 kB] Get:152 http://ftpmaster.internal/ubuntu bionic/main s390x libglib2.0-bin s390x 2.56.1-2ubuntu1 [64.3 kB] Get:153 http://ftpmaster.internal/ubuntu bionic/main s390x libglib2.0-dev-bin s390x 2.56.1-2ubuntu1 [101 kB] Get:154 http://ftpmaster.internal/ubuntu bionic/main s390x libpcre16-3 s390x 2:8.39-9 [79.4 kB] Get:155 http://ftpmaster.internal/ubuntu bionic/main s390x libpcre32-3 s390x 2:8.39-9 [73.8 kB] Get:156 http://ftpmaster.internal/ubuntu bionic/main s390x libpcrecpp0v5 s390x 2:8.39-9 [14.5 kB] Get:157 http://ftpmaster.internal/ubuntu bionic/main s390x libpcre3-dev s390x 2:8.39-9 [373 kB] Get:158 http://ftpmaster.internal/ubuntu bionic/main s390x zlib1g-dev s390x 1:1.2.11.dfsg-0ubuntu2 [173 kB] Get:159 http://ftpmaster.internal/ubuntu bionic/main s390x libglib2.0-dev s390x 2.56.1-2ubuntu1 [1322 kB] Get:160 http://ftpmaster.internal/ubuntu bionic/main s390x libffi-dev s390x 3.2.1-8 [154 kB] Get:161 http://ftpmaster.internal/ubuntu bionic/main s390x libgirepository1.0-dev s390x 1.56.1-1 [681 kB] Get:162 http://ftpmaster.internal/ubuntu bionic/main s390x x11-common all 1:7.7+19ubuntu7 [22.0 kB] Get:163 http://ftpmaster.internal/ubuntu bionic/main s390x libice6 s390x 2:1.0.9-2 [36.9 kB] Get:164 http://ftpmaster.internal/ubuntu bionic/main s390x xorg-sgml-doctools all 1:1.11-1 [12.9 kB] Get:165 http://ftpmaster.internal/ubuntu bionic/main s390x x11proto-dev all 2018.4-4 [251 kB] Get:166 http://ftpmaster.internal/ubuntu bionic/main s390x x11proto-core-dev all 2018.4-4 [2620 B] Get:167 http://ftpmaster.internal/ubuntu bionic/main s390x libice-dev s390x 2:1.0.9-2 [44.3 kB] Get:168 http://ftpmaster.internal/ubuntu bionic/main s390x libpthread-stubs0-dev s390x 0.3-4 [3892 B] Get:169 http://ftpmaster.internal/ubuntu bionic/main s390x libsm6 s390x 2:1.2.2-1 [15.3 kB] Get:170 http://ftpmaster.internal/ubuntu bionic/main s390x libsm-dev s390x 2:1.2.2-1 [16.5 kB] Get:171 http://ftpmaster.internal/ubuntu bionic/universe s390x libtext-unidecode-perl all 1.30-1 [99.0 kB] Get:172 http://ftpmaster.internal/ubuntu bionic/main s390x libxau-dev s390x 1:1.0.8-1 [9352 B] Get:173 http://ftpmaster.internal/ubuntu bionic/main s390x libxdmcp-dev s390x 1:1.1.2-3 [25.1 kB] Get:174 http://ftpmaster.internal/ubuntu bionic/main s390x xtrans-dev all 1.3.5-1 [70.5 kB] Get:175 http://ftpmaster.internal/ubuntu bionic/main s390x libxcb1-dev s390x 1.13-1 [78.4 kB] Get:176 http://ftpmaster.internal/ubuntu bionic/main s390x libx11-dev s390x 2:1.6.4-3 [608 kB] Get:177 http://ftpmaster.internal/ubuntu bionic/main s390x libxml-namespacesupport-perl all 1.12-1 [13.2 kB] Get:178 http://ftpmaster.internal/ubuntu bionic/main s390x libxml-sax-base-perl all 1.09-1 [18.8 kB] Get:179 http://ftpmaster.internal/ubuntu bionic/main s390x libxml-sax-perl all 0.99+dfsg-2ubuntu1 [64.6 kB] Get:180 http://ftpmaster.internal/ubuntu bionic/main s390x libxml-libxml-perl s390x 2.0128+dfsg-5 [301 kB] Get:181 http://ftpmaster.internal/ubuntu bionic/main s390x libxt6 s390x 1:1.1.5-1 [147 kB] Get:182 http://ftpmaster.internal/ubuntu bionic/main s390x libxt-dev s390x 1:1.1.5-1 [386 kB] Get:183 http://ftpmaster.internal/ubuntu bionic/universe s390x texinfo s390x 6.5.0.dfsg.1-2 [753 kB] debconf: delaying package configuration, since apt-utils is not installed Fetched 41.3 MB in 1s (75.7 MB/s) Selecting previously unselected package libpython3.6-minimal:s390x. (Reading database ... 12382 files and directories currently installed.) Preparing to unpack .../0-libpython3.6-minimal_3.6.5-3_s390x.deb ... Unpacking libpython3.6-minimal:s390x (3.6.5-3) ... Selecting previously unselected package libexpat1:s390x. Preparing to unpack .../1-libexpat1_2.2.5-3_s390x.deb ... Unpacking libexpat1:s390x (2.2.5-3) ... Selecting previously unselected package python3.6-minimal. Preparing to unpack .../2-python3.6-minimal_3.6.5-3_s390x.deb ... Unpacking python3.6-minimal (3.6.5-3) ... Selecting previously unselected package python3-minimal. Preparing to unpack .../3-python3-minimal_3.6.5-3_s390x.deb ... Unpacking python3-minimal (3.6.5-3) ... Selecting previously unselected package mime-support. Preparing to unpack .../4-mime-support_3.60ubuntu1_all.deb ... Unpacking mime-support (3.60ubuntu1) ... Selecting previously unselected package libmpdec2:s390x. Preparing to unpack .../5-libmpdec2_2.4.2-1ubuntu1_s390x.deb ... Unpacking libmpdec2:s390x (2.4.2-1ubuntu1) ... Selecting previously unselected package libpython3.6-stdlib:s390x. Preparing to unpack .../6-libpython3.6-stdlib_3.6.5-3_s390x.deb ... Unpacking libpython3.6-stdlib:s390x (3.6.5-3) ... Selecting previously unselected package python3.6. Preparing to unpack .../7-python3.6_3.6.5-3_s390x.deb ... Unpacking python3.6 (3.6.5-3) ... Selecting previously unselected package libpython3-stdlib:s390x. Preparing to unpack .../8-libpython3-stdlib_3.6.5-3_s390x.deb ... Unpacking libpython3-stdlib:s390x (3.6.5-3) ... Setting up libpython3.6-minimal:s390x (3.6.5-3) ... Setting up libexpat1:s390x (2.2.5-3) ... Setting up python3.6-minimal (3.6.5-3) ... Setting up python3-minimal (3.6.5-3) ... Selecting previously unselected package python3. (Reading database ... 13056 files and directories currently installed.) Preparing to unpack .../00-python3_3.6.5-3_s390x.deb ... Unpacking python3 (3.6.5-3) ... Selecting previously unselected package libbsd0:s390x. Preparing to unpack .../01-libbsd0_0.8.7-1_s390x.deb ... Unpacking libbsd0:s390x (0.8.7-1) ... Selecting previously unselected package bsdmainutils. Preparing to unpack .../02-bsdmainutils_11.1.2ubuntu1_s390x.deb ... Unpacking bsdmainutils (11.1.2ubuntu1) ... Selecting previously unselected package groff-base. Preparing to unpack .../03-groff-base_1.22.3-10_s390x.deb ... Unpacking groff-base (1.22.3-10) ... Selecting previously unselected package libpipeline1:s390x. Preparing to unpack .../04-libpipeline1_1.5.0-1_s390x.deb ... Unpacking libpipeline1:s390x (1.5.0-1) ... Selecting previously unselected package man-db. Preparing to unpack .../05-man-db_2.8.3-2_s390x.deb ... Unpacking man-db (2.8.3-2) ... Selecting previously unselected package libfreetype6:s390x. Preparing to unpack .../06-libfreetype6_2.8.1-2ubuntu2_s390x.deb ... Unpacking libfreetype6:s390x (2.8.1-2ubuntu2) ... Selecting previously unselected package ucf. Preparing to unpack .../07-ucf_3.0038_all.deb ... Moving old data out of the way Unpacking ucf (3.0038) ... Selecting previously unselected package fonts-dejavu-core. Preparing to unpack .../08-fonts-dejavu-core_2.37-1_all.deb ... Unpacking fonts-dejavu-core (2.37-1) ... Selecting previously unselected package fontconfig-config. Preparing to unpack .../09-fontconfig-config_2.12.6-0ubuntu2_all.deb ... Unpacking fontconfig-config (2.12.6-0ubuntu2) ... Selecting previously unselected package libfontconfig1:s390x. Preparing to unpack .../10-libfontconfig1_2.12.6-0ubuntu2_s390x.deb ... Unpacking libfontconfig1:s390x (2.12.6-0ubuntu2) ... Selecting previously unselected package fontconfig. Preparing to unpack .../11-fontconfig_2.12.6-0ubuntu2_s390x.deb ... Unpacking fontconfig (2.12.6-0ubuntu2) ... Selecting previously unselected package libjpeg-turbo8:s390x. Preparing to unpack .../12-libjpeg-turbo8_1.5.2-0ubuntu5_s390x.deb ... Unpacking libjpeg-turbo8:s390x (1.5.2-0ubuntu5) ... Selecting previously unselected package libpython2.7-minimal:s390x. Preparing to unpack .../13-libpython2.7-minimal_2.7.15~rc1-1_s390x.deb ... Unpacking libpython2.7-minimal:s390x (2.7.15~rc1-1) ... Selecting previously unselected package python2.7-minimal. Preparing to unpack .../14-python2.7-minimal_2.7.15~rc1-1_s390x.deb ... Unpacking python2.7-minimal (2.7.15~rc1-1) ... Selecting previously unselected package python-minimal. Preparing to unpack .../15-python-minimal_2.7.15~rc1-1_s390x.deb ... Unpacking python-minimal (2.7.15~rc1-1) ... Selecting previously unselected package libpython2.7-stdlib:s390x. Preparing to unpack .../16-libpython2.7-stdlib_2.7.15~rc1-1_s390x.deb ... Unpacking libpython2.7-stdlib:s390x (2.7.15~rc1-1) ... Selecting previously unselected package python2.7. Preparing to unpack .../17-python2.7_2.7.15~rc1-1_s390x.deb ... Unpacking python2.7 (2.7.15~rc1-1) ... Selecting previously unselected package libpython-stdlib:s390x. Preparing to unpack .../18-libpython-stdlib_2.7.15~rc1-1_s390x.deb ... Unpacking libpython-stdlib:s390x (2.7.15~rc1-1) ... Setting up libpython2.7-minimal:s390x (2.7.15~rc1-1) ... Setting up python2.7-minimal (2.7.15~rc1-1) ... Setting up python-minimal (2.7.15~rc1-1) ... Selecting previously unselected package python. (Reading database ... 14554 files and directories currently installed.) Preparing to unpack .../000-python_2.7.15~rc1-1_s390x.deb ... Unpacking python (2.7.15~rc1-1) ... Selecting previously unselected package sgml-base. Preparing to unpack .../001-sgml-base_1.29_all.deb ... Unpacking sgml-base (1.29) ... Selecting previously unselected package tex-common. Preparing to unpack .../002-tex-common_6.09_all.deb ... Unpacking tex-common (6.09) ... Selecting previously unselected package libmagic-mgc. Preparing to unpack .../003-libmagic-mgc_1%3a5.32-2_s390x.deb ... Unpacking libmagic-mgc (1:5.32-2) ... Selecting previously unselected package libmagic1:s390x. Preparing to unpack .../004-libmagic1_1%3a5.32-2_s390x.deb ... Unpacking libmagic1:s390x (1:5.32-2) ... Selecting previously unselected package file. Preparing to unpack .../005-file_1%3a5.32-2_s390x.deb ... Unpacking file (1:5.32-2) ... Selecting previously unselected package libglib2.0-0:s390x. Preparing to unpack .../006-libglib2.0-0_2.56.1-2ubuntu1_s390x.deb ... Unpacking libglib2.0-0:s390x (2.56.1-2ubuntu1) ... Selecting previously unselected package libgirepository-1.0-1:s390x. Preparing to unpack .../007-libgirepository-1.0-1_1.56.1-1_s390x.deb ... Unpacking libgirepository-1.0-1:s390x (1.56.1-1) ... Selecting previously unselected package gir1.2-glib-2.0:s390x. Preparing to unpack .../008-gir1.2-glib-2.0_1.56.1-1_s390x.deb ... Unpacking gir1.2-glib-2.0:s390x (1.56.1-1) ... Selecting previously unselected package libelf1:s390x. Preparing to unpack .../009-libelf1_0.170-0.4_s390x.deb ... Unpacking libelf1:s390x (0.170-0.4) ... Selecting previously unselected package libglib2.0-data. Preparing to unpack .../010-libglib2.0-data_2.56.1-2ubuntu1_all.deb ... Unpacking libglib2.0-data (2.56.1-2ubuntu1) ... Selecting previously unselected package libicu60:s390x. Preparing to unpack .../011-libicu60_60.2-3ubuntu3_s390x.deb ... Unpacking libicu60:s390x (60.2-3ubuntu3) ... Selecting previously unselected package libxml2:s390x. Preparing to unpack .../012-libxml2_2.9.4+dfsg1-6.1ubuntu1_s390x.deb ... Unpacking libxml2:s390x (2.9.4+dfsg1-6.1ubuntu1) ... Selecting previously unselected package netbase. Preparing to unpack .../013-netbase_5.4_all.deb ... Unpacking netbase (5.4) ... Selecting previously unselected package python3-gi. Preparing to unpack .../014-python3-gi_3.26.1-2_s390x.deb ... Unpacking python3-gi (3.26.1-2) ... Selecting previously unselected package shared-mime-info. Preparing to unpack .../015-shared-mime-info_1.9-2_s390x.deb ... Unpacking shared-mime-info (1.9-2) ... Selecting previously unselected package gettext-base. Preparing to unpack .../016-gettext-base_0.19.8.1-6_s390x.deb ... Unpacking gettext-base (0.19.8.1-6) ... Selecting previously unselected package libxau6:s390x. Preparing to unpack .../017-libxau6_1%3a1.0.8-1_s390x.deb ... Unpacking libxau6:s390x (1:1.0.8-1) ... Selecting previously unselected package libxdmcp6:s390x. Preparing to unpack .../018-libxdmcp6_1%3a1.1.2-3_s390x.deb ... Unpacking libxdmcp6:s390x (1:1.1.2-3) ... Selecting previously unselected package libxcb1:s390x. Preparing to unpack .../019-libxcb1_1.13-1_s390x.deb ... Unpacking libxcb1:s390x (1.13-1) ... Selecting previously unselected package libx11-data. Preparing to unpack .../020-libx11-data_2%3a1.6.4-3_all.deb ... Unpacking libx11-data (2:1.6.4-3) ... Selecting previously unselected package libx11-6:s390x. Preparing to unpack .../021-libx11-6_2%3a1.6.4-3_s390x.deb ... Unpacking libx11-6:s390x (2:1.6.4-3) ... Selecting previously unselected package libxext6:s390x. Preparing to unpack .../022-libxext6_2%3a1.3.3-1_s390x.deb ... Unpacking libxext6:s390x (2:1.3.3-1) ... Selecting previously unselected package libsigsegv2:s390x. Preparing to unpack .../023-libsigsegv2_2.12-1_s390x.deb ... Unpacking libsigsegv2:s390x (2.12-1) ... Selecting previously unselected package m4. Preparing to unpack .../024-m4_1.4.18-1_s390x.deb ... Unpacking m4 (1.4.18-1) ... Selecting previously unselected package autoconf. Preparing to unpack .../025-autoconf_2.69-11_all.deb ... Unpacking autoconf (2.69-11) ... Selecting previously unselected package autotools-dev. Preparing to unpack .../026-autotools-dev_20180224.1_all.deb ... Unpacking autotools-dev (20180224.1) ... Selecting previously unselected package automake. Preparing to unpack .../027-automake_1%3a1.15.1-3ubuntu2_all.deb ... Unpacking automake (1:1.15.1-3ubuntu2) ... Selecting previously unselected package autopoint. Preparing to unpack .../028-autopoint_0.19.8.1-6_all.deb ... Unpacking autopoint (0.19.8.1-6) ... Selecting previously unselected package libtool. Preparing to unpack .../029-libtool_2.4.6-2_all.deb ... Unpacking libtool (2.4.6-2) ... Selecting previously unselected package dh-autoreconf. Preparing to unpack .../030-dh-autoreconf_17_all.deb ... Unpacking dh-autoreconf (17) ... Selecting previously unselected package libarchive-zip-perl. Preparing to unpack .../031-libarchive-zip-perl_1.60-1_all.deb ... Unpacking libarchive-zip-perl (1.60-1) ... Selecting previously unselected package libfile-stripnondeterminism-perl. Preparing to unpack .../032-libfile-stripnondeterminism-perl_0.040-1.1~build1_all.deb ... Unpacking libfile-stripnondeterminism-perl (0.040-1.1~build1) ... Selecting previously unselected package libtimedate-perl. Preparing to unpack .../033-libtimedate-perl_2.3000-2_all.deb ... Unpacking libtimedate-perl (2.3000-2) ... Selecting previously unselected package dh-strip-nondeterminism. Preparing to unpack .../034-dh-strip-nondeterminism_0.040-1.1~build1_all.deb ... Unpacking dh-strip-nondeterminism (0.040-1.1~build1) ... Selecting previously unselected package libcroco3:s390x. Preparing to unpack .../035-libcroco3_0.6.12-2_s390x.deb ... Unpacking libcroco3:s390x (0.6.12-2) ... Selecting previously unselected package gettext. Preparing to unpack .../036-gettext_0.19.8.1-6_s390x.deb ... Unpacking gettext (0.19.8.1-6) ... Selecting previously unselected package intltool-debian. Preparing to unpack .../037-intltool-debian_0.35.0+20060710.4_all.deb ... Unpacking intltool-debian (0.35.0+20060710.4) ... Selecting previously unselected package po-debconf. Preparing to unpack .../038-po-debconf_1.0.20_all.deb ... Unpacking po-debconf (1.0.20) ... Selecting previously unselected package debhelper. Preparing to unpack .../039-debhelper_11.1.6ubuntu1_all.deb ... Unpacking debhelper (11.1.6ubuntu1) ... Selecting previously unselected package xml-core. Preparing to unpack .../040-xml-core_0.18_all.deb ... Unpacking xml-core (0.18) ... Selecting previously unselected package sgml-data. Preparing to unpack .../041-sgml-data_2.0.10_all.deb ... Unpacking sgml-data (2.0.10) ... Selecting previously unselected package docbook. Preparing to unpack .../042-docbook_4.5-6_all.deb ... Unpacking docbook (4.5-6) ... Selecting previously unselected package libosp5. Preparing to unpack .../043-libosp5_1.5.2-13ubuntu2_s390x.deb ... Unpacking libosp5 (1.5.2-13ubuntu2) ... Selecting previously unselected package opensp. Preparing to unpack .../044-opensp_1.5.2-13ubuntu2_s390x.deb ... Unpacking opensp (1.5.2-13ubuntu2) ... Selecting previously unselected package docbook-to-man. Preparing to unpack .../045-docbook-to-man_1%3a2.0.0-41_s390x.deb ... Unpacking docbook-to-man (1:2.0.0-41) ... Selecting previously unselected package docbook-xml. Preparing to unpack .../046-docbook-xml_4.5-8_all.deb ... Unpacking docbook-xml (4.5-8) ... Selecting previously unselected package docbook-xsl. Preparing to unpack .../047-docbook-xsl_1.79.1+dfsg-2_all.deb ... Unpacking docbook-xsl (1.79.1+dfsg-2) ... Selecting previously unselected package gir1.2-freedesktop:s390x. Preparing to unpack .../048-gir1.2-freedesktop_1.56.1-1_s390x.deb ... Unpacking gir1.2-freedesktop:s390x (1.56.1-1) ... Selecting previously unselected package libjpeg8:s390x. Preparing to unpack .../049-libjpeg8_8c-2ubuntu8_s390x.deb ... Unpacking libjpeg8:s390x (8c-2ubuntu8) ... Selecting previously unselected package libjbig0:s390x. Preparing to unpack .../050-libjbig0_2.1-3.1build1_s390x.deb ... Unpacking libjbig0:s390x (2.1-3.1build1) ... Selecting previously unselected package libtiff5:s390x. Preparing to unpack .../051-libtiff5_4.0.9-5_s390x.deb ... Unpacking libtiff5:s390x (4.0.9-5) ... Selecting previously unselected package libgdk-pixbuf2.0-common. Preparing to unpack .../052-libgdk-pixbuf2.0-common_2.36.11-2_all.deb ... Unpacking libgdk-pixbuf2.0-common (2.36.11-2) ... Selecting previously unselected package libgdk-pixbuf2.0-0:s390x. Preparing to unpack .../053-libgdk-pixbuf2.0-0_2.36.11-2_s390x.deb ... Unpacking libgdk-pixbuf2.0-0:s390x (2.36.11-2) ... Selecting previously unselected package gir1.2-gdkpixbuf-2.0:s390x. Preparing to unpack .../054-gir1.2-gdkpixbuf-2.0_2.36.11-2_s390x.deb ... Unpacking gir1.2-gdkpixbuf-2.0:s390x (2.36.11-2) ... Selecting previously unselected package libpixman-1-0:s390x. Preparing to unpack .../055-libpixman-1-0_0.34.0-2_s390x.deb ... Unpacking libpixman-1-0:s390x (0.34.0-2) ... Selecting previously unselected package libxcb-render0:s390x. Preparing to unpack .../056-libxcb-render0_1.13-1_s390x.deb ... Unpacking libxcb-render0:s390x (1.13-1) ... Selecting previously unselected package libxcb-shm0:s390x. Preparing to unpack .../057-libxcb-shm0_1.13-1_s390x.deb ... Unpacking libxcb-shm0:s390x (1.13-1) ... Selecting previously unselected package libxrender1:s390x. Preparing to unpack .../058-libxrender1_1%3a0.9.10-1_s390x.deb ... Unpacking libxrender1:s390x (1:0.9.10-1) ... Selecting previously unselected package libcairo2:s390x. Preparing to unpack .../059-libcairo2_1.15.10-2_s390x.deb ... Unpacking libcairo2:s390x (1.15.10-2) ... Selecting previously unselected package libthai-data. Preparing to unpack .../060-libthai-data_0.1.27-2_all.deb ... Unpacking libthai-data (0.1.27-2) ... Selecting previously unselected package libdatrie1:s390x. Preparing to unpack .../061-libdatrie1_0.2.10-7_s390x.deb ... Unpacking libdatrie1:s390x (0.2.10-7) ... Selecting previously unselected package libthai0:s390x. Preparing to unpack .../062-libthai0_0.1.27-2_s390x.deb ... Unpacking libthai0:s390x (0.1.27-2) ... Selecting previously unselected package libpango-1.0-0:s390x. Preparing to unpack .../063-libpango-1.0-0_1.40.14-1_s390x.deb ... Unpacking libpango-1.0-0:s390x (1.40.14-1) ... Selecting previously unselected package libgraphite2-3:s390x. Preparing to unpack .../064-libgraphite2-3_1.3.11-2_s390x.deb ... Unpacking libgraphite2-3:s390x (1.3.11-2) ... Selecting previously unselected package libharfbuzz0b:s390x. Preparing to unpack .../065-libharfbuzz0b_1.7.2-1ubuntu1_s390x.deb ... Unpacking libharfbuzz0b:s390x (1.7.2-1ubuntu1) ... Selecting previously unselected package libpangoft2-1.0-0:s390x. Preparing to unpack .../066-libpangoft2-1.0-0_1.40.14-1_s390x.deb ... Unpacking libpangoft2-1.0-0:s390x (1.40.14-1) ... Selecting previously unselected package libpangocairo-1.0-0:s390x. Preparing to unpack .../067-libpangocairo-1.0-0_1.40.14-1_s390x.deb ... Unpacking libpangocairo-1.0-0:s390x (1.40.14-1) ... Selecting previously unselected package librsvg2-2:s390x. Preparing to unpack .../068-librsvg2-2_2.40.20-2_s390x.deb ... Unpacking librsvg2-2:s390x (2.40.20-2) ... Selecting previously unselected package gir1.2-rsvg-2.0:s390x. Preparing to unpack .../069-gir1.2-rsvg-2.0_2.40.20-2_s390x.deb ... Unpacking gir1.2-rsvg-2.0:s390x (2.40.20-2) ... Selecting previously unselected package liburi-perl. Preparing to unpack .../070-liburi-perl_1.73-1_all.deb ... Unpacking liburi-perl (1.73-1) ... Selecting previously unselected package libencode-locale-perl. Preparing to unpack .../071-libencode-locale-perl_1.05-1_all.deb ... Unpacking libencode-locale-perl (1.05-1) ... Selecting previously unselected package libhttp-date-perl. Preparing to unpack .../072-libhttp-date-perl_6.02-1_all.deb ... Unpacking libhttp-date-perl (6.02-1) ... Selecting previously unselected package libfile-listing-perl. Preparing to unpack .../073-libfile-listing-perl_6.04-1_all.deb ... Unpacking libfile-listing-perl (6.04-1) ... Selecting previously unselected package libhtml-tagset-perl. Preparing to unpack .../074-libhtml-tagset-perl_3.20-3_all.deb ... Unpacking libhtml-tagset-perl (3.20-3) ... Selecting previously unselected package libhtml-parser-perl. Preparing to unpack .../075-libhtml-parser-perl_3.72-3build1_s390x.deb ... Unpacking libhtml-parser-perl (3.72-3build1) ... Selecting previously unselected package libhtml-tree-perl. Preparing to unpack .../076-libhtml-tree-perl_5.07-1_all.deb ... Unpacking libhtml-tree-perl (5.07-1) ... Selecting previously unselected package libio-html-perl. Preparing to unpack .../077-libio-html-perl_1.001-1_all.deb ... Unpacking libio-html-perl (1.001-1) ... Selecting previously unselected package liblwp-mediatypes-perl. Preparing to unpack .../078-liblwp-mediatypes-perl_6.02-1_all.deb ... Unpacking liblwp-mediatypes-perl (6.02-1) ... Selecting previously unselected package libhttp-message-perl. Preparing to unpack .../079-libhttp-message-perl_6.14-1_all.deb ... Unpacking libhttp-message-perl (6.14-1) ... Selecting previously unselected package libhttp-cookies-perl. Preparing to unpack .../080-libhttp-cookies-perl_6.04-1_all.deb ... Unpacking libhttp-cookies-perl (6.04-1) ... Selecting previously unselected package libhttp-negotiate-perl. Preparing to unpack .../081-libhttp-negotiate-perl_6.00-2_all.deb ... Unpacking libhttp-negotiate-perl (6.00-2) ... Selecting previously unselected package perl-openssl-defaults:s390x. Preparing to unpack .../082-perl-openssl-defaults_3build1_s390x.deb ... Unpacking perl-openssl-defaults:s390x (3build1) ... Selecting previously unselected package libnet-ssleay-perl. Preparing to unpack .../083-libnet-ssleay-perl_1.84-1build1_s390x.deb ... Unpacking libnet-ssleay-perl (1.84-1build1) ... Selecting previously unselected package libio-socket-ssl-perl. Preparing to unpack .../084-libio-socket-ssl-perl_2.056-1_all.deb ... Unpacking libio-socket-ssl-perl (2.056-1) ... Selecting previously unselected package libnet-http-perl. Preparing to unpack .../085-libnet-http-perl_6.17-1_all.deb ... Unpacking libnet-http-perl (6.17-1) ... Selecting previously unselected package liblwp-protocol-https-perl. Preparing to unpack .../086-liblwp-protocol-https-perl_6.07-2_all.deb ... Unpacking liblwp-protocol-https-perl (6.07-2) ... Selecting previously unselected package libtry-tiny-perl. Preparing to unpack .../087-libtry-tiny-perl_0.30-1_all.deb ... Unpacking libtry-tiny-perl (0.30-1) ... Selecting previously unselected package libwww-robotrules-perl. Preparing to unpack .../088-libwww-robotrules-perl_6.01-1_all.deb ... Unpacking libwww-robotrules-perl (6.01-1) ... Selecting previously unselected package libwww-perl. Preparing to unpack .../089-libwww-perl_6.31-1_all.deb ... Unpacking libwww-perl (6.31-1) ... Selecting previously unselected package libxml-parser-perl. Preparing to unpack .../090-libxml-parser-perl_2.44-2build3_s390x.deb ... Unpacking libxml-parser-perl (2.44-2build3) ... Selecting previously unselected package intltool. Preparing to unpack .../091-intltool_0.51.0-5ubuntu1_all.deb ... Unpacking intltool (0.51.0-5ubuntu1) ... Selecting previously unselected package libonig4:s390x. Preparing to unpack .../092-libonig4_6.7.0-1_s390x.deb ... Unpacking libonig4:s390x (6.7.0-1) ... Selecting previously unselected package libjq1:s390x. Preparing to unpack .../093-libjq1_1.5+dfsg-2_s390x.deb ... Unpacking libjq1:s390x (1.5+dfsg-2) ... Selecting previously unselected package jq. Preparing to unpack .../094-jq_1.5+dfsg-2_s390x.deb ... Unpacking jq (1.5+dfsg-2) ... Selecting previously unselected package libfile-which-perl. Preparing to unpack .../095-libfile-which-perl_1.21-1_all.deb ... Unpacking libfile-which-perl (1.21-1) ... Selecting previously unselected package dh-translations. Preparing to unpack .../096-dh-translations_138_all.deb ... Unpacking dh-translations (138) ... Selecting previously unselected package libcairo-gobject2:s390x. Preparing to unpack .../097-libcairo-gobject2_1.15.10-2_s390x.deb ... Unpacking libcairo-gobject2:s390x (1.15.10-2) ... Selecting previously unselected package python3-cairo:s390x. Preparing to unpack .../098-python3-cairo_1.16.2-1_s390x.deb ... Unpacking python3-cairo:s390x (1.16.2-1) ... Selecting previously unselected package python3-gi-cairo. Preparing to unpack .../099-python3-gi-cairo_3.26.1-2_s390x.deb ... Unpacking python3-gi-cairo (3.26.1-2) ... Selecting previously unselected package python3-six. Preparing to unpack .../100-python3-six_1.11.0-2_all.deb ... Unpacking python3-six (1.11.0-2) ... Selecting previously unselected package python3-pkg-resources. Preparing to unpack .../101-python3-pkg-resources_39.0.1-2_all.deb ... Unpacking python3-pkg-resources (39.0.1-2) ... Selecting previously unselected package python3-scour. Preparing to unpack .../102-python3-scour_0.36-2_all.deb ... Unpacking python3-scour (0.36-2) ... Selecting previously unselected package scour. Preparing to unpack .../103-scour_0.36-2_all.deb ... Unpacking scour (0.36-2) ... Selecting previously unselected package gnome-pkg-tools. Preparing to unpack .../104-gnome-pkg-tools_0.20.2ubuntu2_all.deb ... Unpacking gnome-pkg-tools (0.20.2ubuntu2) ... Selecting previously unselected package python3-lib2to3. Preparing to unpack .../105-python3-lib2to3_3.6.5-3_all.deb ... Unpacking python3-lib2to3 (3.6.5-3) ... Selecting previously unselected package python3-distutils. Preparing to unpack .../106-python3-distutils_3.6.5-3_all.deb ... Unpacking python3-distutils (3.6.5-3) ... Selecting previously unselected package python3-markupsafe. Preparing to unpack .../107-python3-markupsafe_1.0-1build1_s390x.deb ... Unpacking python3-markupsafe (1.0-1build1) ... Selecting previously unselected package python3-mako. Preparing to unpack .../108-python3-mako_1.0.7+ds1-1_all.deb ... Unpacking python3-mako (1.0.7+ds1-1) ... Selecting previously unselected package gobject-introspection. Preparing to unpack .../109-gobject-introspection_1.56.1-1_s390x.deb ... Unpacking gobject-introspection (1.56.1-1) ... Selecting previously unselected package pkg-config. Preparing to unpack .../110-pkg-config_0.29.1-0ubuntu2_s390x.deb ... Unpacking pkg-config (0.29.1-0ubuntu2) ... Selecting previously unselected package python-funcsigs. Preparing to unpack .../111-python-funcsigs_1.0.2-4_all.deb ... Unpacking python-funcsigs (1.0.2-4) ... Selecting previously unselected package python-pkg-resources. Preparing to unpack .../112-python-pkg-resources_39.0.1-2_all.deb ... Unpacking python-pkg-resources (39.0.1-2) ... Selecting previously unselected package python-six. Preparing to unpack .../113-python-six_1.11.0-2_all.deb ... Unpacking python-six (1.11.0-2) ... Selecting previously unselected package python-pbr. Preparing to unpack .../114-python-pbr_3.1.1-3ubuntu3_all.deb ... Unpacking python-pbr (3.1.1-3ubuntu3) ... Selecting previously unselected package python-mock. Preparing to unpack .../115-python-mock_2.0.0-3_all.deb ... Unpacking python-mock (2.0.0-3) ... Selecting previously unselected package libxslt1.1:s390x. Preparing to unpack .../116-libxslt1.1_1.1.29-5_s390x.deb ... Unpacking libxslt1.1:s390x (1.1.29-5) ... Selecting previously unselected package xsltproc. Preparing to unpack .../117-xsltproc_1.1.29-5_s390x.deb ... Unpacking xsltproc (1.1.29-5) ... Selecting previously unselected package liblua5.2-0:s390x. Preparing to unpack .../118-liblua5.2-0_5.2.4-1.1build1_s390x.deb ... Unpacking liblua5.2-0:s390x (5.2.4-1.1build1) ... Selecting previously unselected package highlight-common. Preparing to unpack .../119-highlight-common_3.41-1_all.deb ... Unpacking highlight-common (3.41-1) ... Selecting previously unselected package highlight. Preparing to unpack .../120-highlight_3.41-1_s390x.deb ... Unpacking highlight (3.41-1) ... Selecting previously unselected package gtk-doc-tools. Preparing to unpack .../121-gtk-doc-tools_1.27-3_all.deb ... Unpacking gtk-doc-tools (1.27-3) ... Selecting previously unselected package libglib2.0-bin. Preparing to unpack .../122-libglib2.0-bin_2.56.1-2ubuntu1_s390x.deb ... Unpacking libglib2.0-bin (2.56.1-2ubuntu1) ... Selecting previously unselected package libglib2.0-dev-bin. Preparing to unpack .../123-libglib2.0-dev-bin_2.56.1-2ubuntu1_s390x.deb ... Unpacking libglib2.0-dev-bin (2.56.1-2ubuntu1) ... Selecting previously unselected package libpcre16-3:s390x. Preparing to unpack .../124-libpcre16-3_2%3a8.39-9_s390x.deb ... Unpacking libpcre16-3:s390x (2:8.39-9) ... Selecting previously unselected package libpcre32-3:s390x. Preparing to unpack .../125-libpcre32-3_2%3a8.39-9_s390x.deb ... Unpacking libpcre32-3:s390x (2:8.39-9) ... Selecting previously unselected package libpcrecpp0v5:s390x. Preparing to unpack .../126-libpcrecpp0v5_2%3a8.39-9_s390x.deb ... Unpacking libpcrecpp0v5:s390x (2:8.39-9) ... Selecting previously unselected package libpcre3-dev:s390x. Preparing to unpack .../127-libpcre3-dev_2%3a8.39-9_s390x.deb ... Unpacking libpcre3-dev:s390x (2:8.39-9) ... Selecting previously unselected package zlib1g-dev:s390x. Preparing to unpack .../128-zlib1g-dev_1%3a1.2.11.dfsg-0ubuntu2_s390x.deb ... Unpacking zlib1g-dev:s390x (1:1.2.11.dfsg-0ubuntu2) ... Selecting previously unselected package libglib2.0-dev:s390x. Preparing to unpack .../129-libglib2.0-dev_2.56.1-2ubuntu1_s390x.deb ... Unpacking libglib2.0-dev:s390x (2.56.1-2ubuntu1) ... Selecting previously unselected package libffi-dev:s390x. Preparing to unpack .../130-libffi-dev_3.2.1-8_s390x.deb ... Unpacking libffi-dev:s390x (3.2.1-8) ... Selecting previously unselected package libgirepository1.0-dev:s390x. Preparing to unpack .../131-libgirepository1.0-dev_1.56.1-1_s390x.deb ... Unpacking libgirepository1.0-dev:s390x (1.56.1-1) ... Selecting previously unselected package x11-common. Preparing to unpack .../132-x11-common_1%3a7.7+19ubuntu7_all.deb ... Unpacking x11-common (1:7.7+19ubuntu7) ... Selecting previously unselected package libice6:s390x. Preparing to unpack .../133-libice6_2%3a1.0.9-2_s390x.deb ... Unpacking libice6:s390x (2:1.0.9-2) ... Selecting previously unselected package xorg-sgml-doctools. Preparing to unpack .../134-xorg-sgml-doctools_1%3a1.11-1_all.deb ... Unpacking xorg-sgml-doctools (1:1.11-1) ... Selecting previously unselected package x11proto-dev. Preparing to unpack .../135-x11proto-dev_2018.4-4_all.deb ... Unpacking x11proto-dev (2018.4-4) ... Selecting previously unselected package x11proto-core-dev. Preparing to unpack .../136-x11proto-core-dev_2018.4-4_all.deb ... Unpacking x11proto-core-dev (2018.4-4) ... Selecting previously unselected package libice-dev:s390x. Preparing to unpack .../137-libice-dev_2%3a1.0.9-2_s390x.deb ... Unpacking libice-dev:s390x (2:1.0.9-2) ... Selecting previously unselected package libpthread-stubs0-dev:s390x. Preparing to unpack .../138-libpthread-stubs0-dev_0.3-4_s390x.deb ... Unpacking libpthread-stubs0-dev:s390x (0.3-4) ... Selecting previously unselected package libsm6:s390x. Preparing to unpack .../139-libsm6_2%3a1.2.2-1_s390x.deb ... Unpacking libsm6:s390x (2:1.2.2-1) ... Selecting previously unselected package libsm-dev:s390x. Preparing to unpack .../140-libsm-dev_2%3a1.2.2-1_s390x.deb ... Unpacking libsm-dev:s390x (2:1.2.2-1) ... Selecting previously unselected package libtext-unidecode-perl. Preparing to unpack .../141-libtext-unidecode-perl_1.30-1_all.deb ... Unpacking libtext-unidecode-perl (1.30-1) ... Selecting previously unselected package libxau-dev:s390x. Preparing to unpack .../142-libxau-dev_1%3a1.0.8-1_s390x.deb ... Unpacking libxau-dev:s390x (1:1.0.8-1) ... Selecting previously unselected package libxdmcp-dev:s390x. Preparing to unpack .../143-libxdmcp-dev_1%3a1.1.2-3_s390x.deb ... Unpacking libxdmcp-dev:s390x (1:1.1.2-3) ... Selecting previously unselected package xtrans-dev. Preparing to unpack .../144-xtrans-dev_1.3.5-1_all.deb ... Unpacking xtrans-dev (1.3.5-1) ... Selecting previously unselected package libxcb1-dev:s390x. Preparing to unpack .../145-libxcb1-dev_1.13-1_s390x.deb ... Unpacking libxcb1-dev:s390x (1.13-1) ... Selecting previously unselected package libx11-dev:s390x. Preparing to unpack .../146-libx11-dev_2%3a1.6.4-3_s390x.deb ... Unpacking libx11-dev:s390x (2:1.6.4-3) ... Selecting previously unselected package libxml-namespacesupport-perl. Preparing to unpack .../147-libxml-namespacesupport-perl_1.12-1_all.deb ... Unpacking libxml-namespacesupport-perl (1.12-1) ... Selecting previously unselected package libxml-sax-base-perl. Preparing to unpack .../148-libxml-sax-base-perl_1.09-1_all.deb ... Unpacking libxml-sax-base-perl (1.09-1) ... Selecting previously unselected package libxml-sax-perl. Preparing to unpack .../149-libxml-sax-perl_0.99+dfsg-2ubuntu1_all.deb ... Unpacking libxml-sax-perl (0.99+dfsg-2ubuntu1) ... Selecting previously unselected package libxml-libxml-perl. Preparing to unpack .../150-libxml-libxml-perl_2.0128+dfsg-5_s390x.deb ... Unpacking libxml-libxml-perl (2.0128+dfsg-5) ... Selecting previously unselected package libxt6:s390x. Preparing to unpack .../151-libxt6_1%3a1.1.5-1_s390x.deb ... Unpacking libxt6:s390x (1:1.1.5-1) ... Selecting previously unselected package libxt-dev:s390x. Preparing to unpack .../152-libxt-dev_1%3a1.1.5-1_s390x.deb ... Unpacking libxt-dev:s390x (1:1.1.5-1) ... Selecting previously unselected package texinfo. Preparing to unpack .../153-texinfo_6.5.0.dfsg.1-2_s390x.deb ... Unpacking texinfo (6.5.0.dfsg.1-2) ... Selecting previously unselected package sbuild-build-depends-libgtop2-dummy. Preparing to unpack .../154-sbuild-build-depends-libgtop2-dummy_0.invalid.0_s390x.deb ... Unpacking sbuild-build-depends-libgtop2-dummy (0.invalid.0) ... Setting up libhtml-tagset-perl (3.20-3) ... Setting up libtry-tiny-perl (0.30-1) ... Setting up libicu60:s390x (60.2-3ubuntu3) ... Setting up libarchive-zip-perl (1.60-1) ... Setting up mime-support (3.60ubuntu1) ... Setting up libxml-namespacesupport-perl (1.12-1) ... Setting up libfile-which-perl (1.21-1) ... Setting up libencode-locale-perl (1.05-1) ... Setting up libtimedate-perl (2.3000-2) ... Setting up libjbig0:s390x (2.1-3.1build1) ... Setting up libsigsegv2:s390x (2.12-1) ... Setting up libpthread-stubs0-dev:s390x (0.3-4) ... Setting up fonts-dejavu-core (2.37-1) ... Setting up perl-openssl-defaults:s390x (3build1) ... Setting up libelf1:s390x (0.170-0.4) ... Setting up groff-base (1.22.3-10) ... Setting up libglib2.0-0:s390x (2.56.1-2ubuntu1) ... No schema files found: doing nothing. Setting up xorg-sgml-doctools (1:1.11-1) ... Setting up libio-html-perl (1.001-1) ... Setting up libtext-unidecode-perl (1.30-1) ... Setting up libonig4:s390x (6.7.0-1) ... Setting up libffi-dev:s390x (3.2.1-8) ... Setting up libgdk-pixbuf2.0-common (2.36.11-2) ... Setting up libosp5 (1.5.2-13ubuntu2) ... Setting up libdatrie1:s390x (0.2.10-7) ... Setting up gettext-base (0.19.8.1-6) ... Setting up libjpeg-turbo8:s390x (1.5.2-0ubuntu5) ... Setting up libpipeline1:s390x (1.5.0-1) ... Setting up m4 (1.4.18-1) ... Setting up sgml-base (1.29) ... Setting up libbsd0:s390x (0.8.7-1) ... Setting up ucf (3.0038) ... Setting up libgirepository-1.0-1:s390x (1.56.1-1) ... Setting up libxml2:s390x (2.9.4+dfsg1-6.1ubuntu1) ... Setting up x11proto-dev (2018.4-4) ... Setting up libfreetype6:s390x (2.8.1-2ubuntu2) ... Setting up libmagic-mgc (1:5.32-2) ... Setting up libmagic1:s390x (1:5.32-2) ... Setting up libgraphite2-3:s390x (1.3.11-2) ... Setting up libcroco3:s390x (0.6.12-2) ... Setting up libxslt1.1:s390x (1.1.29-5) ... Setting up libjq1:s390x (1.5+dfsg-2) ... Setting up libxml-sax-base-perl (1.09-1) ... Setting up pkg-config (0.29.1-0ubuntu2) ... Setting up libpixman-1-0:s390x (0.34.0-2) ... Setting up xtrans-dev (1.3.5-1) ... Setting up gir1.2-glib-2.0:s390x (1.56.1-1) ... Setting up libglib2.0-data (2.56.1-2ubuntu1) ... Setting up liblwp-mediatypes-perl (6.02-1) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Setting up autotools-dev (20180224.1) ... Setting up liburi-perl (1.73-1) ... Processing triggers for systemd (237-3ubuntu10) ... Setting up libhtml-parser-perl (3.72-3build1) ... Setting up shared-mime-info (1.9-2) ... Setting up libpcrecpp0v5:s390x (2:8.39-9) ... Setting up libpcre32-3:s390x (2:8.39-9) ... Setting up libnet-http-perl (6.17-1) ... Setting up liblua5.2-0:s390x (5.2.4-1.1build1) ... Setting up libpcre16-3:s390x (2:8.39-9) ... Setting up libthai-data (0.1.27-2) ... Setting up libxdmcp6:s390x (1:1.1.2-3) ... Setting up xml-core (0.18) ... Setting up bsdmainutils (11.1.2ubuntu1) ... update-alternatives: using /usr/bin/bsd-write to provide /usr/bin/write (write) in auto mode update-alternatives: using /usr/bin/bsd-from to provide /usr/bin/from (from) in auto mode Setting up x11-common (1:7.7+19ubuntu7) ... update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults Running in chroot, ignoring request. invoke-rc.d: policy-rc.d denied execution of start. Setting up libglib2.0-bin (2.56.1-2ubuntu1) ... Setting up libwww-robotrules-perl (6.01-1) ... Setting up libx11-data (2:1.6.4-3) ... Setting up libpython2.7-stdlib:s390x (2.7.15~rc1-1) ... Setting up libxau6:s390x (1:1.0.8-1) ... Setting up autopoint (0.19.8.1-6) ... Setting up libmpdec2:s390x (2.4.2-1ubuntu1) ... Setting up highlight-common (3.41-1) ... Setting up netbase (5.4) ... Setting up zlib1g-dev:s390x (1:1.2.11.dfsg-0ubuntu2) ... Setting up libfile-stripnondeterminism-perl (0.040-1.1~build1) ... Setting up libxml-sax-perl (0.99+dfsg-2ubuntu1) ... update-perl-sax-parsers: Registering Perl SAX parser XML::SAX::PurePerl with priority 10... update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... Creating config file /etc/perl/XML/SAX/ParserDetails.ini with new version Setting up libjpeg8:s390x (8c-2ubuntu8) ... Setting up libpython3.6-stdlib:s390x (3.6.5-3) ... Setting up jq (1.5+dfsg-2) ... Setting up libpcre3-dev:s390x (2:8.39-9) ... Setting up fontconfig-config (2.12.6-0ubuntu2) ... Setting up libhttp-date-perl (6.02-1) ... Setting up python3.6 (3.6.5-3) ... Setting up opensp (1.5.2-13ubuntu2) ... Setting up tex-common (6.09) ... update-language: texlive-base not installed and configured, doing nothing! Setting up x11proto-core-dev (2018.4-4) ... Setting up gettext (0.19.8.1-6) ... Setting up libnet-ssleay-perl (1.84-1build1) ... Setting up gir1.2-freedesktop:s390x (1.56.1-1) ... Setting up python2.7 (2.7.15~rc1-1) ... Setting up libharfbuzz0b:s390x (1.7.2-1ubuntu1) ... Setting up libtiff5:s390x (4.0.9-5) ... Setting up libxau-dev:s390x (1:1.0.8-1) ... Setting up xsltproc (1.1.29-5) ... Setting up autoconf (2.69-11) ... Setting up libthai0:s390x (0.1.27-2) ... Setting up file (1:5.32-2) ... Setting up libio-socket-ssl-perl (2.056-1) ... Setting up libhtml-tree-perl (5.07-1) ... Setting up libpython-stdlib:s390x (2.7.15~rc1-1) ... Setting up intltool-debian (0.35.0+20060710.4) ... Setting up libxdmcp-dev:s390x (1:1.1.2-3) ... Setting up highlight (3.41-1) ... Setting up automake (1:1.15.1-3ubuntu2) ... update-alternatives: using /usr/bin/automake-1.15 to provide /usr/bin/automake (automake) in auto mode Setting up libice6:s390x (2:1.0.9-2) ... Setting up libfile-listing-perl (6.04-1) ... Setting up man-db (2.8.3-2) ... Not building database; man-db/auto-update is not 'true'. Setting up libhttp-message-perl (6.14-1) ... Setting up libxml-libxml-perl (2.0128+dfsg-5) ... update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX::Parser with priority 50... update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX with priority 50... update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... Replacing config file /etc/perl/XML/SAX/ParserDetails.ini with new version Setting up libxcb1:s390x (1.13-1) ... Setting up python (2.7.15~rc1-1) ... Setting up libhttp-negotiate-perl (6.00-2) ... Setting up libtool (2.4.6-2) ... Setting up libpython3-stdlib:s390x (3.6.5-3) ... Setting up libfontconfig1:s390x (2.12.6-0ubuntu2) ... Setting up libsm6:s390x (2:1.2.2-1) ... Setting up libxcb-render0:s390x (1.13-1) ... Setting up po-debconf (1.0.20) ... Setting up python3 (3.6.5-3) ... Setting up libhttp-cookies-perl (6.04-1) ... Setting up python3-six (1.11.0-2) ... Setting up libx11-6:s390x (2:1.6.4-3) ... Setting up python3-pkg-resources (39.0.1-2) ... Setting up python-pkg-resources (39.0.1-2) ... Setting up python3-gi (3.26.1-2) ... Setting up python3-markupsafe (1.0-1build1) ... Setting up python-six (1.11.0-2) ... Setting up libice-dev:s390x (2:1.0.9-2) ... Setting up python-pbr (3.1.1-3ubuntu3) ... update-alternatives: using /usr/bin/python2-pbr to provide /usr/bin/pbr (pbr) in auto mode Setting up libxcb-shm0:s390x (1.13-1) ... Setting up python-funcsigs (1.0.2-4) ... Setting up libxt6:s390x (1:1.1.5-1) ... Setting up libxrender1:s390x (1:0.9.10-1) ... Setting up libxcb1-dev:s390x (1.13-1) ... Setting up texinfo (6.5.0.dfsg.1-2) ... Setting up libx11-dev:s390x (2:1.6.4-3) ... Setting up python3-lib2to3 (3.6.5-3) ... Setting up python3-distutils (3.6.5-3) ... Setting up fontconfig (2.12.6-0ubuntu2) ... Regenerating fonts cache... done. Setting up libsm-dev:s390x (2:1.2.2-1) ... Setting up libxext6:s390x (2:1.3.3-1) ... Setting up libglib2.0-dev-bin (2.56.1-2ubuntu1) ... Setting up python3-mako (1.0.7+ds1-1) ... Setting up libgdk-pixbuf2.0-0:s390x (2.36.11-2) ... Setting up python-mock (2.0.0-3) ... Setting up python3-scour (0.36-2) ... Setting up gir1.2-gdkpixbuf-2.0:s390x (2.36.11-2) ... Setting up scour (0.36-2) ... Setting up libglib2.0-dev:s390x (2.56.1-2ubuntu1) ... Setting up libpango-1.0-0:s390x (1.40.14-1) ... Setting up libcairo2:s390x (1.15.10-2) ... Setting up libxt-dev:s390x (1:1.1.5-1) ... Setting up gobject-introspection (1.56.1-1) ... Setting up libcairo-gobject2:s390x (1.15.10-2) ... Setting up libpangoft2-1.0-0:s390x (1.40.14-1) ... Setting up python3-cairo:s390x (1.16.2-1) ... Setting up libgirepository1.0-dev:s390x (1.56.1-1) ... Setting up libpangocairo-1.0-0:s390x (1.40.14-1) ... Setting up python3-gi-cairo (3.26.1-2) ... Setting up librsvg2-2:s390x (2.40.20-2) ... Setting up gir1.2-rsvg-2.0:s390x (2.40.20-2) ... Processing triggers for sgml-base (1.29) ... Setting up sgml-data (2.0.10) ... Setting up docbook-xsl (1.79.1+dfsg-2) ... Processing triggers for sgml-base (1.29) ... Setting up docbook-xml (4.5-8) ... Setting up docbook (4.5-6) ... Processing triggers for sgml-base (1.29) ... Setting up docbook-to-man (1:2.0.0-41) ... Setting up gtk-doc-tools (1.27-3) ... Setting up dh-autoreconf (17) ... Setting up liblwp-protocol-https-perl (6.07-2) ... Setting up dh-strip-nondeterminism (0.040-1.1~build1) ... Setting up libwww-perl (6.31-1) ... Setting up debhelper (11.1.6ubuntu1) ... Setting up libxml-parser-perl (2.44-2build3) ... Setting up intltool (0.51.0-5ubuntu1) ... Setting up dh-translations (138) ... Setting up gnome-pkg-tools (0.20.2ubuntu2) ... Setting up sbuild-build-depends-libgtop2-dummy (0.invalid.0) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Processing triggers for systemd (237-3ubuntu10) ... +------------------------------------------------------------------------------+ | Build environment | +------------------------------------------------------------------------------+ Kernel: Linux 4.4.0-122-generic s390x (s390x) Toolchain package versions: binutils_2.30-15ubuntu1 dpkg-dev_1.19.0.5ubuntu2 g++-7_7.3.0-16ubuntu3 gcc-7_7.3.0-16ubuntu3 libc6-dev_2.27-3ubuntu1 libstdc++-7-dev_7.3.0-16ubuntu3 libstdc++6_8-20180414-1ubuntu2 linux-libc-dev_4.15.0-21.22 Package versions: adduser_3.116ubuntu1 advancecomp_2.1-1 apt_1.6.1 autoconf_2.69-11 automake_1:1.15.1-3ubuntu2 autopoint_0.19.8.1-6 autotools-dev_20180224.1 base-files_10.1ubuntu2 base-passwd_3.5.44 bash_4.4.18-2ubuntu1 binutils_2.30-15ubuntu1 binutils-common_2.30-15ubuntu1 binutils-s390x-linux-gnu_2.30-15ubuntu1 bsdmainutils_11.1.2ubuntu1 bsdutils_1:2.31.1-0.4ubuntu3 build-essential_12.4ubuntu1 bzip2_1.0.6-8.1 ca-certificates_20180409 coreutils_8.28-1ubuntu1 cpp_4:7.3.0-3ubuntu2 cpp-7_7.3.0-16ubuntu3 dash_0.5.8-2.10 debconf_1.5.66 debhelper_11.1.6ubuntu1 debianutils_4.8.4 dh-autoreconf_17 dh-strip-nondeterminism_0.040-1.1~build1 dh-translations_138 diffutils_1:3.6-1 dmsetup_2:1.02.145-4.1ubuntu3 docbook_4.5-6 docbook-to-man_1:2.0.0-41 docbook-xml_4.5-8 docbook-xsl_1.79.1+dfsg-2 dpkg_1.19.0.5ubuntu2 dpkg-dev_1.19.0.5ubuntu2 e2fslibs_1.44.1-1 e2fsprogs_1.44.1-1 fakeroot_1.22-2ubuntu1 fdisk_2.31.1-0.4ubuntu3 file_1:5.32-2 findutils_4.6.0+git+20170828-2 fontconfig_2.12.6-0ubuntu2 fontconfig-config_2.12.6-0ubuntu2 fonts-dejavu-core_2.37-1 g++_4:7.3.0-3ubuntu2 g++-7_7.3.0-16ubuntu3 gcc_4:7.3.0-3ubuntu2 gcc-7_7.3.0-16ubuntu3 gcc-7-base_7.3.0-16ubuntu3 gcc-8-base_8-20180414-1ubuntu2 gettext_0.19.8.1-6 gettext-base_0.19.8.1-6 gir1.2-freedesktop_1.56.1-1 gir1.2-gdkpixbuf-2.0_2.36.11-2 gir1.2-glib-2.0_1.56.1-1 gir1.2-rsvg-2.0_2.40.20-2 gnome-pkg-tools_0.20.2ubuntu2 gobject-introspection_1.56.1-1 gpg_2.2.4-1ubuntu1 gpg-agent_2.2.4-1ubuntu1 gpgconf_2.2.4-1ubuntu1 gpgv_2.2.4-1ubuntu1 grep_3.1-2 groff-base_1.22.3-10 gtk-doc-tools_1.27-3 gzip_1.6-5ubuntu1 highlight_3.41-1 highlight-common_3.41-1 hostname_3.20 init_1.51 init-system-helpers_1.51 initscripts_2.88dsf-59.3ubuntu2 insserv_1.14.0-5ubuntu3 intltool_0.51.0-5ubuntu1 intltool-debian_0.35.0+20060710.4 jq_1.5+dfsg-2 libacl1_2.2.52-3build1 libapparmor1_2.12-4ubuntu5 libapt-pkg5.0_1.6.1 libarchive-zip-perl_1.60-1 libargon2-0_0~20161029-1.1 libasan4_7.3.0-16ubuntu3 libassuan0_2.5.1-2 libatomic1_8-20180414-1ubuntu2 libattr1_1:2.4.47-2build1 libaudit-common_1:2.8.2-1ubuntu1 libaudit1_1:2.8.2-1ubuntu1 libbinutils_2.30-15ubuntu1 libblkid1_2.31.1-0.4ubuntu3 libbsd0_0.8.7-1 libbz2-1.0_1.0.6-8.1 libc-bin_2.27-3ubuntu1 libc-dev-bin_2.27-3ubuntu1 libc6_2.27-3ubuntu1 libc6-dev_2.27-3ubuntu1 libcairo-gobject2_1.15.10-2 libcairo2_1.15.10-2 libcap-ng0_0.7.7-3.1 libcap2_1:2.25-1.2 libcc1-0_8-20180414-1ubuntu2 libcom-err2_1.44.1-1 libcomerr2_1.44.1-1 libcroco3_0.6.12-2 libcryptsetup12_2:2.0.2-1ubuntu1 libdatrie1_0.2.10-7 libdb5.3_5.3.28-13.1ubuntu1 libdebconfclient0_0.213ubuntu1 libdevmapper1.02.1_2:1.02.145-4.1ubuntu3 libdpkg-perl_1.19.0.5ubuntu2 libelf1_0.170-0.4 libencode-locale-perl_1.05-1 libexpat1_2.2.5-3 libext2fs2_1.44.1-1 libfakeroot_1.22-2ubuntu1 libfdisk1_2.31.1-0.4ubuntu3 libffi-dev_3.2.1-8 libffi6_3.2.1-8 libfile-listing-perl_6.04-1 libfile-stripnondeterminism-perl_0.040-1.1~build1 libfile-which-perl_1.21-1 libfontconfig1_2.12.6-0ubuntu2 libfreetype6_2.8.1-2ubuntu2 libgcc-7-dev_7.3.0-16ubuntu3 libgcc1_1:8-20180414-1ubuntu2 libgcrypt20_1.8.1-4ubuntu1 libgdbm-compat4_1.14.1-6 libgdbm5_1.14.1-6 libgdk-pixbuf2.0-0_2.36.11-2 libgdk-pixbuf2.0-common_2.36.11-2 libgirepository-1.0-1_1.56.1-1 libgirepository1.0-dev_1.56.1-1 libglib2.0-0_2.56.1-2ubuntu1 libglib2.0-bin_2.56.1-2ubuntu1 libglib2.0-data_2.56.1-2ubuntu1 libglib2.0-dev_2.56.1-2ubuntu1 libglib2.0-dev-bin_2.56.1-2ubuntu1 libgmp10_2:6.1.2+dfsg-2 libgnutls30_3.5.18-1ubuntu1 libgomp1_8-20180414-1ubuntu2 libgpg-error0_1.27-6 libgraphite2-3_1.3.11-2 libharfbuzz0b_1.7.2-1ubuntu1 libhogweed4_3.4-1 libhtml-parser-perl_3.72-3build1 libhtml-tagset-perl_3.20-3 libhtml-tree-perl_5.07-1 libhttp-cookies-perl_6.04-1 libhttp-date-perl_6.02-1 libhttp-message-perl_6.14-1 libhttp-negotiate-perl_6.00-2 libice-dev_2:1.0.9-2 libice6_2:1.0.9-2 libicu60_60.2-3ubuntu3 libidn11_1.33-2.1ubuntu1 libidn2-0_2.0.4-1.1build2 libio-html-perl_1.001-1 libio-socket-ssl-perl_2.056-1 libip4tc0_1.6.1-2ubuntu2 libisl19_0.19-1 libitm1_8-20180414-1ubuntu2 libjbig0_2.1-3.1build1 libjpeg-turbo8_1.5.2-0ubuntu5 libjpeg8_8c-2ubuntu8 libjq1_1.5+dfsg-2 libjson-c3_0.12.1-1.3 libkmod2_24-1ubuntu3 liblockfile-bin_1.14-1.1 liblockfile1_1.14-1.1 liblua5.2-0_5.2.4-1.1build1 liblwp-mediatypes-perl_6.02-1 liblwp-protocol-https-perl_6.07-2 liblz4-1_0.0~r131-2ubuntu3 liblzma5_5.2.2-1.3 libmagic-mgc_1:5.32-2 libmagic1_1:5.32-2 libmount1_2.31.1-0.4ubuntu3 libmpc3_1.1.0-1 libmpdec2_2.4.2-1ubuntu1 libmpfr6_4.0.1-1 libncurses5_6.1-1ubuntu1 libncursesw5_6.1-1ubuntu1 libnet-http-perl_6.17-1 libnet-ssleay-perl_1.84-1build1 libnettle6_3.4-1 libnpth0_1.5-3 libonig4_6.7.0-1 libosp5_1.5.2-13ubuntu2 libp11-kit0_0.23.9-2 libpam-modules_1.1.8-3.6ubuntu2 libpam-modules-bin_1.1.8-3.6ubuntu2 libpam-runtime_1.1.8-3.6ubuntu2 libpam0g_1.1.8-3.6ubuntu2 libpango-1.0-0_1.40.14-1 libpangocairo-1.0-0_1.40.14-1 libpangoft2-1.0-0_1.40.14-1 libpcre16-3_2:8.39-9 libpcre3_2:8.39-9 libpcre3-dev_2:8.39-9 libpcre32-3_2:8.39-9 libpcrecpp0v5_2:8.39-9 libperl5.26_5.26.1-6 libpipeline1_1.5.0-1 libpixman-1-0_0.34.0-2 libpng16-16_1.6.34-1 libprocps6_2:3.3.12-3ubuntu1 libpthread-stubs0-dev_0.3-4 libpython-stdlib_2.7.15~rc1-1 libpython2.7-minimal_2.7.15~rc1-1 libpython2.7-stdlib_2.7.15~rc1-1 libpython3-stdlib_3.6.5-3 libpython3.6-minimal_3.6.5-3 libpython3.6-stdlib_3.6.5-3 libreadline7_7.0-3 librsvg2-2_2.40.20-2 libseccomp2_2.3.1-2.1ubuntu4 libselinux1_2.7-2build2 libsemanage-common_2.7-2build2 libsemanage1_2.7-2build2 libsepol1_2.7-1 libsigsegv2_2.12-1 libslang2_2.3.1a-3ubuntu1 libsm-dev_2:1.2.2-1 libsm6_2:1.2.2-1 libsmartcols1_2.31.1-0.4ubuntu3 libsqlite3-0_3.22.0-1 libss2_1.44.1-1 libssl1.1_1.1.0g-2ubuntu4 libstdc++-7-dev_7.3.0-16ubuntu3 libstdc++6_8-20180414-1ubuntu2 libsystemd0_237-3ubuntu10 libtasn1-6_4.13-2 libtext-unidecode-perl_1.30-1 libthai-data_0.1.27-2 libthai0_0.1.27-2 libtiff5_4.0.9-5 libtimedate-perl_2.3000-2 libtinfo5_6.1-1ubuntu1 libtool_2.4.6-2 libtry-tiny-perl_0.30-1 libubsan0_7.3.0-16ubuntu3 libudev1_237-3ubuntu10 libunistring2_0.9.9-0ubuntu1 liburi-perl_1.73-1 libusb-0.1-4_2:0.1.12-31 libustr-1.0-1_1.0.4-6 libuuid1_2.31.1-0.4ubuntu3 libwww-perl_6.31-1 libwww-robotrules-perl_6.01-1 libx11-6_2:1.6.4-3 libx11-data_2:1.6.4-3 libx11-dev_2:1.6.4-3 libxau-dev_1:1.0.8-1 libxau6_1:1.0.8-1 libxcb-render0_1.13-1 libxcb-shm0_1.13-1 libxcb1_1.13-1 libxcb1-dev_1.13-1 libxdmcp-dev_1:1.1.2-3 libxdmcp6_1:1.1.2-3 libxext6_2:1.3.3-1 libxml-libxml-perl_2.0128+dfsg-5 libxml-namespacesupport-perl_1.12-1 libxml-parser-perl_2.44-2build3 libxml-sax-base-perl_1.09-1 libxml-sax-perl_0.99+dfsg-2ubuntu1 libxml2_2.9.4+dfsg1-6.1ubuntu1 libxrender1_1:0.9.10-1 libxslt1.1_1.1.29-5 libxt-dev_1:1.1.5-1 libxt6_1:1.1.5-1 libzstd1_1.3.3+dfsg-2ubuntu1 linux-libc-dev_4.15.0-21.22 lockfile-progs_0.1.17build1 login_1:4.5-1ubuntu1 lsb-base_9.20170808ubuntu1 m4_1.4.18-1 make_4.1-9.1ubuntu1 man-db_2.8.3-2 mawk_1.3.3-17ubuntu3 mime-support_3.60ubuntu1 mount_2.31.1-0.4ubuntu3 multiarch-support_2.27-3ubuntu1 ncurses-base_6.1-1ubuntu1 ncurses-bin_6.1-1ubuntu1 netbase_5.4 opensp_1.5.2-13ubuntu2 openssl_1.1.0g-2ubuntu4 optipng_0.7.6-1.1 passwd_1:4.5-1ubuntu1 patch_2.7.6-2ubuntu1 perl_5.26.1-6 perl-base_5.26.1-6 perl-modules-5.26_5.26.1-6 perl-openssl-defaults_3build1 pinentry-curses_1.1.0-1 pkg-config_0.29.1-0ubuntu2 pkgbinarymangler_138 po-debconf_1.0.20 policyrcd-script-zg2_0.1-3 procps_2:3.3.12-3ubuntu1 python_2.7.15~rc1-1 python-funcsigs_1.0.2-4 python-minimal_2.7.15~rc1-1 python-mock_2.0.0-3 python-pbr_3.1.1-3ubuntu3 python-pkg-resources_39.0.1-2 python-six_1.11.0-2 python2.7_2.7.15~rc1-1 python2.7-minimal_2.7.15~rc1-1 python3_3.6.5-3 python3-cairo_1.16.2-1 python3-distutils_3.6.5-3 python3-gi_3.26.1-2 python3-gi-cairo_3.26.1-2 python3-lib2to3_3.6.5-3 python3-mako_1.0.7+ds1-1 python3-markupsafe_1.0-1build1 python3-minimal_3.6.5-3 python3-pkg-resources_39.0.1-2 python3-scour_0.36-2 python3-six_1.11.0-2 python3.6_3.6.5-3 python3.6-minimal_3.6.5-3 readline-common_7.0-3 sbuild-build-depends-core-dummy_0.invalid.0 sbuild-build-depends-libgtop2-dummy_0.invalid.0 scour_0.36-2 sed_4.4-2 sensible-utils_0.0.12 sgml-base_1.29 sgml-data_2.0.10 shared-mime-info_1.9-2 systemd_237-3ubuntu10 systemd-sysv_237-3ubuntu10 sysv-rc_2.88dsf-59.3ubuntu2 sysvinit-utils_2.88dsf-59.10ubuntu1 tar_1.29b-2 tex-common_6.09 texinfo_6.5.0.dfsg.1-2 tzdata_2018d-1 ubuntu-keyring_2018.02.28 ucf_3.0038 util-linux_2.31.1-0.4ubuntu3 x11-common_1:7.7+19ubuntu7 x11proto-core-dev_2018.4-4 x11proto-dev_2018.4-4 xml-core_0.18 xorg-sgml-doctools_1:1.11-1 xsltproc_1.1.29-5 xtrans-dev_1.3.5-1 xz-utils_5.2.2-1.3 zlib1g_1:1.2.11.dfsg-0ubuntu2 zlib1g-dev_1:1.2.11.dfsg-0ubuntu2 +------------------------------------------------------------------------------+ | Build | +------------------------------------------------------------------------------+ Unpack source ------------- gpgv: Signature made Thu May 3 11:56:18 2018 UTC gpgv: using DSA key 431A3CEDA2D7D292 gpgv: Can't check signature: No public key dpkg-source: warning: failed to verify signature on ./libgtop2_2.38.0-2ubuntu0.18.04.1.dsc dpkg-source: info: extracting libgtop2 in libgtop2-2.38.0 dpkg-source: info: unpacking libgtop2_2.38.0.orig.tar.xz dpkg-source: info: unpacking libgtop2_2.38.0-2ubuntu0.18.04.1.debian.tar.xz dpkg-source: info: applying 03_kfreebsd_installdirs.patch dpkg-source: info: applying 04_kfreebsd_version.patch dpkg-source: info: applying 05-mountlist-ignore-snap-squashfs.patch Check disc space ---------------- Sufficient free space for build User Environment ---------------- APT_CONFIG=/var/lib/sbuild/apt.conf DEB_BUILD_OPTIONS=parallel=4 HOME=/sbuild-nonexistent LANG=C.UTF-8 LC_ALL=C.UTF-8 LOGNAME=buildd PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games SCHROOT_ALIAS_NAME=build-PACKAGEBUILD-14822017 SCHROOT_CHROOT_NAME=build-PACKAGEBUILD-14822017 SCHROOT_COMMAND=env SCHROOT_GID=2501 SCHROOT_GROUP=buildd SCHROOT_SESSION_ID=build-PACKAGEBUILD-14822017 SCHROOT_UID=2001 SCHROOT_USER=buildd SHELL=/bin/sh TERM=unknown USER=buildd V=1 dpkg-buildpackage ----------------- dpkg-buildpackage: info: source package libgtop2 dpkg-buildpackage: info: source version 2.38.0-2ubuntu0.18.04.1 dpkg-buildpackage: info: source distribution bionic dpkg-source --before-build libgtop2-2.38.0 dpkg-buildpackage: info: host architecture s390x fakeroot debian/rules clean dh clean --with gnome,gir dh_gnome_clean dh_clean debian/rules build-arch dh build-arch --with gnome,gir dh_update_autotools_config -a debian/rules override_dh_autoreconf make[1]: Entering directory '/<>' dh_autoreconf --as-needed Copying file m4/codeset.m4 Copying file m4/extern-inline.m4 Copying file m4/fcntl-o.m4 Copying file m4/glibc2.m4 Copying file m4/glibc21.m4 Copying file m4/intdiv0.m4 Copying file m4/intl.m4 Copying file m4/intldir.m4 Copying file m4/intmax.m4 Copying file m4/inttypes-pri.m4 Copying file m4/inttypes_h.m4 Copying file m4/lcmessage.m4 Copying file m4/lock.m4 Copying file m4/longlong.m4 Copying file m4/printf-posix.m4 Copying file m4/size_max.m4 Copying file m4/stdint_h.m4 Copying file m4/threadlib.m4 Copying file m4/uintmax_t.m4 Copying file m4/visibility.m4 Copying file m4/wchar_t.m4 Copying file m4/wint_t.m4 Copying file m4/xsize.m4 Copying file po/Makevars.template libtoolize: putting auxiliary files in '.'. libtoolize: copying file './ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. libtoolize: copying file 'm4/libtool.m4' libtoolize: copying file 'm4/ltoptions.m4' libtoolize: copying file 'm4/ltsugar.m4' libtoolize: copying file 'm4/ltversion.m4' libtoolize: copying file 'm4/lt~obsolete.m4' configure.ac:56: installing './compile' configure.ac:36: installing './missing' examples/Makefile.am: installing './depcomp' patching file ./ltmain.sh make[1]: Leaving directory '/<>' debian/rules override_dh_auto_configure make[1]: Entering directory '/<>' dh_auto_configure -- \ --libdir=/usr/lib/s390x-linux-gnu \ --libexecdir=\${libdir}/libgtop-2.0-11 ./configure --build=s390x-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/s390x-linux-gnu --libexecdir=\${prefix}/lib/s390x-linux-gnu --runstatedir=/run --disable-maintainer-mode --disable-dependency-tracking --libdir=/usr/lib/s390x-linux-gnu --libexecdir=\${libdir}/libgtop-2.0-11 configure: WARNING: unrecognized options: --disable-maintainer-mode checking build system type... s390x-ibm-linux-gnu checking host system type... s390x-ibm-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether UID '2001' is supported by ustar format... yes checking whether GID '2501' is supported by ustar format... yes checking how to create a ustar tar archive... gnutar checking whether make supports nested variables... (cached) yes checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for gobject-introspection... yes checking for style of include used by make... GNU checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking dependency style of gcc... none checking for library containing strerror... none required checking for gcc... (cached) gcc checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ISO C89... (cached) none needed checking whether gcc understands -c and -o together... (cached) yes checking dependency style of gcc... (cached) none checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for gawk... (cached) mawk checking for perl5... no checking for perl... perl checking for gcc... (cached) gcc checking for ranlib... ranlib checking for as... as checking for ar... ar checking whether ln -s works... yes checking whether make sets $(MAKE)... (cached) yes checking how to print strings... printf checking for a sed that does not truncate output... /bin/sed checking for fgrep... /bin/grep -F checking for ld used by gcc... /usr/bin/s390x-linux-gnu-ld checking if the linker (/usr/bin/s390x-linux-gnu-ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking the maximum length of command line arguments... 1572864 checking how to convert s390x-ibm-linux-gnu file names to s390x-ibm-linux-gnu format... func_convert_file_noop checking how to convert s390x-ibm-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/bin/s390x-linux-gnu-ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... (cached) ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for a working dd... /bin/dd checking how to truncate binary pipes... /bin/dd bs=4096 count=1 checking for mt... no checking if : is a manifest tool... no checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/s390x-linux-gnu-ld -m elf64_s390) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking for libgtop sysdeps directory... linux checking linux/version.h usability... yes checking linux/version.h presence... yes checking for linux/version.h... yes checking for Linux kernel version code... 266001 checking whether we need libgtop... no checking sys/bitypes.h usability... yes checking sys/bitypes.h presence... yes checking for sys/bitypes.h... yes checking for GLIB... yes checking ifaddrs.h usability... yes checking ifaddrs.h presence... yes checking for ifaddrs.h... yes checking for an ANSI C-conforming const... yes checking for inline... inline checking for off_t... yes checking for pid_t... yes checking for size_t... yes checking for struct stat.st_rdev... yes checking whether time.h and sys/time.h may both be included... yes checking whether struct tm is in sys/time.h or time.h... time.h checking for uid_t in sys/types.h... yes checking for ssize_t... yes checking for memory.h... (cached) yes checking for string.h... (cached) yes checking for strerror... yes checking for dlopen... no checking for dlopen in -ldl... yes checking for dlerror... yes checking linux/isdn.h usability... yes checking linux/isdn.h presence... yes checking for linux/isdn.h... yes checking for vmgetinfo in -lperfstat... no checking for vm_statistics in -lmach... no checking whether program_invocation_name must be declared... no checking for socket... yes checking netinet/in.h usability... yes checking netinet/in.h presence... yes checking for netinet/in.h... yes checking arpa/inet.h usability... yes checking arpa/inet.h presence... yes checking for arpa/inet.h... yes checking "for sun_len member in struct sockaddr_un"... no checking for working alloca.h... yes checking for alloca... yes checking for stdlib.h... (cached) yes checking for unistd.h... (cached) yes checking for sys/param.h... yes checking for getpagesize... yes checking for working mmap... yes checking return type of signal handlers... void checking for strftime... yes checking for getcwd... yes checking for gettimeofday... yes checking for getwd... yes checking for putenv... yes checking for strdup... yes checking for strtoul... yes checking for uname... yes checking whether NLS is requested... yes checking for msgfmt... /usr/bin/msgfmt checking for gmsgfmt... /usr/bin/msgfmt checking for xgettext... /usr/bin/xgettext checking for msgmerge... /usr/bin/msgmerge checking for ld used by gcc... /usr/bin/s390x-linux-gnu-ld -m elf64_s390 checking if the linker (/usr/bin/s390x-linux-gnu-ld -m elf64_s390) is GNU ld... yes checking for shared library run path origin... done checking for CFPreferencesCopyAppValue... no checking for CFLocaleCopyCurrent... no checking for GNU gettext in libc... yes checking whether to use NLS... yes checking where the gettext function comes from... libc checking for X... libraries , headers checking for gethostbyname... yes checking for connect... yes checking for remove... yes checking for shmat... yes checking for IceConnectionNumber in -lICE... yes checking for gethostbyname... (cached) yes checking for connect... (cached) yes checking for inet_aton... yes checking X11/Xauth.h usability... yes checking X11/Xauth.h presence... yes checking for X11/Xauth.h... yes checking for XauGetAuthByAddr in -lXau... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking for sys/param.h... (cached) yes checking sys/statfs.h usability... yes checking sys/statfs.h presence... yes checking for sys/statfs.h... yes checking sys/fstyp.h usability... no checking sys/fstyp.h presence... no checking for sys/fstyp.h... no checking mnttab.h usability... no checking mnttab.h presence... no checking for mnttab.h... no checking mntent.h usability... yes checking mntent.h presence... yes checking for mntent.h... yes checking sys/statvfs.h usability... yes checking sys/statvfs.h presence... yes checking for sys/statvfs.h... yes checking sys/vfs.h usability... yes checking sys/vfs.h presence... yes checking for sys/vfs.h... yes checking sys/mount.h usability... yes checking sys/mount.h presence... yes checking for sys/mount.h... yes checking sys/filsys.h usability... no checking sys/filsys.h presence... no checking for sys/filsys.h... no checking sys/fs_types.h usability... no checking sys/fs_types.h presence... no checking for sys/fs_types.h... no checking sys/fs/s5param.h usability... no checking sys/fs/s5param.h presence... no checking for sys/fs/s5param.h... no checking for bcopy... yes checking for endgrent... yes checking for endpwent... yes checking for fchdir... yes checking for ftime... yes checking for ftruncate... yes checking for getcwd... (cached) yes checking for getmntinfo... no checking for gettimeofday... (cached) yes checking for isascii... yes checking for lchown... yes checking for listmntent... no checking for memcpy... yes checking for mkfifo... yes checking for strchr... yes checking for strerror... (cached) yes checking for strrchr... yes checking for vprintf... yes checking for library containing getmntent... none required checking for listmntent of Cray/Unicos-9... no checking for one-argument getmntent function... yes configure: checking how to get filesystem space usage... checking statvfs function (SVR4)... yes checking for statfs that truncates block counts... no configure: checking for AFS... checking for gtk-doc... yes checking for gtkdoc-check... gtkdoc-check.test checking for gtkdoc-check... /usr/bin/gtkdoc-check checking for gtkdoc-rebase... /usr/bin/gtkdoc-rebase checking for gtkdoc-mkpdf... /usr/bin/gtkdoc-mkpdf checking whether to build gtk-doc documentation... no checking for GTKDOC_DEPS... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating libgtop.spec config.status: creating po/Makefile.in config.status: creating misc/Makefile config.status: creating include/Makefile config.status: creating include/glibtop/Makefile config.status: creating sysdeps/Makefile config.status: creating sysdeps/common/Makefile config.status: creating sysdeps/stub/Makefile config.status: creating sysdeps/stub_suid/Makefile config.status: creating sysdeps/sun4/Makefile config.status: creating sysdeps/osf1/Makefile config.status: creating sysdeps/linux/Makefile config.status: creating sysdeps/freebsd/Makefile config.status: creating sysdeps/solaris/Makefile config.status: creating sysdeps/aix/Makefile config.status: creating sysdeps/bsd/Makefile config.status: creating sysdeps/darwin/Makefile config.status: creating sysdeps/cygwin/Makefile config.status: creating sysdeps/openbsd/Makefile config.status: creating src/Makefile config.status: creating src/daemon/Makefile config.status: creating lib/Makefile config.status: creating examples/Makefile config.status: creating doc/Makefile config.status: creating doc/reference/Makefile config.status: creating doc/reference/version.xml config.status: creating libgtop-2.0.pc config.status: creating libgtopconfig.h config.status: creating config.h config.status: executing depfiles commands config.status: executing libtool commands config.status: executing po-directories commands config.status: creating po/POTFILES config.status: creating po/Makefile configure: WARNING: unrecognized options: --disable-maintainer-mode make[1]: Leaving directory '/<>' dh_auto_build -a make -j4 -O make all-recursive Making all in po make[3]: Nothing to be done for 'all'. Making all in misc make[3]: Nothing to be done for 'all'. Making all in include Making all in glibtop make[4]: Nothing to be done for 'all'. make[4]: Nothing to be done for 'all-am'. Making all in sysdeps Making all in common make[4]: Entering directory '/<>/sysdeps/common' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o procargs.lo procargs.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procargs.c -fPIC -DPIC -o .libs/procargs.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procargs.c -o procargs.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/common' make[4]: Entering directory '/<>/sysdeps/common' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o error.lo error.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c error.c -fPIC -DPIC -o .libs/error.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c error.c -o error.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/common' make[4]: Entering directory '/<>/sysdeps/common' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o gnuslib.lo gnuslib.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c gnuslib.c -fPIC -DPIC -o .libs/gnuslib.o gnuslib.c: In function ‘connect_to_internet_server’: gnuslib.c:287:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result] write (s, buf, strlen (buf)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ gnuslib.c:288:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result] write (s, server_xauth->data, server_xauth->data_length); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gnuslib.c:295:2: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result] write (s, buf, strlen (buf)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c gnuslib.c -o gnuslib.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/common' make[4]: Entering directory '/<>/sysdeps/common' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o default.lo default.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c default.c -fPIC -DPIC -o .libs/default.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c default.c -o default.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/common' make[4]: Entering directory '/<>/sysdeps/common' /bin/bash ../../libtool --tag=CC --mode=link gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,defs -Wl,-O1 -Wl,--as-needed -o libgtop_common-2.0.la error.lo gnuslib.lo procargs.lo default.lo -lgobject-2.0 -lglib-2.0 -lXau libtool: link: ar cru .libs/libgtop_common-2.0.a .libs/error.o .libs/gnuslib.o .libs/procargs.o .libs/default.o ar: `u' modifier ignored since `D' is the default (see `U') libtool: link: ranlib .libs/libgtop_common-2.0.a libtool: link: ( cd ".libs" && rm -f "libgtop_common-2.0.la" && ln -s "../libgtop_common-2.0.la" "libgtop_common-2.0.la" ) make[4]: Leaving directory '/<>/sysdeps/common' make[4]: Entering directory '/<>/sysdeps/common' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o sysdeps_suid.lo sysdeps_suid.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c sysdeps_suid.c -fPIC -DPIC -o .libs/sysdeps_suid.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c sysdeps_suid.c -o sysdeps_suid.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/common' make[4]: Entering directory '/<>/sysdeps/common' /bin/bash ../../libtool --tag=CC --mode=link gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,defs -Wl,-O1 -Wl,--as-needed -o libgtop_suid_common-2.0.la error.lo sysdeps_suid.lo libtool: link: ar cru .libs/libgtop_suid_common-2.0.a .libs/error.o .libs/sysdeps_suid.o ar: `u' modifier ignored since `D' is the default (see `U') libtool: link: ranlib .libs/libgtop_suid_common-2.0.a libtool: link: ( cd ".libs" && rm -f "libgtop_suid_common-2.0.la" && ln -s "../libgtop_suid_common-2.0.la" "libgtop_suid_common-2.0.la" ) make[4]: Leaving directory '/<>/sysdeps/common' Making all in linux make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o mem.lo mem.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c mem.c -fPIC -DPIC -o .libs/mem.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c mem.c -o mem.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o open.lo open.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c open.c -fPIC -DPIC -o .libs/open.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c open.c -o open.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o close.lo close.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c close.c -fPIC -DPIC -o .libs/close.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c close.c -o close.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o cpu.lo cpu.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c cpu.c -fPIC -DPIC -o .libs/cpu.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c cpu.c -o cpu.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o uptime.lo uptime.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c uptime.c -fPIC -DPIC -o .libs/uptime.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c uptime.c -o uptime.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o swap.lo swap.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c swap.c -fPIC -DPIC -o .libs/swap.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c swap.c -o swap.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o shm_limits.lo shm_limits.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c shm_limits.c -fPIC -DPIC -o .libs/shm_limits.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c shm_limits.c -o shm_limits.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o loadavg.lo loadavg.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c loadavg.c -fPIC -DPIC -o .libs/loadavg.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c loadavg.c -o loadavg.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o msg_limits.lo msg_limits.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c msg_limits.c -fPIC -DPIC -o .libs/msg_limits.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c msg_limits.c -o msg_limits.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o sem_limits.lo sem_limits.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c sem_limits.c -fPIC -DPIC -o .libs/sem_limits.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c sem_limits.c -o sem_limits.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o procstate.lo procstate.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procstate.c -fPIC -DPIC -o .libs/procstate.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procstate.c -o procstate.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o proclist.lo proclist.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c proclist.c -fPIC -DPIC -o .libs/proclist.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c proclist.c -o proclist.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o procuid.lo procuid.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procuid.c -fPIC -DPIC -o .libs/procuid.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procuid.c -o procuid.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o proctime.lo proctime.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c proctime.c -fPIC -DPIC -o .libs/proctime.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c proctime.c -o proctime.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o procmem.lo procmem.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procmem.c -fPIC -DPIC -o .libs/procmem.o procmem.c: In function ‘glibtop_get_proc_mem_s’: procmem.c:89:28: warning: "/*" within comment [-Wcomment] /* As of 2.6.24 in fs/proc/*.c At top level: procmem.c:38:1: warning: ‘get_pss’ defined but not used [-Wunused-function] get_pss(glibtop* server, pid_t pid) ^~~~~~~ libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procmem.c -o procmem.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o procsignal.lo procsignal.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procsignal.c -fPIC -DPIC -o .libs/procsignal.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procsignal.c -o procsignal.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o prockernel.lo prockernel.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c prockernel.c -fPIC -DPIC -o .libs/prockernel.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c prockernel.c -o prockernel.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o procargs.lo procargs.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procargs.c -fPIC -DPIC -o .libs/procargs.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procargs.c -o procargs.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o procsegment.lo procsegment.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procsegment.c -fPIC -DPIC -o .libs/procsegment.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procsegment.c -o procsegment.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o procmap.lo procmap.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procmap.c -fPIC -DPIC -o .libs/procmap.o procmap.c: In function ‘parse_line’: procmap.c:139:12: warning: unused variable ‘next’ [-Wunused-variable] char *p, *next; ^~~~ libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procmap.c -o procmap.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o siglist.lo siglist.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c siglist.c -fPIC -DPIC -o .libs/siglist.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c siglist.c -o siglist.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o sysinfo.lo sysinfo.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c sysinfo.c -fPIC -DPIC -o .libs/sysinfo.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c sysinfo.c -o sysinfo.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o netload.lo netload.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c netload.c -fPIC -DPIC -o .libs/netload.o netload.c: In function ‘linux_2_0_stats’: netload.c:275:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets (buffer, BUFSIZ-1, f); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ netload.c: In function ‘linux_2_4_stats’: netload.c:356:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets (buffer, BUFSIZ-1, f); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ netload.c:357:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets (buffer, BUFSIZ-1, f); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c netload.c -o netload.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o ppp.lo ppp.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c ppp.c -fPIC -DPIC -o .libs/ppp.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c ppp.c -o ppp.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o glibtop_private.lo glibtop_private.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c glibtop_private.c -fPIC -DPIC -o .libs/glibtop_private.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c glibtop_private.c -o glibtop_private.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o mountlist.lo mountlist.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c mountlist.c -fPIC -DPIC -o .libs/mountlist.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c mountlist.c -o mountlist.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o procaffinity.lo procaffinity.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procaffinity.c -fPIC -DPIC -o .libs/procaffinity.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procaffinity.c -o procaffinity.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o procio.lo procio.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procio.c -fPIC -DPIC -o .libs/procio.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procio.c -o procio.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o fsusage.lo fsusage.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c fsusage.c -fPIC -DPIC -o .libs/fsusage.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c fsusage.c -o fsusage.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o netlist.lo netlist.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c netlist.c -fPIC -DPIC -o .libs/netlist.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c netlist.c -o netlist.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o procopenfiles.lo procopenfiles.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procopenfiles.c -fPIC -DPIC -o .libs/procopenfiles.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procopenfiles.c -o procopenfiles.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o procwd.lo procwd.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procwd.c -fPIC -DPIC -o .libs/procwd.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procwd.c -o procwd.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' /bin/bash ../../libtool --tag=CC --mode=link gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,defs -Wl,-O1 -Wl,--as-needed -o libgtop_sysdeps-2.0.la open.lo close.lo cpu.lo mem.lo swap.lo uptime.lo loadavg.lo shm_limits.lo msg_limits.lo sem_limits.lo proclist.lo procstate.lo procuid.lo proctime.lo procmem.lo procsignal.lo prockernel.lo procsegment.lo procargs.lo procmap.lo siglist.lo sysinfo.lo netload.lo ppp.lo glibtop_private.lo mountlist.lo procaffinity.lo procio.lo fsusage.lo netlist.lo procopenfiles.lo procwd.lo -lgobject-2.0 -lglib-2.0 libtool: link: ar cru .libs/libgtop_sysdeps-2.0.a .libs/open.o .libs/close.o .libs/cpu.o .libs/mem.o .libs/swap.o .libs/uptime.o .libs/loadavg.o .libs/shm_limits.o .libs/msg_limits.o .libs/sem_limits.o .libs/proclist.o .libs/procstate.o .libs/procuid.o .libs/proctime.o .libs/procmem.o .libs/procsignal.o .libs/prockernel.o .libs/procsegment.o .libs/procargs.o .libs/procmap.o .libs/siglist.o .libs/sysinfo.o .libs/netload.o .libs/ppp.o .libs/glibtop_private.o .libs/mountlist.o .libs/procaffinity.o .libs/procio.o .libs/fsusage.o .libs/netlist.o .libs/procopenfiles.o .libs/procwd.o ar: `u' modifier ignored since `D' is the default (see `U') libtool: link: ranlib .libs/libgtop_sysdeps-2.0.a libtool: link: ( cd ".libs" && rm -f "libgtop_sysdeps-2.0.la" && ln -s "../libgtop_sysdeps-2.0.la" "libgtop_sysdeps-2.0.la" ) make[4]: Leaving directory '/<>/sysdeps/linux' make[4]: Nothing to be done for 'all-am'. Making all in lib make[3]: Entering directory '/<>/lib' perl ./lib.pl < ../features.def > lib-t mv lib-t lib.c make[3]: Leaving directory '/<>/lib' make all-am make[4]: Entering directory '/<>/lib' /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o close.lo close.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c close.c -fPIC -DPIC -o .libs/close.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c close.c -o close.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/lib' make[4]: Entering directory '/<>/lib' /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o open.lo open.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c open.c -fPIC -DPIC -o .libs/open.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c open.c -o open.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/lib' make[4]: Entering directory '/<>/lib' /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o command.lo command.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c command.c -fPIC -DPIC -o .libs/command.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c command.c -o command.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/lib' make[4]: Entering directory '/<>/lib' /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o init.lo init.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c init.c -fPIC -DPIC -o .libs/init.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c init.c -o init.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/lib' make[4]: Entering directory '/<>/lib' /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o read.lo read.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c read.c -fPIC -DPIC -o .libs/read.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c read.c -o read.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/lib' make[4]: Entering directory '/<>/lib' /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o read_data.lo read_data.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c read_data.c -fPIC -DPIC -o .libs/read_data.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c read_data.c -o read_data.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/lib' make[4]: Entering directory '/<>/lib' /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o write.lo write.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c write.c -fPIC -DPIC -o .libs/write.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c write.c -o write.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/lib' make[4]: Entering directory '/<>/lib' /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o sysdeps.lo sysdeps.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c sysdeps.c -fPIC -DPIC -o .libs/sysdeps.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c sysdeps.c -o sysdeps.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/lib' make[4]: Entering directory '/<>/lib' /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o parameter.lo parameter.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c parameter.c -fPIC -DPIC -o .libs/parameter.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c parameter.c -o parameter.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/lib' make[4]: Entering directory '/<>/lib' /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o boxed.lo boxed.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c boxed.c -fPIC -DPIC -o .libs/boxed.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c boxed.c -o boxed.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/lib' make[4]: Entering directory '/<>/lib' /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o lib.lo lib.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c lib.c -fPIC -DPIC -o .libs/lib.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c lib.c -o lib.o >/dev/null 2>&1 make[4]: Leaving directory '/<>/lib' make[4]: Entering directory '/<>/lib' /bin/bash ../libtool --tag=CC --mode=link gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -version-info 11:0:0 -export-symbols ./libgtop.sym -no-undefined -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,defs -Wl,-O1 -Wl,--as-needed -o libgtop-2.0.la -rpath /usr/lib/s390x-linux-gnu init.lo open.lo close.lo command.lo read.lo read_data.lo write.lo lib.lo parameter.lo sysdeps.lo boxed.lo -lgobject-2.0 -lglib-2.0 ../sysdeps/common/libgtop_common-2.0.la ../sysdeps/linux/libgtop_sysdeps-2.0.la libtool: link: echo "{ global:" > .libs/libgtop-2.0.ver libtool: link: cat ./libgtop.sym | sed -e "s/\(.*\)/\1;/" >> .libs/libgtop-2.0.ver libtool: link: echo "local: *; };" >> .libs/libgtop-2.0.ver libtool: link: gcc -shared -fPIC -DPIC .libs/init.o .libs/open.o .libs/close.o .libs/command.o .libs/read.o .libs/read_data.o .libs/write.o .libs/lib.o .libs/parameter.o .libs/sysdeps.o .libs/boxed.o -Wl,--whole-archive ../sysdeps/common/.libs/libgtop_common-2.0.a ../sysdeps/linux/.libs/libgtop_sysdeps-2.0.a -Wl,--no-whole-archive -Wl,--as-needed -lXau -lgobject-2.0 -lglib-2.0 -g -O2 -fstack-protector-strong -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,defs -Wl,-O1 -Wl,-soname -Wl,libgtop-2.0.so.11 -Wl,-version-script -Wl,.libs/libgtop-2.0.ver -o .libs/libgtop-2.0.so.11.0.0 libtool: link: (cd ".libs" && rm -f "libgtop-2.0.so.11" && ln -s "libgtop-2.0.so.11.0.0" "libgtop-2.0.so.11") libtool: link: (cd ".libs" && rm -f "libgtop-2.0.so" && ln -s "libgtop-2.0.so.11.0.0" "libgtop-2.0.so") libtool: link: (cd .libs/libgtop-2.0.lax/libgtop_common-2.0.a && ar x "/<>/lib/../sysdeps/common/.libs/libgtop_common-2.0.a") libtool: link: (cd .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a && ar x "/<>/lib/../sysdeps/linux/.libs/libgtop_sysdeps-2.0.a") copying selected object files to avoid basename conflicts... libtool: link: ln .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/close.o .libs/libgtop-2.0.lax/lt1-close.o || cp .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/close.o .libs/libgtop-2.0.lax/lt1-close.o libtool: link: ln .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/open.o .libs/libgtop-2.0.lax/lt2-open.o || cp .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/open.o .libs/libgtop-2.0.lax/lt2-open.o libtool: link: ln .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/procargs.o .libs/libgtop-2.0.lax/lt3-procargs.o || cp .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/procargs.o .libs/libgtop-2.0.lax/lt3-procargs.o libtool: link: ar cru .libs/libgtop-2.0.a init.o open.o close.o command.o read.o read_data.o write.o lib.o parameter.o sysdeps.o boxed.o .libs/libgtop-2.0.lax/libgtop_common-2.0.a/default.o .libs/libgtop-2.0.lax/libgtop_common-2.0.a/error.o .libs/libgtop-2.0.lax/libgtop_common-2.0.a/gnuslib.o .libs/libgtop-2.0.lax/libgtop_common-2.0.a/procargs.o .libs/libgtop-2.0.lax/lt1-close.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/cpu.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/fsusage.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/glibtop_private.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/loadavg.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/mem.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/mountlist.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/msg_limits.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/netlist.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/netload.o .libs/libgtop-2.0.lax/lt2-open.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/ppp.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/procaffinity.o .libs/libgtop-2.0.lax/lt3-procargs.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/procio.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/prockernel.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/proclist.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/procmap.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/procmem.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/procopenfiles.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/procsegment.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/procsignal.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/procstate.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/proctime.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/procuid.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/procwd.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/sem_limits.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/shm_limits.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/siglist.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/swap.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/sysinfo.o .libs/libgtop-2.0.lax/libgtop_sysdeps-2.0.a/uptime.o ar: `u' modifier ignored since `D' is the default (see `U') libtool: link: ranlib .libs/libgtop-2.0.a libtool: link: rm -fr .libs/libgtop-2.0.lax .libs/libgtop-2.0.lax libtool: link: ( cd ".libs" && rm -f "libgtop-2.0.la" && ln -s "../libgtop-2.0.la" "libgtop-2.0.la" ) make[4]: Leaving directory '/<>/lib' make[4]: Entering directory '/<>/lib' CPPFLAGS="-Wdate-time -D_FORTIFY_SOURCE=2" CFLAGS="-Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security" LDFLAGS="-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,defs -Wl,-O1 -Wl,--as-needed" CC="gcc" PKG_CONFIG="/usr/bin/pkg-config" GI_HOST_OS="" DLLTOOL="false" /usr/bin/g-ir-scanner --accept-unprefixed --warn-all --namespace=GTop --nsversion=2.0 --libtool="/bin/bash ../libtool" --library=libgtop-2.0.la --cflags-begin -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include --cflags-end init.c open.c close.c command.c read.c read_data.c write.c lib.c parameter.c sysdeps.c boxed.c ../glibtop.h ../libgtopconfig.h ../include/glibtop/close.h ../include/glibtop/loadavg.h ../include/glibtop/prockernel.h ../include/glibtop/procstate.h ../include/glibtop/sem_limits.h ../include/glibtop/uptime.h ../include/glibtop/command.h ../include/glibtop/mem.h ../include/glibtop/proclist.h ../include/glibtop/proctime.h ../include/glibtop/shm_limits.h ../include/glibtop/cpu.h ../include/glibtop/msg_limits.h ../include/glibtop/procmem.h ../include/glibtop/procuid.h ../include/glibtop/swap.h ../include/glibtop/procsegment.h ../include/glibtop/sysdeps.h ../include/glibtop/global.h ../include/glibtop/procsignal.h ../include/glibtop/union.h ../include/glibtop/gnuserv.h ../include/glibtop/parameter.h ../include/glibtop/mountlist.h ../include/glibtop/fsusage.h ../include/glibtop/procmap.h ../include/glibtop/signal.h ../include/glibtop/sysinfo.h ../include/glibtop/ppp.h ../include/glibtop/procargs.h ../include/glibtop/netload.h ../include/glibtop/procwd.h ../include/glibtop/procaffinity.h ../include/glibtop/procio.h ../include/glibtop/netlist.h ../include/glibtop/procopenfiles.h ../include/glibtop/open.h libgtop-2.0.la --output GTop-2.0.gir /<>/include/glibtop/sysdeps.h:61: syntax error, unexpected identifier in 'G_STATIC_ASSERT((1UL << (28 - 1)) <= ' at 'G_STATIC_ASSERT' g-ir-scanner: link: /bin/bash ../libtool --mode=link --tag=CC gcc -o /<>/lib/tmp-introspectxwlvmzl5/GTop-2.0 -export-dynamic -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security /<>/lib/tmp-introspectxwlvmzl5/GTop-2.0.o -L. libgtop-2.0.la -lgio-2.0 -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,defs -Wl,-O1 -Wl,--as-needed libtool: link: gcc -o /<>/lib/tmp-introspectxwlvmzl5/.libs/GTop-2.0 -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security /<>/lib/tmp-introspectxwlvmzl5/GTop-2.0.o -Wl,--export-dynamic -pthread -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,defs -Wl,-O1 -Wl,--export-dynamic -L. ./.libs/libgtop-2.0.so -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -Wl,--as-needed -pthread include/glibtop/procargs.h:79: Warning: GTop: glibtop_get_proc_argv_l: return value: Missing (transfer) annotation include/glibtop/procwd.h:55: Warning: GTop: glibtop_get_proc_wd_l: return value: Missing (transfer) annotation include/glibtop/procwd.h:68: Warning: GTop: glibtop_get_proc_wd_s: return value: Missing (transfer) annotation make[4]: Leaving directory '/<>/lib' make[4]: Entering directory '/<>/lib' /usr/bin/g-ir-compiler --includedir=. GTop-2.0.gir -o GTop-2.0.typelib make[4]: Leaving directory '/<>/lib' Making all in src make[4]: Nothing to be done for 'all-am'. Making all in examples make[3]: Entering directory '/<>/examples' gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../sysdeps/linux -DGTOPLOCALEDIR=\"/usr/share/locale\" -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o procargs.o procargs.c make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../sysdeps/linux -DGTOPLOCALEDIR=\"/usr/share/locale\" -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o df.o df.c make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../sysdeps/linux -DGTOPLOCALEDIR=\"/usr/share/locale\" -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o first.o first.c make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../sysdeps/linux -DGTOPLOCALEDIR=\"/usr/share/locale\" -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o second.o second.c make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../sysdeps/linux -DGTOPLOCALEDIR=\"/usr/share/locale\" -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o pprint.o pprint.c pprint.c: In function ‘pprint_get_cpu’: pprint.c:21:37: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~ pprint.c:86:3: note: in expansion of macro ‘PPRINT’ PPRINT(flags, "%#llx"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~ pprint.c:87:3: note: in expansion of macro ‘PPRINT’ PPRINT(total, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~ pprint.c:88:3: note: in expansion of macro ‘PPRINT’ PPRINT(user, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~ pprint.c:89:3: note: in expansion of macro ‘PPRINT’ PPRINT(nice, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~ pprint.c:90:3: note: in expansion of macro ‘PPRINT’ PPRINT(sys, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~ pprint.c:91:3: note: in expansion of macro ‘PPRINT’ PPRINT(idle, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~ pprint.c:92:3: note: in expansion of macro ‘PPRINT’ PPRINT(iowait, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~ pprint.c:93:3: note: in expansion of macro ‘PPRINT’ PPRINT(irq, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~ pprint.c:94:3: note: in expansion of macro ‘PPRINT’ PPRINT(softirq, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~ pprint.c:95:3: note: in expansion of macro ‘PPRINT’ PPRINT(frequency, "%llu"); ^~~~~~ pprint.c:35:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=] printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ^ pprint.c:96:3: note: in expansion of macro ‘PPRINT_ARRAY’ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ^~~~~~~~~~~~ pprint.c:35:12: note: format string is defined here printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~^ %lu pprint.c:35:9: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ^ ~~~~~~~~~~~~ pprint.c:96:3: note: in expansion of macro ‘PPRINT_ARRAY’ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ^~~~~~~~~~~~ pprint.c:96:46: note: format string is defined here PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~^ %lu pprint.c:35:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=] printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ^ pprint.c:97:3: note: in expansion of macro ‘PPRINT_ARRAY’ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ^~~~~~~~~~~~ pprint.c:35:12: note: format string is defined here printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~^ %lu pprint.c:35:9: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ^ ~~~~~~~~~~~~ pprint.c:97:3: note: in expansion of macro ‘PPRINT_ARRAY’ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ^~~~~~~~~~~~ pprint.c:97:45: note: format string is defined here PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~^ %lu pprint.c:35:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=] printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ^ pprint.c:98:3: note: in expansion of macro ‘PPRINT_ARRAY’ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ^~~~~~~~~~~~ pprint.c:35:12: note: format string is defined here printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~^ %lu pprint.c:35:9: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ^ ~~~~~~~~~~~~ pprint.c:98:3: note: in expansion of macro ‘PPRINT_ARRAY’ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ^~~~~~~~~~~~ pprint.c:98:45: note: format string is defined here PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~^ %lu pprint.c:35:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=] printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ^ pprint.c:99:3: note: in expansion of macro ‘PPRINT_ARRAY’ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ^~~~~~~~~~~~ pprint.c:35:12: note: format string is defined here printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~^ %lu pprint.c:35:9: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ^ ~~~~~~~~~~~~ pprint.c:99:3: note: in expansion of macro ‘PPRINT_ARRAY’ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ^~~~~~~~~~~~ pprint.c:99:44: note: format string is defined here PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~^ %lu pprint.c:35:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=] printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ^ pprint.c:100:3: note: in expansion of macro ‘PPRINT_ARRAY’ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ^~~~~~~~~~~~ pprint.c:35:12: note: format string is defined here printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~^ %lu pprint.c:35:9: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ^ ~~~~~~~~~~~~ pprint.c:100:3: note: in expansion of macro ‘PPRINT_ARRAY’ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ^~~~~~~~~~~~ pprint.c:100:45: note: format string is defined here PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~^ %lu pprint.c:35:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=] printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ^ pprint.c:101:3: note: in expansion of macro ‘PPRINT_ARRAY’ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ^~~~~~~~~~~~ pprint.c:35:12: note: format string is defined here printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~^ %lu pprint.c:35:9: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ^ ~~~~~~~~~~~~ pprint.c:101:3: note: in expansion of macro ‘PPRINT_ARRAY’ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ^~~~~~~~~~~~ pprint.c:101:47: note: format string is defined here PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~^ %lu pprint.c:35:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=] printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ^ pprint.c:102:3: note: in expansion of macro ‘PPRINT_ARRAY’ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ^~~~~~~~~~~~ pprint.c:35:12: note: format string is defined here printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~^ %lu pprint.c:35:9: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ^ ~~~~~~~~~~~~ pprint.c:102:3: note: in expansion of macro ‘PPRINT_ARRAY’ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ^~~~~~~~~~~~ pprint.c:102:44: note: format string is defined here PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~^ %lu pprint.c:35:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=] printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ^ pprint.c:103:3: note: in expansion of macro ‘PPRINT_ARRAY’ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ^~~~~~~~~~~~ pprint.c:35:12: note: format string is defined here printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~^ %lu pprint.c:35:9: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ^ ~~~~~~~~~~~~ pprint.c:103:3: note: in expansion of macro ‘PPRINT_ARRAY’ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ^~~~~~~~~~~~ pprint.c:103:48: note: format string is defined here PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~^ %lu pprint.c:21:37: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~ pprint.c:104:3: note: in expansion of macro ‘PPRINT’ PPRINT(xcpu_flags, "%llx"); ^~~~~~ pprint.c: In function ‘pprint_get_fsusage’: pprint.c:21:37: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~ pprint.c:118:3: note: in expansion of macro ‘PPRINT’ PPRINT(flags, "%#llx"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~ pprint.c:119:3: note: in expansion of macro ‘PPRINT’ PPRINT(blocks, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~ pprint.c:120:3: note: in expansion of macro ‘PPRINT’ PPRINT(bfree, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~ pprint.c:121:3: note: in expansion of macro ‘PPRINT’ PPRINT(bavail, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~ pprint.c:122:3: note: in expansion of macro ‘PPRINT’ PPRINT(files, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~ pprint.c:123:3: note: in expansion of macro ‘PPRINT’ PPRINT(ffree, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~ pprint.c:125:3: note: in expansion of macro ‘PPRINT’ PPRINT(read, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~ pprint.c:126:3: note: in expansion of macro ‘PPRINT’ PPRINT(write, "%llu"); ^~~~~~ pprint.c: In function ‘pprint_get_loadavg’: pprint.c:21:37: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~ pprint.c:139:3: note: in expansion of macro ‘PPRINT’ PPRINT(flags, "%#llx"); ^~~~~~ pprint.c:35:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=] printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ^ pprint.c:140:3: note: in expansion of macro ‘PPRINT_ARRAY’ PPRINT_ARRAY(loadavg, 3, "%f"); ^~~~~~~~~~~~ pprint.c:35:12: note: format string is defined here printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~^ %lu pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~ pprint.c:141:3: note: in expansion of macro ‘PPRINT’ PPRINT(nr_running, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~ pprint.c:142:3: note: in expansion of macro ‘PPRINT’ PPRINT(nr_tasks, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~ pprint.c:143:3: note: in expansion of macro ‘PPRINT’ PPRINT(last_pid, "%llu"); ^~~~~~ pprint.c: In function ‘pprint_get_mem’: pprint.c:21:37: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~ pprint.c:156:3: note: in expansion of macro ‘PPRINT’ PPRINT(flags, "%#llx"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~ pprint.c:157:3: note: in expansion of macro ‘PPRINT’ PPRINT(total, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~ pprint.c:158:3: note: in expansion of macro ‘PPRINT’ PPRINT(used, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~ pprint.c:159:3: note: in expansion of macro ‘PPRINT’ PPRINT(free, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~ pprint.c:160:3: note: in expansion of macro ‘PPRINT’ PPRINT(shared, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~ pprint.c:161:3: note: in expansion of macro ‘PPRINT’ PPRINT(buffer, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~ pprint.c:162:3: note: in expansion of macro ‘PPRINT’ PPRINT(cached, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~ pprint.c:163:3: note: in expansion of macro ‘PPRINT’ PPRINT(user, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~ pprint.c:164:3: note: in expansion of macro ‘PPRINT’ PPRINT(locked, "%llu"); ^~~~~~ pprint.c: In function ‘pprint_get_mountlist’: pprint.c:21:37: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~ pprint.c:180:3: note: in expansion of macro ‘PPRINT’ PPRINT(flags, "%#llx"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~ pprint.c:181:3: note: in expansion of macro ‘PPRINT’ PPRINT(number, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~ pprint.c:182:3: note: in expansion of macro ‘PPRINT’ PPRINT(total, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~ pprint.c:183:3: note: in expansion of macro ‘PPRINT’ PPRINT(size, "%llu"); ^~~~~~ pprint.c:185:17: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~^ ~~~~~~~~~ %4lu pprint.c:185:32: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~^ ~~~~~~~~~~ %lu pprint.c:189:40: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf("\t\t .%lu = { .dev = %#llx," ~~~~^ %#lx pprint.c:193:26: (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~ pprint.c: In function ‘pprint_get_msg_limits’: pprint.c:21:37: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~ pprint.c:214:3: note: in expansion of macro ‘PPRINT’ PPRINT(flags, "%#llx"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~ pprint.c:215:3: note: in expansion of macro ‘PPRINT’ PPRINT(msgpool, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~ pprint.c:216:3: note: in expansion of macro ‘PPRINT’ PPRINT(msgmap, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~ pprint.c:217:3: note: in expansion of macro ‘PPRINT’ PPRINT(msgmax, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmnb, "%llu"); ~~~~~~~~ pprint.c:218:3: note: in expansion of macro ‘PPRINT’ PPRINT(msgmnb, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmnb, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmni, "%llu"); ~~~~~~~~ pprint.c:219:3: note: in expansion of macro ‘PPRINT’ PPRINT(msgmni, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmnb, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmni, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgssz, "%llu"); ~~~~~~~~ pprint.c:220:3: note: in expansion of macro ‘PPRINT’ PPRINT(msgssz, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmnb, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmni, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgssz, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgtql, "%llu"); ~~~~~~~~ pprint.c:221:3: note: in expansion of macro ‘PPRINT’ PPRINT(msgtql, "%llu"); ^~~~~~ pprint.c: In function ‘pprint_get_netload’: pprint.c:21:37: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmnb, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmni, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgssz, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgtql, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netload(const char *iface) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netload buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_netload(&buf, iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netload); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_netload (iface = \"%s\")\n", iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~ pprint.c:235:3: note: in expansion of macro ‘PPRINT’ PPRINT(flags, "%#llx"); ^~~~~~ pprint.c: In function ‘pprint_get_swap’: pprint.c:21:37: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmnb, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmni, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgssz, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgtql, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netload(const char *iface) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netload buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_netload(&buf, iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netload); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_netload (iface = \"%s\")\n", iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netlist(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netlist buf; ~~~~~~~~~~~~~~~~~~~~ char **devices; ~~~~~~~~~~~~~~~ guint32 i; ~~~~~~~~~~ devices = glibtop_get_netlist(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t%s\n", devices[i]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_strfreev(devices); ~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_swap(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_swap buf; ~~~~~~~~~~~~~~~~~ glibtop_get_swap(&buf); ~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_swap); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~ pprint.c:269:3: note: in expansion of macro ‘PPRINT’ PPRINT(flags, "%#llx"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmnb, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmni, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgssz, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgtql, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netload(const char *iface) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netload buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_netload(&buf, iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netload); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_netload (iface = \"%s\")\n", iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netlist(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netlist buf; ~~~~~~~~~~~~~~~~~~~~ char **devices; ~~~~~~~~~~~~~~~ guint32 i; ~~~~~~~~~~ devices = glibtop_get_netlist(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t%s\n", devices[i]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_strfreev(devices); ~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_swap(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_swap buf; ~~~~~~~~~~~~~~~~~ glibtop_get_swap(&buf); ~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_swap); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~ pprint.c:270:3: note: in expansion of macro ‘PPRINT’ PPRINT(total, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmnb, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmni, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgssz, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgtql, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netload(const char *iface) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netload buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_netload(&buf, iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netload); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_netload (iface = \"%s\")\n", iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netlist(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netlist buf; ~~~~~~~~~~~~~~~~~~~~ char **devices; ~~~~~~~~~~~~~~~ guint32 i; ~~~~~~~~~~ devices = glibtop_get_netlist(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t%s\n", devices[i]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_strfreev(devices); ~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_swap(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_swap buf; ~~~~~~~~~~~~~~~~~ glibtop_get_swap(&buf); ~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_swap); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~ pprint.c:271:3: note: in expansion of macro ‘PPRINT’ PPRINT(used, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmnb, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmni, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgssz, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgtql, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netload(const char *iface) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netload buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_netload(&buf, iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netload); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_netload (iface = \"%s\")\n", iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netlist(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netlist buf; ~~~~~~~~~~~~~~~~~~~~ char **devices; ~~~~~~~~~~~~~~~ guint32 i; ~~~~~~~~~~ devices = glibtop_get_netlist(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t%s\n", devices[i]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_strfreev(devices); ~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_swap(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_swap buf; ~~~~~~~~~~~~~~~~~ glibtop_get_swap(&buf); ~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_swap); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~ pprint.c:272:3: note: in expansion of macro ‘PPRINT’ PPRINT(free, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmnb, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmni, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgssz, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgtql, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netload(const char *iface) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netload buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_netload(&buf, iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netload); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_netload (iface = \"%s\")\n", iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netlist(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netlist buf; ~~~~~~~~~~~~~~~~~~~~ char **devices; ~~~~~~~~~~~~~~~ guint32 i; ~~~~~~~~~~ devices = glibtop_get_netlist(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t%s\n", devices[i]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_strfreev(devices); ~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_swap(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_swap buf; ~~~~~~~~~~~~~~~~~ glibtop_get_swap(&buf); ~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_swap); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(pagein, "%llu"); ~~~~~~~~ pprint.c:273:3: note: in expansion of macro ‘PPRINT’ PPRINT(pagein, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmnb, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmni, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgssz, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgtql, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netload(const char *iface) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netload buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_netload(&buf, iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netload); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_netload (iface = \"%s\")\n", iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netlist(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netlist buf; ~~~~~~~~~~~~~~~~~~~~ char **devices; ~~~~~~~~~~~~~~~ guint32 i; ~~~~~~~~~~ devices = glibtop_get_netlist(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t%s\n", devices[i]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_strfreev(devices); ~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_swap(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_swap buf; ~~~~~~~~~~~~~~~~~ glibtop_get_swap(&buf); ~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_swap); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(pagein, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(pageout, "%llu"); ~~~~~~~~ pprint.c:274:3: note: in expansion of macro ‘PPRINT’ PPRINT(pageout, "%llu"); ^~~~~~ pprint.c: In function ‘pprint_get_uptime’: pprint.c:21:37: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmnb, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmni, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgssz, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgtql, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netload(const char *iface) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netload buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_netload(&buf, iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netload); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_netload (iface = \"%s\")\n", iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netlist(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netlist buf; ~~~~~~~~~~~~~~~~~~~~ char **devices; ~~~~~~~~~~~~~~~ guint32 i; ~~~~~~~~~~ devices = glibtop_get_netlist(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t%s\n", devices[i]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_strfreev(devices); ~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_swap(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_swap buf; ~~~~~~~~~~~~~~~~~ glibtop_get_swap(&buf); ~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_swap); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(pagein, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(pageout, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_uptime(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_uptime buf; ~~~~~~~~~~~~~~~~~~~ glibtop_get_uptime(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_uptime); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~ pprint.c:287:3: note: in expansion of macro ‘PPRINT’ PPRINT(flags, "%#llx"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmnb, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmni, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgssz, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgtql, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netload(const char *iface) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netload buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_netload(&buf, iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netload); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_netload (iface = \"%s\")\n", iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netlist(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netlist buf; ~~~~~~~~~~~~~~~~~~~~ char **devices; ~~~~~~~~~~~~~~~ guint32 i; ~~~~~~~~~~ devices = glibtop_get_netlist(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t%s\n", devices[i]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_strfreev(devices); ~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_swap(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_swap buf; ~~~~~~~~~~~~~~~~~ glibtop_get_swap(&buf); ~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_swap); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(pagein, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(pageout, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_uptime(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_uptime buf; ~~~~~~~~~~~~~~~~~~~ glibtop_get_uptime(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_uptime); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(uptime, "%f"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(idletime, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(boot_time, "%llu"); ~~~~~~~~ pprint.c:290:3: note: in expansion of macro ‘PPRINT’ PPRINT(boot_time, "%llu"); ^~~~~~ pprint.c: In function ‘pprint_get_proc_kernel’: pprint.c:21:37: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmnb, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmni, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgssz, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgtql, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netload(const char *iface) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netload buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_netload(&buf, iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netload); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_netload (iface = \"%s\")\n", iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netlist(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netlist buf; ~~~~~~~~~~~~~~~~~~~~ char **devices; ~~~~~~~~~~~~~~~ guint32 i; ~~~~~~~~~~ devices = glibtop_get_netlist(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t%s\n", devices[i]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_strfreev(devices); ~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_swap(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_swap buf; ~~~~~~~~~~~~~~~~~ glibtop_get_swap(&buf); ~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_swap); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(pagein, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(pageout, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_uptime(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_uptime buf; ~~~~~~~~~~~~~~~~~~~ glibtop_get_uptime(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_uptime); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(uptime, "%f"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(idletime, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(boot_time, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_proc_kernel(pid_t pid) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_proc_kernel buf; ~~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_proc_kernel(&buf, pid); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_proc_kernel); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~ pprint.c:304:3: note: in expansion of macro ‘PPRINT’ PPRINT(flags, "%#llx"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmnb, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmni, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgssz, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgtql, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netload(const char *iface) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netload buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_netload(&buf, iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netload); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_netload (iface = \"%s\")\n", iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netlist(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netlist buf; ~~~~~~~~~~~~~~~~~~~~ char **devices; ~~~~~~~~~~~~~~~ guint32 i; ~~~~~~~~~~ devices = glibtop_get_netlist(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t%s\n", devices[i]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_strfreev(devices); ~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_swap(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_swap buf; ~~~~~~~~~~~~~~~~~ glibtop_get_swap(&buf); ~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_swap); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(pagein, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(pageout, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_uptime(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_uptime buf; ~~~~~~~~~~~~~~~~~~~ glibtop_get_uptime(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_uptime); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(uptime, "%f"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(idletime, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(boot_time, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_proc_kernel(pid_t pid) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_proc_kernel buf; ~~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_proc_kernel(&buf, pid); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_proc_kernel); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(k_flags, "%llu"); ~~~~~~~~ pprint.c:305:3: note: in expansion of macro ‘PPRINT’ PPRINT(k_flags, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmnb, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmni, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgssz, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgtql, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netload(const char *iface) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netload buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_netload(&buf, iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netload); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_netload (iface = \"%s\")\n", iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netlist(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netlist buf; ~~~~~~~~~~~~~~~~~~~~ char **devices; ~~~~~~~~~~~~~~~ guint32 i; ~~~~~~~~~~ devices = glibtop_get_netlist(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t%s\n", devices[i]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_strfreev(devices); ~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_swap(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_swap buf; ~~~~~~~~~~~~~~~~~ glibtop_get_swap(&buf); ~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_swap); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(pagein, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(pageout, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_uptime(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_uptime buf; ~~~~~~~~~~~~~~~~~~~ glibtop_get_uptime(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_uptime); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(uptime, "%f"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(idletime, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(boot_time, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_proc_kernel(pid_t pid) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_proc_kernel buf; ~~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_proc_kernel(&buf, pid); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_proc_kernel); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(k_flags, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(min_flt, "%llu"); ~~~~~~~~ pprint.c:306:3: note: in expansion of macro ‘PPRINT’ PPRINT(min_flt, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmnb, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmni, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgssz, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgtql, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netload(const char *iface) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netload buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_netload(&buf, iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netload); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_netload (iface = \"%s\")\n", iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netlist(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netlist buf; ~~~~~~~~~~~~~~~~~~~~ char **devices; ~~~~~~~~~~~~~~~ guint32 i; ~~~~~~~~~~ devices = glibtop_get_netlist(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t%s\n", devices[i]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_strfreev(devices); ~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_swap(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_swap buf; ~~~~~~~~~~~~~~~~~ glibtop_get_swap(&buf); ~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_swap); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(pagein, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(pageout, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_uptime(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_uptime buf; ~~~~~~~~~~~~~~~~~~~ glibtop_get_uptime(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_uptime); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(uptime, "%f"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(idletime, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(boot_time, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_proc_kernel(pid_t pid) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_proc_kernel buf; ~~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_proc_kernel(&buf, pid); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_proc_kernel); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(k_flags, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(min_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(maj_flt, "%llu"); ~~~~~~~~ pprint.c:307:3: note: in expansion of macro ‘PPRINT’ PPRINT(maj_flt, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmnb, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmni, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgssz, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgtql, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netload(const char *iface) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netload buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_netload(&buf, iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netload); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_netload (iface = \"%s\")\n", iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netlist(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netlist buf; ~~~~~~~~~~~~~~~~~~~~ char **devices; ~~~~~~~~~~~~~~~ guint32 i; ~~~~~~~~~~ devices = glibtop_get_netlist(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t%s\n", devices[i]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_strfreev(devices); ~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_swap(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_swap buf; ~~~~~~~~~~~~~~~~~ glibtop_get_swap(&buf); ~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_swap); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(pagein, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(pageout, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_uptime(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_uptime buf; ~~~~~~~~~~~~~~~~~~~ glibtop_get_uptime(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_uptime); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(uptime, "%f"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(idletime, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(boot_time, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_proc_kernel(pid_t pid) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_proc_kernel buf; ~~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_proc_kernel(&buf, pid); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_proc_kernel); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(k_flags, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(min_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(maj_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cmin_flt, "%llu"); ~~~~~~~~ pprint.c:308:3: note: in expansion of macro ‘PPRINT’ PPRINT(cmin_flt, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmnb, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmni, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgssz, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgtql, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netload(const char *iface) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netload buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_netload(&buf, iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netload); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_netload (iface = \"%s\")\n", iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netlist(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netlist buf; ~~~~~~~~~~~~~~~~~~~~ char **devices; ~~~~~~~~~~~~~~~ guint32 i; ~~~~~~~~~~ devices = glibtop_get_netlist(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t%s\n", devices[i]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_strfreev(devices); ~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_swap(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_swap buf; ~~~~~~~~~~~~~~~~~ glibtop_get_swap(&buf); ~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_swap); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(pagein, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(pageout, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_uptime(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_uptime buf; ~~~~~~~~~~~~~~~~~~~ glibtop_get_uptime(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_uptime); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(uptime, "%f"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(idletime, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(boot_time, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_proc_kernel(pid_t pid) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_proc_kernel buf; ~~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_proc_kernel(&buf, pid); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_proc_kernel); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(k_flags, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(min_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(maj_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cmin_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cmaj_flt, "%llu"); ~~~~~~~~ pprint.c:309:3: note: in expansion of macro ‘PPRINT’ PPRINT(cmaj_flt, "%llu"); ^~~~~~ pprint.c: In function ‘pprint_get_proc_mem’: pprint.c:21:37: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmnb, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmni, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgssz, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgtql, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netload(const char *iface) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netload buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_netload(&buf, iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netload); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_netload (iface = \"%s\")\n", iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netlist(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netlist buf; ~~~~~~~~~~~~~~~~~~~~ char **devices; ~~~~~~~~~~~~~~~ guint32 i; ~~~~~~~~~~ devices = glibtop_get_netlist(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t%s\n", devices[i]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_strfreev(devices); ~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_swap(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_swap buf; ~~~~~~~~~~~~~~~~~ glibtop_get_swap(&buf); ~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_swap); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(pagein, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(pageout, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_uptime(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_uptime buf; ~~~~~~~~~~~~~~~~~~~ glibtop_get_uptime(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_uptime); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(uptime, "%f"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(idletime, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(boot_time, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_proc_kernel(pid_t pid) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_proc_kernel buf; ~~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_proc_kernel(&buf, pid); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_proc_kernel); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(k_flags, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(min_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(maj_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cmin_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cmaj_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_proc_mem(pid_t pid) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_proc_mem buf; ~~~~~~~~~~~~~~~~~~~~~ glibtop_get_proc_mem(&buf, pid); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_proc_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~ pprint.c:321:3: note: in expansion of macro ‘PPRINT’ PPRINT(flags, "%#llx"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmnb, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmni, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgssz, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgtql, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netload(const char *iface) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netload buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_netload(&buf, iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netload); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_netload (iface = \"%s\")\n", iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netlist(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netlist buf; ~~~~~~~~~~~~~~~~~~~~ char **devices; ~~~~~~~~~~~~~~~ guint32 i; ~~~~~~~~~~ devices = glibtop_get_netlist(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t%s\n", devices[i]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_strfreev(devices); ~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_swap(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_swap buf; ~~~~~~~~~~~~~~~~~ glibtop_get_swap(&buf); ~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_swap); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(pagein, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(pageout, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_uptime(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_uptime buf; ~~~~~~~~~~~~~~~~~~~ glibtop_get_uptime(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_uptime); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(uptime, "%f"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(idletime, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(boot_time, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_proc_kernel(pid_t pid) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_proc_kernel buf; ~~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_proc_kernel(&buf, pid); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_proc_kernel); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(k_flags, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(min_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(maj_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cmin_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cmaj_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_proc_mem(pid_t pid) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_proc_mem buf; ~~~~~~~~~~~~~~~~~~~~~ glibtop_get_proc_mem(&buf, pid); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_proc_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~ pprint.c:322:3: note: in expansion of macro ‘PPRINT’ PPRINT(size, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmnb, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmni, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgssz, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgtql, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netload(const char *iface) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netload buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_netload(&buf, iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netload); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_netload (iface = \"%s\")\n", iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netlist(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netlist buf; ~~~~~~~~~~~~~~~~~~~~ char **devices; ~~~~~~~~~~~~~~~ guint32 i; ~~~~~~~~~~ devices = glibtop_get_netlist(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t%s\n", devices[i]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_strfreev(devices); ~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_swap(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_swap buf; ~~~~~~~~~~~~~~~~~ glibtop_get_swap(&buf); ~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_swap); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(pagein, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(pageout, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_uptime(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_uptime buf; ~~~~~~~~~~~~~~~~~~~ glibtop_get_uptime(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_uptime); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(uptime, "%f"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(idletime, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(boot_time, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_proc_kernel(pid_t pid) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_proc_kernel buf; ~~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_proc_kernel(&buf, pid); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_proc_kernel); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(k_flags, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(min_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(maj_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cmin_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cmaj_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_proc_mem(pid_t pid) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_proc_mem buf; ~~~~~~~~~~~~~~~~~~~~~ glibtop_get_proc_mem(&buf, pid); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_proc_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(vsize, "%llu"); ~~~~~~~~ pprint.c:323:3: note: in expansion of macro ‘PPRINT’ PPRINT(vsize, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmnb, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmni, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgssz, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgtql, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netload(const char *iface) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netload buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_netload(&buf, iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netload); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_netload (iface = \"%s\")\n", iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netlist(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netlist buf; ~~~~~~~~~~~~~~~~~~~~ char **devices; ~~~~~~~~~~~~~~~ guint32 i; ~~~~~~~~~~ devices = glibtop_get_netlist(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t%s\n", devices[i]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_strfreev(devices); ~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_swap(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_swap buf; ~~~~~~~~~~~~~~~~~ glibtop_get_swap(&buf); ~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_swap); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(pagein, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(pageout, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_uptime(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_uptime buf; ~~~~~~~~~~~~~~~~~~~ glibtop_get_uptime(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_uptime); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(uptime, "%f"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(idletime, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(boot_time, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_proc_kernel(pid_t pid) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_proc_kernel buf; ~~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_proc_kernel(&buf, pid); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_proc_kernel); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(k_flags, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(min_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(maj_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cmin_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cmaj_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_proc_mem(pid_t pid) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_proc_mem buf; ~~~~~~~~~~~~~~~~~~~~~ glibtop_get_proc_mem(&buf, pid); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_proc_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(vsize, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(resident, "%llu"); ~~~~~~~~ pprint.c:324:3: note: in expansion of macro ‘PPRINT’ PPRINT(resident, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmnb, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmni, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgssz, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgtql, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netload(const char *iface) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netload buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_netload(&buf, iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netload); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_netload (iface = \"%s\")\n", iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netlist(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netlist buf; ~~~~~~~~~~~~~~~~~~~~ char **devices; ~~~~~~~~~~~~~~~ guint32 i; ~~~~~~~~~~ devices = glibtop_get_netlist(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t%s\n", devices[i]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_strfreev(devices); ~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_swap(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_swap buf; ~~~~~~~~~~~~~~~~~ glibtop_get_swap(&buf); ~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_swap); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(pagein, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(pageout, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_uptime(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_uptime buf; ~~~~~~~~~~~~~~~~~~~ glibtop_get_uptime(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_uptime); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(uptime, "%f"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(idletime, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(boot_time, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_proc_kernel(pid_t pid) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_proc_kernel buf; ~~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_proc_kernel(&buf, pid); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_proc_kernel); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(k_flags, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(min_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(maj_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cmin_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cmaj_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_proc_mem(pid_t pid) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_proc_mem buf; ~~~~~~~~~~~~~~~~~~~~~ glibtop_get_proc_mem(&buf, pid); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_proc_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(vsize, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(resident, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(share, "%llu"); ~~~~~~~~ pprint.c:325:3: note: in expansion of macro ‘PPRINT’ PPRINT(share, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmnb, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmni, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgssz, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgtql, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netload(const char *iface) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netload buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_netload(&buf, iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netload); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_netload (iface = \"%s\")\n", iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netlist(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netlist buf; ~~~~~~~~~~~~~~~~~~~~ char **devices; ~~~~~~~~~~~~~~~ guint32 i; ~~~~~~~~~~ devices = glibtop_get_netlist(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t%s\n", devices[i]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_strfreev(devices); ~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_swap(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_swap buf; ~~~~~~~~~~~~~~~~~ glibtop_get_swap(&buf); ~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_swap); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(pagein, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(pageout, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_uptime(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_uptime buf; ~~~~~~~~~~~~~~~~~~~ glibtop_get_uptime(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_uptime); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(uptime, "%f"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(idletime, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(boot_time, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_proc_kernel(pid_t pid) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_proc_kernel buf; ~~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_proc_kernel(&buf, pid); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_proc_kernel); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(k_flags, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(min_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(maj_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cmin_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cmaj_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_proc_mem(pid_t pid) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_proc_mem buf; ~~~~~~~~~~~~~~~~~~~~~ glibtop_get_proc_mem(&buf, pid); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_proc_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(vsize, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(resident, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(share, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(rss, "%llu"); ~~~~~~~~ pprint.c:326:3: note: in expansion of macro ‘PPRINT’ PPRINT(rss, "%llu"); ^~~~~~ pprint.c:21:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmnb, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmni, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgssz, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgtql, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netload(const char *iface) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netload buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_netload(&buf, iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netload); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_netload (iface = \"%s\")\n", iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netlist(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netlist buf; ~~~~~~~~~~~~~~~~~~~~ char **devices; ~~~~~~~~~~~~~~~ guint32 i; ~~~~~~~~~~ devices = glibtop_get_netlist(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t%s\n", devices[i]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_strfreev(devices); ~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_swap(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_swap buf; ~~~~~~~~~~~~~~~~~ glibtop_get_swap(&buf); ~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_swap); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(pagein, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(pageout, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_uptime(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_uptime buf; ~~~~~~~~~~~~~~~~~~~ glibtop_get_uptime(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_uptime); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(uptime, "%f"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(idletime, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(boot_time, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_proc_kernel(pid_t pid) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_proc_kernel buf; ~~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_proc_kernel(&buf, pid); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_proc_kernel); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(k_flags, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(min_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(maj_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cmin_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cmaj_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_proc_mem(pid_t pid) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_proc_mem buf; ~~~~~~~~~~~~~~~~~~~~~ glibtop_get_proc_mem(&buf, pid); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_proc_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(vsize, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(resident, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(share, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(rss, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(rss_rlim, "%llu"); ~~~~~~~~ pprint.c:327:3: note: in expansion of macro ‘PPRINT’ PPRINT(rss_rlim, "%llu"); ^~~~~~ pprint.c: In function ‘pprint_get_proc_affinity’: pprint.c:21:37: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] #define PPRINT(DATA, FORMAT) printf("\t%4lu B %3lu " #DATA " = " FORMAT "\n", \ ^ (unsigned long) sizeof buf.DATA, (unsigned long) buf_offsetof(DATA), buf.DATA) ~~~~~~~~~ #define PPRINT_ARRAY(ARRAY, SIZE, FORMAT) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~~~~~~~~ printf("\t%4lu B %3lu " #ARRAY "[%lu] = { ", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf.ARRAY, \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) buf_offsetof(ARRAY), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf.ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (i = 0; i < (SIZE); ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!buf.ARRAY[i] && i < (SIZE - 1) && !buf.ARRAY[i + 1]) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ do { i++; } while (i < SIZE && !buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("..., "); \ ~~~~~~~~~~~~~~~~~~~~~~~ } else { \ ~~~~~~~~~~~~~~~~~ printf(".%u = " FORMAT ", ", i, buf.ARRAY[i]); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~~~~ } \ ~~~~~~~~~~~ printf("}\n"); \ ~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_ENTRY_ARRAY(ARRAY, SIZE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; \ ~~~~~~~~~~~ printf("\t%4lu B " #ARRAY "[%lu/%lu] = { \n", \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) sizeof buf->ARRAY, (unsigned long)(SIZE), \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) G_N_ELEMENTS(buf->ARRAY)); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < SIZE; ++i) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (buf->ARRAY[i].values) { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("\t[ "); \ ~~~~~~~~~~~~~~~~~~~~~ PPRINT_HASHTABLE(buf->ARRAY[i].values); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf ("]\n"); \ ~~~~~~~~~~~~~~~~~~~~ } \ ~~~~~~~~ } \ ~~~ printf("} "); \ ~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define PPRINT_HASHTABLE(HASHTABLE) do { \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g_hash_table_foreach (HASHTABLE, (GHFunc)pprint_hashtable_item, NULL); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } while(0) ~~~~~~~~~~ #define FOOTER_PPRINT() putchar('\n'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void pprint_hashtable_item(gchar* key, gchar* value, gpointer user_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf ("'%s': '%s', ", key, value); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_sysinfo(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ const glibtop_sysinfo *buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ buf = glibtop_get_sysinfo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_sysinfo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~ // PPRINT(ncpu, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ENTRY_ARRAY(cpuinfo, buf->ncpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_cpu(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_cpu buf; ~~~~~~~~~~~~~~~~ glibtop_get_cpu(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_cpu); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(nice, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(sys, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(idle, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(iowait, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(irq, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(softirq, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(frequency, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_total, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_user, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_nice, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_sys, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_idle, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_iowait, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_irq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(xcpu_softirq, GLIBTOP_NCPU, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(xcpu_flags, "%llx"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_fsusage(const char *mountpoint) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_fsusage buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_fsusage(&buf, mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_fsusage); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("pprint_get_fsusage (mountpoint = \"%s\"\n", mountpoint); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(blocks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bfree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(bavail, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(files, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(ffree, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(block_size, "%u"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(read, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(write, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_loadavg(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_loadavg buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_loadavg(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_loadavg); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT_ARRAY(loadavg, 3, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_running, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(nr_tasks, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(last_pid, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mem(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mem buf; ~~~~~~~~~~~~~~~~ glibtop_get_mem(&buf); ~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(shared, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(buffer, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cached, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(user, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(locked, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_mountlist(gboolean allfs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_mountlist buf; ~~~~~~~~~~~~~~~~~~~~~~ glibtop_mountentry *entries; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ size_t i; ~~~~~~~~~ entries = glibtop_get_mountlist(&buf, allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_mountlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_mountlist (allfs = %d)\n", allfs); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(number, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ printf("\t%4llu B entries[%llu] = \n\t\t{\n", buf.total, buf.number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t\t .%lu = { .dev = %#llx," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " .devname = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .mountir = \"%s\"," ~~~~~~~~~~~~~~~~~~~~~ " .type = \"%s\" }\n", ~~~~~~~~~~~~~~~~~~~~~~ (unsigned long) i, entries[i].dev, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ entries[i].devname, ~~~~~~~~~~~~~~~~~~~ entries[i].mountdir, ~~~~~~~~~~~~~~~~~~~~ entries[i].type); ~~~~~~~~~~~~~~~~~ } ~ printf("\t\t}\n"); ~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_free(entries); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_msg_limits(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_msg_limits buf; ~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_msg_limits(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_msg_limits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgpool, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmap, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmax, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmnb, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgmni, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgssz, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(msgtql, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netload(const char *iface) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netload buf; ~~~~~~~~~~~~~~~~~~~~ glibtop_get_netload(&buf, iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netload); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf("glibtop_get_netload (iface = \"%s\")\n", iface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_netlist(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_netlist buf; ~~~~~~~~~~~~~~~~~~~~ char **devices; ~~~~~~~~~~~~~~~ guint32 i; ~~~~~~~~~~ devices = glibtop_get_netlist(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_netlist); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for(i = 0; i < buf.number; ++i) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ printf("\t%s\n", devices[i]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ g_strfreev(devices); ~~~~~~~~~~~~~~~~~~~~ } ~ static void pprint_get_swap(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_swap buf; ~~~~~~~~~~~~~~~~~ glibtop_get_swap(&buf); ~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_swap); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(total, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(used, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(free, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(pagein, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(pageout, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_uptime(void) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_uptime buf; ~~~~~~~~~~~~~~~~~~~ glibtop_get_uptime(&buf); ~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_uptime); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(uptime, "%f"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(idletime, "%f"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(boot_time, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_proc_kernel(pid_t pid) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_proc_kernel buf; ~~~~~~~~~~~~~~~~~~~~~~~~ glibtop_get_proc_kernel(&buf, pid); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_proc_kernel); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(k_flags, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(min_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(maj_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cmin_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(cmaj_flt, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_proc_mem(pid_t pid) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_proc_mem buf; ~~~~~~~~~~~~~~~~~~~~~ glibtop_get_proc_mem(&buf, pid); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_proc_mem); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(size, "%llu"); ~~~~~~~~~~~~~~~~~~~~~ PPRINT(vsize, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(resident, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(share, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~ PPRINT(rss, "%llu"); ~~~~~~~~~~~~~~~~~~~~ PPRINT(rss_rlim, "%llu"); ~~~~~~~~~~~~~~~~~~~~~~~~~ FOOTER_PPRINT(); ~~~~~~~~~~~~~~~~ } ~ static void pprint_get_proc_affinity(pid_t pid) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~ glibtop_proc_affinity buf; ~~~~~~~~~~~~~~~~~~~~~~~~~~ guint32 i; ~~~~~~~~~~ guint16* cpus; ~~~~~~~~~~~~~~ cpus = glibtop_get_proc_affinity(&buf, pid); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HEADER_PPRINT(glibtop_get_proc_affinity); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PPRINT(flags, "%#llx"); ~~~~~~~~ pprint.c:341:3: note: in expansion of macro ‘PPRINT’ PPRINT(flags, "%#llx"); ^~~~~~ make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../sysdeps/linux -DGTOPLOCALEDIR=\"/usr/share/locale\" -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o netlist.o netlist.c make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../sysdeps/linux -DGTOPLOCALEDIR=\"/usr/share/locale\" -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o mountlist.o mountlist.c mountlist.c: In function ‘main’: mountlist.c:102:21: warning: format ‘%Lu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf ("%-16s %9Lu %9Lu %9Lu %9Lu %9Lu %9d\n", ~~~^ %9lu mountlist.c:104:4: fsusage.blocks, fsusage.bfree, ~~~~~~~~~~~~~~ mountlist.c:102:26: warning: format ‘%Lu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf ("%-16s %9Lu %9Lu %9Lu %9Lu %9Lu %9d\n", ~~~^ %9lu mountlist.c:104:20: fsusage.blocks, fsusage.bfree, ~~~~~~~~~~~~~ mountlist.c:102:31: warning: format ‘%Lu’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf ("%-16s %9Lu %9Lu %9Lu %9Lu %9Lu %9d\n", ~~~^ %9lu mountlist.c:105:4: fsusage.bavail, fsusage.files, ~~~~~~~~~~~~~~ mountlist.c:102:36: warning: format ‘%Lu’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf ("%-16s %9Lu %9Lu %9Lu %9Lu %9Lu %9d\n", ~~~^ %9lu mountlist.c:105:20: fsusage.bavail, fsusage.files, ~~~~~~~~~~~~~ mountlist.c:102:41: warning: format ‘%Lu’ expects argument of type ‘long long unsigned int’, but argument 7 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf ("%-16s %9Lu %9Lu %9Lu %9Lu %9Lu %9d\n", ~~~^ %9lu mountlist.c:106:4: fsusage.ffree, fsusage.block_size); ~~~~~~~~~~~~~ make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../sysdeps/linux -DGTOPLOCALEDIR=\"/usr/share/locale\" -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o procmap.o procmap.c procmap.c: In function ‘main’: procmap.c:165:28: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] g_print("smaps flags:%#llx size:%lluKiB rss:%lluKiB " ~~~~^ %#lx procmap.c:168:4: maps[i].flags, ~~~~~~~~~~~~~ procmap.c:165:38: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] g_print("smaps flags:%#llx size:%lluKiB rss:%lluKiB " ~~~^ %lu procmap.c:169:4: maps[i].size >> 10, ~~~~~~~~~~~~~~~~~~ procmap.c:165:50: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] g_print("smaps flags:%#llx size:%lluKiB rss:%lluKiB " ~~~^ %lu procmap.c:170:4: maps[i].rss >> 10, ~~~~~~~~~~~~~~~~~ procmap.c:165:11: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] g_print("smaps flags:%#llx size:%lluKiB rss:%lluKiB " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ procmap.c:171:4: maps[i].shared_clean >> 10, ~~~~~~~~~~~~~~~~~~~~~~~~~~ procmap.c:166:21: note: format string is defined here "shared_clean:%lluKib shared_dirty:%lluKiB " ~~~^ %lu procmap.c:165:11: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] g_print("smaps flags:%#llx size:%lluKiB rss:%lluKiB " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ procmap.c:172:4: maps[i].shared_dirty >> 10, ~~~~~~~~~~~~~~~~~~~~~~~~~~ procmap.c:166:42: note: format string is defined here "shared_clean:%lluKib shared_dirty:%lluKiB " ~~~^ %lu procmap.c:165:11: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 7 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] g_print("smaps flags:%#llx size:%lluKiB rss:%lluKiB " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ procmap.c:173:4: maps[i].private_clean >> 10, ~~~~~~~~~~~~~~~~~~~~~~~~~~~ procmap.c:167:22: note: format string is defined here "private_clean:%lluKiB private_dirty: %lluKiB\n", ~~~^ %lu procmap.c:165:11: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 8 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] g_print("smaps flags:%#llx size:%lluKiB rss:%lluKiB " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ procmap.c:174:4: maps[i].private_dirty >> 10); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ procmap.c:167:45: note: format string is defined here "private_clean:%lluKiB private_dirty: %lluKiB\n", ~~~^ %lu make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../sysdeps/linux -DGTOPLOCALEDIR=\"/usr/share/locale\" -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o openfiles.o openfiles.c make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../sysdeps/linux -DGTOPLOCALEDIR=\"/usr/share/locale\" -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o sysdeps.o sysdeps.c make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../sysdeps/linux -DGTOPLOCALEDIR=\"/usr/share/locale\" -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o netload.o netload.c netload.c: In function ‘main’: netload.c:116:33: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf ("Network Load (0x%016llx):\n\n" ~~~~~~^ %016lx netload.c:135:3: netload.flags, ~~~~~~~~~~~~~ netload.c:116:10: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf ("Network Load (0x%016llx):\n\n" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ netload.c:136:3: netload.if_flags, ~~~~~~~~~~~~~~~~ netload.c:117:32: note: format string is defined here "\tInterface Flags:\t0x%016llx\n" ~~~~~~^ %016lx netload.c:116:10: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 9 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf ("Network Load (0x%016llx):\n\n" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ netload.c:140:3: netload.collisions, ~~~~~~~~~~~~~~~~~~ netload.c:121:24: note: format string is defined here "\tCollisions:\t\t%llu\n\n" ~~~^ %lu netload.c:116:10: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 10 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf ("Network Load (0x%016llx):\n\n" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ netload.c:141:3: netload.packets_in, ~~~~~~~~~~~~~~~~~~ netload.c:122:24: note: format string is defined here "\tPackets In:\t\t%llu\n" ~~~^ %lu netload.c:116:10: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 11 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf ("Network Load (0x%016llx):\n\n" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ netload.c:142:3: netload.packets_out, ~~~~~~~~~~~~~~~~~~~ netload.c:123:25: note: format string is defined here "\tPackets Out:\t\t%llu\n" ~~~^ %lu netload.c:116:10: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 12 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf ("Network Load (0x%016llx):\n\n" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ netload.c:143:3: netload.packets_total, ~~~~~~~~~~~~~~~~~~~~~ netload.c:124:27: note: format string is defined here "\tPackets Total:\t\t%llu\n\n" ~~~^ %lu netload.c:116:10: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 13 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf ("Network Load (0x%016llx):\n\n" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ netload.c:144:3: netload.bytes_in, ~~~~~~~~~~~~~~~~ netload.c:125:22: note: format string is defined here "\tBytes In:\t\t%llu\n" ~~~^ %lu netload.c:116:10: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 14 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf ("Network Load (0x%016llx):\n\n" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ netload.c:145:3: netload.bytes_out, ~~~~~~~~~~~~~~~~~ netload.c:126:23: note: format string is defined here "\tBytes Out:\t\t%llu\n" ~~~^ %lu netload.c:116:10: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 15 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf ("Network Load (0x%016llx):\n\n" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ netload.c:146:3: netload.bytes_total, ~~~~~~~~~~~~~~~~~~~ netload.c:127:25: note: format string is defined here "\tBytes Total:\t\t%llu\n\n" ~~~^ %lu netload.c:116:10: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 16 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf ("Network Load (0x%016llx):\n\n" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ netload.c:147:3: netload.errors_in, ~~~~~~~~~~~~~~~~~ netload.c:128:23: note: format string is defined here "\tErrors In:\t\t%llu\n" ~~~^ %lu netload.c:116:10: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 17 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf ("Network Load (0x%016llx):\n\n" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ netload.c:148:3: netload.errors_out, ~~~~~~~~~~~~~~~~~~ netload.c:129:24: note: format string is defined here "\tErrors Out:\t\t%llu\n" ~~~^ %lu netload.c:116:10: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 18 has type ‘guint64 {aka long unsigned int}’ [-Wformat=] printf ("Network Load (0x%016llx):\n\n" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ netload.c:149:3: netload.errors_total, ~~~~~~~~~~~~~~~~~~~~ netload.c:130:26: note: format string is defined here "\tErrors Total:\t\t%llu\n\n" ~~~^ %lu make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../sysdeps/linux -DGTOPLOCALEDIR=\"/usr/share/locale\" -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o proclist.o proclist.c make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../sysdeps/linux -DGTOPLOCALEDIR=\"/usr/share/locale\" -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o free.o free.c make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../sysdeps/linux -DGTOPLOCALEDIR=\"/usr/share/locale\" -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o smp.o smp.c make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../sysdeps/linux -DGTOPLOCALEDIR=\"/usr/share/locale\" -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o timings.o timings.c timings.c: In function ‘display_self_times’: timings.c:81:2: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result] system("ps xjf | egrep 'timings|libgtop_server'"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../sysdeps/linux -DGTOPLOCALEDIR=\"/usr/share/locale\" -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o wd.o wd.c make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../sysdeps/linux -DGTOPLOCALEDIR=\"/usr/share/locale\" -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o affinity.o affinity.c make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../sysdeps/linux -DGTOPLOCALEDIR=\"/usr/share/locale\" -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o diskio.o diskio.c make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' /bin/bash ../libtool --tag=CC --mode=link gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -lgobject-2.0 -lglib-2.0 -lXau -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,defs -Wl,-O1 -Wl,--as-needed -o first first.o ../lib/libgtop-2.0.la libtool: link: gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,defs -Wl,-O1 -o .libs/first first.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' /bin/bash ../libtool --tag=CC --mode=link gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -lgobject-2.0 -lglib-2.0 -lXau -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,defs -Wl,-O1 -Wl,--as-needed -o second second.o ../lib/libgtop-2.0.la -lm libtool: link: gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,defs -Wl,-O1 -o .libs/second second.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so -lm make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' /bin/bash ../libtool --tag=CC --mode=link gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -lgobject-2.0 -lglib-2.0 -lXau -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,defs -Wl,-O1 -Wl,--as-needed -o procargs procargs.o ../lib/libgtop-2.0.la libtool: link: gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,defs -Wl,-O1 -o .libs/procargs procargs.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' /bin/bash ../libtool --tag=CC --mode=link gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -lgobject-2.0 -lglib-2.0 -lXau -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,defs -Wl,-O1 -Wl,--as-needed -o pprint pprint.o ../lib/libgtop-2.0.la libtool: link: gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,defs -Wl,-O1 -o .libs/pprint pprint.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' /bin/bash ../libtool --tag=CC --mode=link gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -lgobject-2.0 -lglib-2.0 -lXau -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,defs -Wl,-O1 -Wl,--as-needed -o df df.o ../lib/libgtop-2.0.la libtool: link: gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,defs -Wl,-O1 -o .libs/df df.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' /bin/bash ../libtool --tag=CC --mode=link gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -lgobject-2.0 -lglib-2.0 -lXau -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,defs -Wl,-O1 -Wl,--as-needed -o netlist netlist.o ../lib/libgtop-2.0.la libtool: link: gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,defs -Wl,-O1 -o .libs/netlist netlist.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' /bin/bash ../libtool --tag=CC --mode=link gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -lgobject-2.0 -lglib-2.0 -lXau -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,defs -Wl,-O1 -Wl,--as-needed -o mountlist mountlist.o ../lib/libgtop-2.0.la libtool: link: gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,defs -Wl,-O1 -o .libs/mountlist mountlist.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' /bin/bash ../libtool --tag=CC --mode=link gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -lgobject-2.0 -lglib-2.0 -lXau -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,defs -Wl,-O1 -Wl,--as-needed -o procmap procmap.o ../lib/libgtop-2.0.la libtool: link: gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,defs -Wl,-O1 -o .libs/procmap procmap.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' /bin/bash ../libtool --tag=CC --mode=link gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -lgobject-2.0 -lglib-2.0 -lXau -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,defs -Wl,-O1 -Wl,--as-needed -o netload netload.o ../lib/libgtop-2.0.la libtool: link: gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,defs -Wl,-O1 -o .libs/netload netload.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' /bin/bash ../libtool --tag=CC --mode=link gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -lgobject-2.0 -lglib-2.0 -lXau -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,defs -Wl,-O1 -Wl,--as-needed -o sysdeps sysdeps.o ../lib/libgtop-2.0.la libtool: link: gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,defs -Wl,-O1 -o .libs/sysdeps sysdeps.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' /bin/bash ../libtool --tag=CC --mode=link gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -lgobject-2.0 -lglib-2.0 -lXau -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,defs -Wl,-O1 -Wl,--as-needed -o timings timings.o ../lib/libgtop-2.0.la libtool: link: gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,defs -Wl,-O1 -o .libs/timings timings.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' /bin/bash ../libtool --tag=CC --mode=link gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -lgobject-2.0 -lglib-2.0 -lXau -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,defs -Wl,-O1 -Wl,--as-needed -o openfiles openfiles.o ../lib/libgtop-2.0.la libtool: link: gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,defs -Wl,-O1 -o .libs/openfiles openfiles.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' /bin/bash ../libtool --tag=CC --mode=link gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -lgobject-2.0 -lglib-2.0 -lXau -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,defs -Wl,-O1 -Wl,--as-needed -o smp smp.o ../lib/libgtop-2.0.la -lm libtool: link: gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,defs -Wl,-O1 -o .libs/smp smp.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so -lm make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' /bin/bash ../libtool --tag=CC --mode=link gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -lgobject-2.0 -lglib-2.0 -lXau -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,defs -Wl,-O1 -Wl,--as-needed -o proclist proclist.o ../lib/libgtop-2.0.la libtool: link: gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,defs -Wl,-O1 -o .libs/proclist proclist.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' /bin/bash ../libtool --tag=CC --mode=link gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -lgobject-2.0 -lglib-2.0 -lXau -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,defs -Wl,-O1 -Wl,--as-needed -o free free.o ../lib/libgtop-2.0.la libtool: link: gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,defs -Wl,-O1 -o .libs/free free.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' /bin/bash ../libtool --tag=CC --mode=link gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -lgobject-2.0 -lglib-2.0 -lXau -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,defs -Wl,-O1 -Wl,--as-needed -o wd wd.o ../lib/libgtop-2.0.la libtool: link: gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,defs -Wl,-O1 -o .libs/wd wd.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' /bin/bash ../libtool --tag=CC --mode=link gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -lgobject-2.0 -lglib-2.0 -lXau -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,defs -Wl,-O1 -Wl,--as-needed -o affinity affinity.o ../lib/libgtop-2.0.la libtool: link: gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,defs -Wl,-O1 -o .libs/affinity affinity.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so make[3]: Leaving directory '/<>/examples' make[3]: Entering directory '/<>/examples' /bin/bash ../libtool --tag=CC --mode=link gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -lgobject-2.0 -lglib-2.0 -lXau -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,defs -Wl,-O1 -Wl,--as-needed -o diskio diskio.o ../lib/libgtop-2.0.la libtool: link: gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,defs -Wl,-O1 -o .libs/diskio diskio.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so make[3]: Leaving directory '/<>/examples' Making all in doc Making all in reference make[4]: Nothing to be done for 'all'. make[3]: Nothing to be done for 'all-am'. dh_auto_test -a make -j4 -O check VERBOSE=1 Making check in po make[2]: Nothing to be done for 'check'. Making check in misc make[2]: Nothing to be done for 'check'. Making check in include Making check in glibtop make[3]: Nothing to be done for 'check'. make[3]: Nothing to be done for 'check-am'. Making check in sysdeps Making check in common make[3]: Nothing to be done for 'check'. Making check in linux make[3]: Nothing to be done for 'check'. make[3]: Nothing to be done for 'check-am'. Making check in lib make check-am make[3]: Nothing to be done for 'check-am'. Making check in src make[3]: Nothing to be done for 'check-am'. Making check in examples make[2]: Nothing to be done for 'check'. Making check in doc Making check in reference make[3]: Nothing to be done for 'check'. make[3]: Nothing to be done for 'check-am'. make[2]: Nothing to be done for 'check-am'. create-stamp debian/debhelper-build-stamp fakeroot debian/rules binary-arch dh binary-arch --with gnome,gir dh_testroot -a dh_prep -a dh_auto_install -a make -j1 install DESTDIR=/<>/debian/tmp AM_UPDATE_INFO_DIR=no make[1]: Entering directory '/<>' Making install in po make[2]: Entering directory '/<>/po' installing am.gmo as /<>/debian/tmp/usr/share/locale/am/LC_MESSAGES/libgtop.mo installing ar.gmo as /<>/debian/tmp/usr/share/locale/ar/LC_MESSAGES/libgtop.mo installing as.gmo as /<>/debian/tmp/usr/share/locale/as/LC_MESSAGES/libgtop.mo installing ast.gmo as /<>/debian/tmp/usr/share/locale/ast/LC_MESSAGES/libgtop.mo installing az.gmo as /<>/debian/tmp/usr/share/locale/az/LC_MESSAGES/libgtop.mo installing be.gmo as /<>/debian/tmp/usr/share/locale/be/LC_MESSAGES/libgtop.mo installing bg.gmo as /<>/debian/tmp/usr/share/locale/bg/LC_MESSAGES/libgtop.mo installing bn.gmo as /<>/debian/tmp/usr/share/locale/bn/LC_MESSAGES/libgtop.mo installing bn_IN.gmo as /<>/debian/tmp/usr/share/locale/bn_IN/LC_MESSAGES/libgtop.mo installing bs.gmo as /<>/debian/tmp/usr/share/locale/bs/LC_MESSAGES/libgtop.mo installing ca.gmo as /<>/debian/tmp/usr/share/locale/ca/LC_MESSAGES/libgtop.mo installing ca@valencia.gmo as /<>/debian/tmp/usr/share/locale/ca@valencia/LC_MESSAGES/libgtop.mo installing cs.gmo as /<>/debian/tmp/usr/share/locale/cs/LC_MESSAGES/libgtop.mo installing cy.gmo as /<>/debian/tmp/usr/share/locale/cy/LC_MESSAGES/libgtop.mo installing da.gmo as /<>/debian/tmp/usr/share/locale/da/LC_MESSAGES/libgtop.mo installing de.gmo as /<>/debian/tmp/usr/share/locale/de/LC_MESSAGES/libgtop.mo installing dz.gmo as /<>/debian/tmp/usr/share/locale/dz/LC_MESSAGES/libgtop.mo installing el.gmo as /<>/debian/tmp/usr/share/locale/el/LC_MESSAGES/libgtop.mo installing en_CA.gmo as /<>/debian/tmp/usr/share/locale/en_CA/LC_MESSAGES/libgtop.mo installing en_GB.gmo as /<>/debian/tmp/usr/share/locale/en_GB/LC_MESSAGES/libgtop.mo installing en@shaw.gmo as /<>/debian/tmp/usr/share/locale/en@shaw/LC_MESSAGES/libgtop.mo installing eo.gmo as /<>/debian/tmp/usr/share/locale/eo/LC_MESSAGES/libgtop.mo installing es.gmo as /<>/debian/tmp/usr/share/locale/es/LC_MESSAGES/libgtop.mo installing et.gmo as /<>/debian/tmp/usr/share/locale/et/LC_MESSAGES/libgtop.mo installing eu.gmo as /<>/debian/tmp/usr/share/locale/eu/LC_MESSAGES/libgtop.mo installing fa.gmo as /<>/debian/tmp/usr/share/locale/fa/LC_MESSAGES/libgtop.mo installing fi.gmo as /<>/debian/tmp/usr/share/locale/fi/LC_MESSAGES/libgtop.mo installing fr.gmo as /<>/debian/tmp/usr/share/locale/fr/LC_MESSAGES/libgtop.mo installing fur.gmo as /<>/debian/tmp/usr/share/locale/fur/LC_MESSAGES/libgtop.mo installing ga.gmo as /<>/debian/tmp/usr/share/locale/ga/LC_MESSAGES/libgtop.mo installing gl.gmo as /<>/debian/tmp/usr/share/locale/gl/LC_MESSAGES/libgtop.mo installing gu.gmo as /<>/debian/tmp/usr/share/locale/gu/LC_MESSAGES/libgtop.mo installing he.gmo as /<>/debian/tmp/usr/share/locale/he/LC_MESSAGES/libgtop.mo installing hi.gmo as /<>/debian/tmp/usr/share/locale/hi/LC_MESSAGES/libgtop.mo installing hr.gmo as /<>/debian/tmp/usr/share/locale/hr/LC_MESSAGES/libgtop.mo installing hu.gmo as /<>/debian/tmp/usr/share/locale/hu/LC_MESSAGES/libgtop.mo installing id.gmo as /<>/debian/tmp/usr/share/locale/id/LC_MESSAGES/libgtop.mo installing it.gmo as /<>/debian/tmp/usr/share/locale/it/LC_MESSAGES/libgtop.mo installing ja.gmo as /<>/debian/tmp/usr/share/locale/ja/LC_MESSAGES/libgtop.mo installing ka.gmo as /<>/debian/tmp/usr/share/locale/ka/LC_MESSAGES/libgtop.mo installing kn.gmo as /<>/debian/tmp/usr/share/locale/kn/LC_MESSAGES/libgtop.mo installing ko.gmo as /<>/debian/tmp/usr/share/locale/ko/LC_MESSAGES/libgtop.mo installing ku.gmo as /<>/debian/tmp/usr/share/locale/ku/LC_MESSAGES/libgtop.mo installing ky.gmo as /<>/debian/tmp/usr/share/locale/ky/LC_MESSAGES/libgtop.mo installing la.gmo as /<>/debian/tmp/usr/share/locale/la/LC_MESSAGES/libgtop.mo installing lt.gmo as /<>/debian/tmp/usr/share/locale/lt/LC_MESSAGES/libgtop.mo installing lv.gmo as /<>/debian/tmp/usr/share/locale/lv/LC_MESSAGES/libgtop.mo installing mai.gmo as /<>/debian/tmp/usr/share/locale/mai/LC_MESSAGES/libgtop.mo installing mg.gmo as /<>/debian/tmp/usr/share/locale/mg/LC_MESSAGES/libgtop.mo installing mi.gmo as /<>/debian/tmp/usr/share/locale/mi/LC_MESSAGES/libgtop.mo installing mk.gmo as /<>/debian/tmp/usr/share/locale/mk/LC_MESSAGES/libgtop.mo installing ml.gmo as /<>/debian/tmp/usr/share/locale/ml/LC_MESSAGES/libgtop.mo installing mn.gmo as /<>/debian/tmp/usr/share/locale/mn/LC_MESSAGES/libgtop.mo installing mr.gmo as /<>/debian/tmp/usr/share/locale/mr/LC_MESSAGES/libgtop.mo installing ms.gmo as /<>/debian/tmp/usr/share/locale/ms/LC_MESSAGES/libgtop.mo installing nb.gmo as /<>/debian/tmp/usr/share/locale/nb/LC_MESSAGES/libgtop.mo installing ne.gmo as /<>/debian/tmp/usr/share/locale/ne/LC_MESSAGES/libgtop.mo installing nl.gmo as /<>/debian/tmp/usr/share/locale/nl/LC_MESSAGES/libgtop.mo installing nn.gmo as /<>/debian/tmp/usr/share/locale/nn/LC_MESSAGES/libgtop.mo installing oc.gmo as /<>/debian/tmp/usr/share/locale/oc/LC_MESSAGES/libgtop.mo installing or.gmo as /<>/debian/tmp/usr/share/locale/or/LC_MESSAGES/libgtop.mo installing pa.gmo as /<>/debian/tmp/usr/share/locale/pa/LC_MESSAGES/libgtop.mo installing pl.gmo as /<>/debian/tmp/usr/share/locale/pl/LC_MESSAGES/libgtop.mo installing pt.gmo as /<>/debian/tmp/usr/share/locale/pt/LC_MESSAGES/libgtop.mo installing pt_BR.gmo as /<>/debian/tmp/usr/share/locale/pt_BR/LC_MESSAGES/libgtop.mo installing ro.gmo as /<>/debian/tmp/usr/share/locale/ro/LC_MESSAGES/libgtop.mo installing ru.gmo as /<>/debian/tmp/usr/share/locale/ru/LC_MESSAGES/libgtop.mo installing rw.gmo as /<>/debian/tmp/usr/share/locale/rw/LC_MESSAGES/libgtop.mo installing sk.gmo as /<>/debian/tmp/usr/share/locale/sk/LC_MESSAGES/libgtop.mo installing sl.gmo as /<>/debian/tmp/usr/share/locale/sl/LC_MESSAGES/libgtop.mo installing sq.gmo as /<>/debian/tmp/usr/share/locale/sq/LC_MESSAGES/libgtop.mo installing sr.gmo as /<>/debian/tmp/usr/share/locale/sr/LC_MESSAGES/libgtop.mo installing sr@latin.gmo as /<>/debian/tmp/usr/share/locale/sr@latin/LC_MESSAGES/libgtop.mo installing sv.gmo as /<>/debian/tmp/usr/share/locale/sv/LC_MESSAGES/libgtop.mo installing ta.gmo as /<>/debian/tmp/usr/share/locale/ta/LC_MESSAGES/libgtop.mo installing te.gmo as /<>/debian/tmp/usr/share/locale/te/LC_MESSAGES/libgtop.mo installing tg.gmo as /<>/debian/tmp/usr/share/locale/tg/LC_MESSAGES/libgtop.mo installing th.gmo as /<>/debian/tmp/usr/share/locale/th/LC_MESSAGES/libgtop.mo installing tr.gmo as /<>/debian/tmp/usr/share/locale/tr/LC_MESSAGES/libgtop.mo installing ug.gmo as /<>/debian/tmp/usr/share/locale/ug/LC_MESSAGES/libgtop.mo installing uk.gmo as /<>/debian/tmp/usr/share/locale/uk/LC_MESSAGES/libgtop.mo installing vi.gmo as /<>/debian/tmp/usr/share/locale/vi/LC_MESSAGES/libgtop.mo installing xh.gmo as /<>/debian/tmp/usr/share/locale/xh/LC_MESSAGES/libgtop.mo installing zh_CN.gmo as /<>/debian/tmp/usr/share/locale/zh_CN/LC_MESSAGES/libgtop.mo installing zh_HK.gmo as /<>/debian/tmp/usr/share/locale/zh_HK/LC_MESSAGES/libgtop.mo installing zh_TW.gmo as /<>/debian/tmp/usr/share/locale/zh_TW/LC_MESSAGES/libgtop.mo if test "libgtop" = "gettext-tools"; then \ /bin/mkdir -p /<>/debian/tmp/usr/share/gettext/po; \ for file in Makefile.in.in remove-potcdate.sin quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot Makevars.template; do \ /usr/bin/install -c -m 644 ./$file \ /<>/debian/tmp/usr/share/gettext/po/$file; \ done; \ for file in Makevars; do \ rm -f /<>/debian/tmp/usr/share/gettext/po/$file; \ done; \ else \ : ; \ fi make[2]: Leaving directory '/<>/po' Making install in misc make[2]: Entering directory '/<>/misc' make[3]: Entering directory '/<>/misc' make[3]: Nothing to be done for 'install-exec-am'. make[3]: Nothing to be done for 'install-data-am'. make[3]: Leaving directory '/<>/misc' make[2]: Leaving directory '/<>/misc' Making install in include make[2]: Entering directory '/<>/include' Making install in glibtop make[3]: Entering directory '/<>/include/glibtop' make[4]: Entering directory '/<>/include/glibtop' make[4]: Nothing to be done for 'install-exec-am'. /bin/mkdir -p '/<>/debian/tmp/usr/include/libgtop-2.0/glibtop' /usr/bin/install -c -m 644 close.h loadavg.h prockernel.h procstate.h sem_limits.h uptime.h command.h mem.h proclist.h proctime.h shm_limits.h cpu.h msg_limits.h procmem.h procuid.h swap.h procsegment.h sysdeps.h global.h procsignal.h union.h gnuserv.h parameter.h mountlist.h fsusage.h procmap.h signal.h sysinfo.h ppp.h procargs.h netload.h procwd.h procaffinity.h procio.h netlist.h procopenfiles.h open.h '/<>/debian/tmp/usr/include/libgtop-2.0/glibtop' make[4]: Leaving directory '/<>/include/glibtop' make[3]: Leaving directory '/<>/include/glibtop' make[3]: Entering directory '/<>/include' make[4]: Entering directory '/<>/include' make[4]: Nothing to be done for 'install-exec-am'. make[4]: Nothing to be done for 'install-data-am'. make[4]: Leaving directory '/<>/include' make[3]: Leaving directory '/<>/include' make[2]: Leaving directory '/<>/include' Making install in sysdeps make[2]: Entering directory '/<>/sysdeps' Making install in common make[3]: Entering directory '/<>/sysdeps/common' make[4]: Entering directory '/<>/sysdeps/common' make[4]: Nothing to be done for 'install-exec-am'. make[4]: Nothing to be done for 'install-data-am'. make[4]: Leaving directory '/<>/sysdeps/common' make[3]: Leaving directory '/<>/sysdeps/common' Making install in linux make[3]: Entering directory '/<>/sysdeps/linux' make[4]: Entering directory '/<>/sysdeps/linux' make[4]: Nothing to be done for 'install-exec-am'. /bin/mkdir -p '/<>/debian/tmp/usr/include/libgtop-2.0' /usr/bin/install -c -m 644 glibtop_server.h glibtop_machine.h '/<>/debian/tmp/usr/include/libgtop-2.0' make[4]: Leaving directory '/<>/sysdeps/linux' make[3]: Leaving directory '/<>/sysdeps/linux' make[3]: Entering directory '/<>/sysdeps' make[4]: Entering directory '/<>/sysdeps' make[4]: Nothing to be done for 'install-exec-am'. make[4]: Nothing to be done for 'install-data-am'. make[4]: Leaving directory '/<>/sysdeps' make[3]: Leaving directory '/<>/sysdeps' make[2]: Leaving directory '/<>/sysdeps' Making install in lib make[2]: Entering directory '/<>/lib' make install-am make[3]: Entering directory '/<>/lib' make[4]: Entering directory '/<>/lib' /bin/mkdir -p '/<>/debian/tmp/usr/lib/s390x-linux-gnu' /bin/bash ../libtool --mode=install /usr/bin/install -c libgtop-2.0.la '/<>/debian/tmp/usr/lib/s390x-linux-gnu' libtool: install: /usr/bin/install -c .libs/libgtop-2.0.so.11.0.0 /<>/debian/tmp/usr/lib/s390x-linux-gnu/libgtop-2.0.so.11.0.0 libtool: install: (cd /<>/debian/tmp/usr/lib/s390x-linux-gnu && { ln -s -f libgtop-2.0.so.11.0.0 libgtop-2.0.so.11 || { rm -f libgtop-2.0.so.11 && ln -s libgtop-2.0.so.11.0.0 libgtop-2.0.so.11; }; }) libtool: install: (cd /<>/debian/tmp/usr/lib/s390x-linux-gnu && { ln -s -f libgtop-2.0.so.11.0.0 libgtop-2.0.so || { rm -f libgtop-2.0.so && ln -s libgtop-2.0.so.11.0.0 libgtop-2.0.so; }; }) libtool: install: /usr/bin/install -c .libs/libgtop-2.0.lai /<>/debian/tmp/usr/lib/s390x-linux-gnu/libgtop-2.0.la libtool: install: /usr/bin/install -c .libs/libgtop-2.0.a /<>/debian/tmp/usr/lib/s390x-linux-gnu/libgtop-2.0.a libtool: install: chmod 644 /<>/debian/tmp/usr/lib/s390x-linux-gnu/libgtop-2.0.a libtool: install: ranlib /<>/debian/tmp/usr/lib/s390x-linux-gnu/libgtop-2.0.a libtool: warning: remember to run 'libtool --finish /usr/lib/s390x-linux-gnu' /bin/mkdir -p '/<>/debian/tmp/usr/share/gir-1.0' /usr/bin/install -c -m 644 GTop-2.0.gir '/<>/debian/tmp/usr/share/gir-1.0' /bin/mkdir -p '/<>/debian/tmp/usr/lib/s390x-linux-gnu/girepository-1.0' /usr/bin/install -c -m 644 GTop-2.0.typelib '/<>/debian/tmp/usr/lib/s390x-linux-gnu/girepository-1.0' make[4]: Leaving directory '/<>/lib' make[3]: Leaving directory '/<>/lib' make[2]: Leaving directory '/<>/lib' Making install in src make[2]: Entering directory '/<>/src' make[3]: Entering directory '/<>/src' make[4]: Entering directory '/<>/src' make[4]: Nothing to be done for 'install-exec-am'. make[4]: Nothing to be done for 'install-data-am'. make[4]: Leaving directory '/<>/src' make[3]: Leaving directory '/<>/src' make[2]: Leaving directory '/<>/src' Making install in examples make[2]: Entering directory '/<>/examples' make[3]: Entering directory '/<>/examples' make[3]: Nothing to be done for 'install-exec-am'. make[3]: Nothing to be done for 'install-data-am'. make[3]: Leaving directory '/<>/examples' make[2]: Leaving directory '/<>/examples' Making install in doc make[2]: Entering directory '/<>/doc' Making install in reference make[3]: Entering directory '/<>/doc/reference' make[4]: Entering directory '/<>/doc/reference' make[4]: Nothing to be done for 'install-exec-am'. /usr/bin/install -c -m 644 ./html/home.png /usr/bin/install -c -m 644 ./html/index.html /usr/bin/install -c -m 644 ./html/left-insensitive.png /usr/bin/install -c -m 644 ./html/left.png /usr/bin/install -c -m 644 ./html/libgtop-Close.html /usr/bin/install -c -m 644 ./html/libgtop-Command.html /usr/bin/install -c -m 644 ./html/libgtop-GlibTop-Server.html /usr/bin/install -c -m 644 ./html/libgtop-GlibTop.html /usr/bin/install -c -m 644 ./html/libgtop-Net-List.html /usr/bin/install -c -m 644 ./html/libgtop-Net-Load.html /usr/bin/install -c -m 644 ./html/libgtop-PPP.html /usr/bin/install -c -m 644 ./html/libgtop-Process-Arguments.html /usr/bin/install -c -m 644 ./html/libgtop-Process-List.html /usr/bin/install -c -m 644 ./html/libgtop-Process-Time.html /usr/bin/install -c -m 644 ./html/libgtop-Shared-Memory-Limits.html /usr/bin/install -c -m 644 ./html/libgtop-Uptime.html /usr/bin/install -c -m 644 ./html/libgtop-cpu.html /usr/bin/install -c -m 644 ./html/libgtop-fsusage.html /usr/bin/install -c -m 644 ./html/libgtop-lib.html /usr/bin/install -c -m 644 ./html/libgtop-loadavg.html /usr/bin/install -c -m 644 ./html/libgtop-mem.html /usr/bin/install -c -m 644 ./html/libgtop-mountlist.html /usr/bin/install -c -m 644 ./html/libgtop-msg-limits.html /usr/bin/install -c -m 644 ./html/libgtop-open.html /usr/bin/install -c -m 644 ./html/libgtop-parameter.html /usr/bin/install -c -m 644 ./html/libgtop-prockernel.html /usr/bin/install -c -m 644 ./html/libgtop-procmap.html /usr/bin/install -c -m 644 ./html/libgtop-procmem.html /usr/bin/install -c -m 644 ./html/libgtop-procopenfiles.html /usr/bin/install -c -m 644 ./html/libgtop-procsegment.html /usr/bin/install -c -m 644 ./html/libgtop-procsignal.html /usr/bin/install -c -m 644 ./html/libgtop-procstate.html /usr/bin/install -c -m 644 ./html/libgtop-procuid.html /usr/bin/install -c -m 644 ./html/libgtop-sem-limits.html /usr/bin/install -c -m 644 ./html/libgtop-signal.html /usr/bin/install -c -m 644 ./html/libgtop-swap.html /usr/bin/install -c -m 644 ./html/libgtop-sysdeps.html /usr/bin/install -c -m 644 ./html/libgtop-sysinfo.html /usr/bin/install -c -m 644 ./html/libgtop-union.html /usr/bin/install -c -m 644 ./html/libgtop-version.html /usr/bin/install -c -m 644 ./html/libgtop-white-paper-overview.html /usr/bin/install -c -m 644 ./html/libgtop-white-paper.html /usr/bin/install -c -m 644 ./html/libgtop.devhelp2 /usr/bin/install -c -m 644 ./html/right-insensitive.png /usr/bin/install -c -m 644 ./html/right.png /usr/bin/install -c -m 644 ./html/style.css /usr/bin/install -c -m 644 ./html/up-insensitive.png /usr/bin/install -c -m 644 ./html/up.png make[4]: Leaving directory '/<>/doc/reference' make[3]: Leaving directory '/<>/doc/reference' make[3]: Entering directory '/<>/doc' make[4]: Entering directory '/<>/doc' make[4]: Nothing to be done for 'install-exec-am'. /bin/mkdir -p '/<>/debian/tmp/usr/share/info' /usr/bin/install -c -m 644 ./libgtop2.info '/<>/debian/tmp/usr/share/info' make[4]: Leaving directory '/<>/doc' make[3]: Leaving directory '/<>/doc' make[2]: Leaving directory '/<>/doc' make[2]: Entering directory '/<>' make[3]: Entering directory '/<>' make[3]: Nothing to be done for 'install-exec-am'. /bin/mkdir -p '/<>/debian/tmp/usr/include/libgtop-2.0' /usr/bin/install -c -m 644 glibtop.h libgtopconfig.h '/<>/debian/tmp/usr/include/libgtop-2.0' /bin/mkdir -p '/<>/debian/tmp/usr/lib/s390x-linux-gnu/pkgconfig' /usr/bin/install -c -m 644 libgtop-2.0.pc '/<>/debian/tmp/usr/lib/s390x-linux-gnu/pkgconfig' make[3]: Leaving directory '/<>' make[2]: Leaving directory '/<>' make[1]: Leaving directory '/<>' debian/rules override_dh_install make[1]: Entering directory '/<>' dh_install make[1]: Leaving directory '/<>' dh_installdocs -a dh_installchangelogs -a dh_gnome -a dh_perl -a dh_link -a dh_scour -a dh_strip_nondeterminism -a dh_translations -a make[1]: Entering directory '/<>/po' make[1]: *** No rule to make target 'libgtop-2.0.pot'. Stop. make[1]: Leaving directory '/<>/po' dh_langpack: processing files to add translation domain 'libgtop-2.0'.. dh_compress -a debian/rules override_dh_fixperms make[1]: Entering directory '/<>' dh_fixperms -X libgtop_server2 make[1]: Leaving directory '/<>' dh_missing -a dh_strip -a debian/rules override_dh_makeshlibs make[1]: Entering directory '/<>' dh_makeshlibs -V 'libgtop-2.0-11 (>= 2.32.0)' -- -c4 make[1]: Leaving directory '/<>' dh_shlibdeps -a dh_girepository -a dh_installdeb -a dh_gencontrol -a dpkg-gencontrol: warning: package gir1.2-gtop-2.0: unused substitution variable ${gnome:NextVersion} dpkg-gencontrol: warning: package gir1.2-gtop-2.0: unused substitution variable ${gnome:Version} dpkg-gencontrol: warning: package libgtop2-dev: unused substitution variable ${gnome:NextVersion} dpkg-gencontrol: warning: package libgtop2-dev: unused substitution variable ${gnome:Version} dpkg-gencontrol: warning: package libgtop-2.0-11: unused substitution variable ${gnome:NextVersion} dpkg-gencontrol: warning: package libgtop-2.0-11: unused substitution variable ${gnome:Version} dpkg-gencontrol: warning: package libgtop-2.0-11: unused substitution variable ${gnome:NextVersion} dpkg-gencontrol: warning: package libgtop-2.0-11: unused substitution variable ${gnome:Version} dh_md5sums -a dh_builddeb -a INFO: pkgstriptranslations version 138 INFO: pkgstriptranslations version 138 INFO: pkgstriptranslations version 138 INFO: pkgstriptranslations version 138 pkgstriptranslations: processing libgtop-2.0-11-dbgsym (in debian/.debhelper/libgtop-2.0-11/dbgsym-root); do_strip: 1, oemstrip: pkgstriptranslations: processing gir1.2-gtop-2.0 (in debian/gir1.2-gtop-2.0); do_strip: 1, oemstrip: pkgstriptranslations: processing libgtop-2.0-11 (in debian/libgtop-2.0-11); do_strip: 1, oemstrip: pkgstriptranslations: processing libgtop2-dev (in debian/libgtop2-dev); do_strip: 1, oemstrip: pkgstriptranslations: libgtop-2.0-11-dbgsym does not contain translations, skipping pkgstriptranslations: preparing translation tarball libgtop2_2.38.0-2ubuntu0.18.04.1_s390x_translations.tar.gz...done pkgmaintainermangler: Not overriding Maintainer for domain lists.ubuntu.com pkgstripfiles: processing control file: debian/.debhelper/libgtop-2.0-11/dbgsym-root/DEBIAN/control, package libgtop-2.0-11-dbgsym, directory debian/.debhelper/libgtop-2.0-11/dbgsym-root pkgstripfiles: Running PNG optimization (using 4 cpus) for package libgtop-2.0-11-dbgsym ... pkgstripfiles: No PNG files. dpkg-deb: building package 'libgtop-2.0-11-dbgsym' in 'debian/.debhelper/scratch-space/build-libgtop-2.0-11/libgtop-2.0-11-dbgsym_2.38.0-2ubuntu0.18.04.1_s390x.deb'. Renaming libgtop-2.0-11-dbgsym_2.38.0-2ubuntu0.18.04.1_s390x.deb to libgtop-2.0-11-dbgsym_2.38.0-2ubuntu0.18.04.1_s390x.ddeb pkgstriptranslations: libgtop-2.0-11 does not contain translations, skipping pkgstriptranslations: no translation files, not creating tarball pkgstriptranslations: gir1.2-gtop-2.0 does not contain translations, skipping pkgstriptranslations: no translation files, not creating tarball pkgstriptranslations: libgtop2-dev does not contain translations, skipping pkgstriptranslations: no translation files, not creating tarball pkgmaintainermangler: Not overriding Maintainer for domain lists.ubuntu.com pkgmaintainermangler: Not overriding Maintainer for domain lists.ubuntu.com pkgmaintainermangler: Not overriding Maintainer for domain lists.ubuntu.com pkgstripfiles: processing control file: debian/libgtop-2.0-11/DEBIAN/control, package libgtop-2.0-11, directory debian/libgtop-2.0-11 pkgstripfiles: processing control file: debian/gir1.2-gtop-2.0/DEBIAN/control, package gir1.2-gtop-2.0, directory debian/gir1.2-gtop-2.0 INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... pkgstripfiles: Truncating usr/share/doc/libgtop-2.0-11/changelog.Debian.gz to topmost ten records pkgstripfiles: Running PNG optimization (using 4 cpus) for package libgtop-2.0-11 ... pkgstripfiles: No PNG files. dpkg-deb: building package 'libgtop-2.0-11' in '../libgtop-2.0-11_2.38.0-2ubuntu0.18.04.1_s390x.deb'. pkgstripfiles: processing control file: debian/libgtop2-dev/DEBIAN/control, package libgtop2-dev, directory debian/libgtop2-dev Searching for duplicated docs in dependency libgtop-2.0-11... symlinking changelog.Debian.gz in libgtop2-dev to file in libgtop-2.0-11 Searching for duplicated docs in dependency gir1.2-gtop-2.0... pkgstripfiles: Running PNG optimization (using 4 cpus) for package libgtop2-dev ... pkgstripfiles: No PNG files. dpkg-deb: building package 'libgtop2-dev' in '../libgtop2-dev_2.38.0-2ubuntu0.18.04.1_s390x.deb'. Searching for duplicated docs in dependency libgtop-2.0-11... symlinking changelog.Debian.gz in gir1.2-gtop-2.0 to file in libgtop-2.0-11 pkgstripfiles: Running PNG optimization (using 4 cpus) for package gir1.2-gtop-2.0 ... pkgstripfiles: No PNG files. dpkg-deb: building package 'gir1.2-gtop-2.0' in '../gir1.2-gtop-2.0_2.38.0-2ubuntu0.18.04.1_s390x.deb'. dpkg-genbuildinfo --build=any dpkg-genchanges --build=any -mLaunchpad Build Daemon >../libgtop2_2.38.0-2ubuntu0.18.04.1_s390x.changes dpkg-genchanges: info: binary-only arch-specific upload (source code and arch-indep packages not included) dpkg-source --after-build libgtop2-2.38.0 dpkg-buildpackage: info: binary-only upload (no source included) -------------------------------------------------------------------------------- Build finished at 20180503-1920 Finished -------- I: Built successfully +------------------------------------------------------------------------------+ | Post Build Chroot | +------------------------------------------------------------------------------+ +------------------------------------------------------------------------------+ | Changes | +------------------------------------------------------------------------------+ libgtop2_2.38.0-2ubuntu0.18.04.1_s390x.changes: ----------------------------------------------- Format: 1.8 Date: Thu, 19 Apr 2018 16:05:53 +0200 Source: libgtop2 Binary: libgtop-2.0-11 libgtop2-dev libgtop2-common libgtop2-doc gir1.2-gtop-2.0 Architecture: s390x s390x_translations Version: 2.38.0-2ubuntu0.18.04.1 Distribution: bionic-proposed Urgency: medium Maintainer: Launchpad Build Daemon Changed-By: Andrea Azzarone Description: gir1.2-gtop-2.0 - gtop system monitoring library (gir bindings) libgtop-2.0-11 - gtop system monitoring library (shared) libgtop2-common - gtop system monitoring library (common) libgtop2-dev - gtop system monitoring library (devel) libgtop2-doc - gtop system monitoring library (documentation) Launchpad-Bugs-Fixed: 1749007 Changes: libgtop2 (2.38.0-2ubuntu0.18.04.1) bionic; urgency=medium . * debian/patches/05-mountlist-ignore-snap-squashfs.patch: Ignore squashfs mounted in /snap (LP: #1749007). Checksums-Sha1: 45f3c7c3a32c00617f9d200c91168e3570a67ba6 12708 gir1.2-gtop-2.0_2.38.0-2ubuntu0.18.04.1_s390x.deb ed07e71fa62373fb8a91cd3b6103af70e85eb55a 164776 libgtop-2.0-11-dbgsym_2.38.0-2ubuntu0.18.04.1_s390x.ddeb 96359c44f67c32b66b12fe5caf80444bca9dc663 33440 libgtop-2.0-11_2.38.0-2ubuntu0.18.04.1_s390x.deb c32d23a2d0950d424817f4c152af45ff1ee5c84d 56184 libgtop2-dev_2.38.0-2ubuntu0.18.04.1_s390x.deb 73746969d3531cfc869811033ae2b3336aac2250 11001 libgtop2_2.38.0-2ubuntu0.18.04.1_s390x.buildinfo f0b82b84ade8cf6049681f45b5c5f9a216406bcc 95982 libgtop2_2.38.0-2ubuntu0.18.04.1_s390x_translations.tar.gz Checksums-Sha256: cf2d8c0bccbd4e934c1e8c5545d1f0bff6a87ac5b7c077d649261af4b5a8f847 12708 gir1.2-gtop-2.0_2.38.0-2ubuntu0.18.04.1_s390x.deb adb823e2c65ec91c076b7cde5c42e2285d742f727b50735056637ccf406cdbc2 164776 libgtop-2.0-11-dbgsym_2.38.0-2ubuntu0.18.04.1_s390x.ddeb 62ad3c20a54b8ad93867dd4c88b3bb10d0b08de4c4c25adbf6612746ad7639a1 33440 libgtop-2.0-11_2.38.0-2ubuntu0.18.04.1_s390x.deb ebc71b12e1e7549fe8b6ced9fd247bd3331e4a1b9f3ecbf63af0be480dde45c7 56184 libgtop2-dev_2.38.0-2ubuntu0.18.04.1_s390x.deb 1b0440407f89bfff958b35b15f743ef0d81b119b8aa79665feea58aec6bcec80 11001 libgtop2_2.38.0-2ubuntu0.18.04.1_s390x.buildinfo 7c24fe3e4b5dc33a6f07657ec03008e3f3bb8b475d94f7fc3cdc89746fdc50d2 95982 libgtop2_2.38.0-2ubuntu0.18.04.1_s390x_translations.tar.gz Files: 1ac1b89e8e9dfb5ee0ba5d620836f503 12708 introspection optional gir1.2-gtop-2.0_2.38.0-2ubuntu0.18.04.1_s390x.deb bd52c70b006368092f11524a069bb02b 164776 debug optional libgtop-2.0-11-dbgsym_2.38.0-2ubuntu0.18.04.1_s390x.ddeb 5b5ad627b7f15afe49e97e39536fc956 33440 libs optional libgtop-2.0-11_2.38.0-2ubuntu0.18.04.1_s390x.deb 5f3e125cb55bea7e767a1c6d654b0ca5 56184 libdevel optional libgtop2-dev_2.38.0-2ubuntu0.18.04.1_s390x.deb 1152616f1af1fee98c7e1d037f502c65 11001 libs optional libgtop2_2.38.0-2ubuntu0.18.04.1_s390x.buildinfo 30d7adb5a4a2b257d9acb77619e9b741 95982 raw-translations - libgtop2_2.38.0-2ubuntu0.18.04.1_s390x_translations.tar.gz Original-Maintainer: Debian GNOME Maintainers +------------------------------------------------------------------------------+ | Package contents | +------------------------------------------------------------------------------+ gir1.2-gtop-2.0_2.38.0-2ubuntu0.18.04.1_s390x.deb ------------------------------------------------- new debian package, version 2.0. size 12708 bytes: control archive=776 bytes. 668 bytes, 17 lines control 166 bytes, 2 lines md5sums Package: gir1.2-gtop-2.0 Source: libgtop2 Version: 2.38.0-2ubuntu0.18.04.1 Architecture: s390x Maintainer: Ubuntu Developers Installed-Size: 68 Depends: libgtop-2.0-11 (>= 2.37.90) Section: introspection Priority: optional Multi-Arch: same Description: gtop system monitoring library (gir bindings) The gtop library reads information about processes and the state of the system. It is used by the GNOME desktop environment. . This package can be used by other packages using the GIRepository format to generate dynamic bindings. Original-Maintainer: Debian GNOME Maintainers drwxr-xr-x root/root 0 2018-04-19 14:05 ./ drwxr-xr-x root/root 0 2018-04-19 14:05 ./usr/ drwxr-xr-x root/root 0 2018-04-19 14:05 ./usr/lib/ drwxr-xr-x root/root 0 2018-04-19 14:05 ./usr/lib/s390x-linux-gnu/ drwxr-xr-x root/root 0 2018-04-19 14:05 ./usr/lib/s390x-linux-gnu/girepository-1.0/ -rw-r--r-- root/root 47152 2018-04-19 14:05 ./usr/lib/s390x-linux-gnu/girepository-1.0/GTop-2.0.typelib drwxr-xr-x root/root 0 2018-04-19 14:05 ./usr/share/ drwxr-xr-x root/root 0 2018-04-19 14:05 ./usr/share/doc/ drwxr-xr-x root/root 0 2018-04-19 14:05 ./usr/share/doc/gir1.2-gtop-2.0/ lrwxrwxrwx root/root 0 2018-04-19 14:05 ./usr/share/doc/gir1.2-gtop-2.0/changelog.Debian.gz -> ../libgtop-2.0-11/changelog.Debian.gz -rw-r--r-- root/root 3290 2017-12-18 23:42 ./usr/share/doc/gir1.2-gtop-2.0/copyright libgtop-2.0-11_2.38.0-2ubuntu0.18.04.1_s390x.deb ------------------------------------------------ new debian package, version 2.0. size 33440 bytes: control archive=1400 bytes. 659 bytes, 16 lines control 448 bytes, 6 lines md5sums 42 bytes, 1 lines shlibs 2857 bytes, 81 lines symbols 74 bytes, 2 lines triggers Package: libgtop-2.0-11 Source: libgtop2 Version: 2.38.0-2ubuntu0.18.04.1 Architecture: s390x Maintainer: Ubuntu Developers Installed-Size: 113 Depends: libc6 (>= 2.4), libglib2.0-0 (>= 2.18.0), libxau6, libgtop2-common (>= 2.38.0-2ubuntu0.18.04.1) Section: libs Priority: optional Multi-Arch: same Description: gtop system monitoring library (shared) The gtop library reads information about processes and the state of the system. It is used by the GNOME desktop environment. . This package contains the shared library. Original-Maintainer: Debian GNOME Maintainers drwxr-xr-x root/root 0 2018-04-19 14:05 ./ drwxr-xr-x root/root 0 2018-04-19 14:05 ./usr/ drwxr-xr-x root/root 0 2018-04-19 14:05 ./usr/lib/ drwxr-xr-x root/root 0 2018-04-19 14:05 ./usr/lib/s390x-linux-gnu/ lrwxrwxrwx root/root 0 2018-04-19 14:05 ./usr/lib/s390x-linux-gnu/libgtop-2.0.so.11 -> libgtop-2.0.so.11.0.0 -rw-r--r-- root/root 80784 2018-04-19 14:05 ./usr/lib/s390x-linux-gnu/libgtop-2.0.so.11.0.0 drwxr-xr-x root/root 0 2018-04-19 14:05 ./usr/share/ drwxr-xr-x root/root 0 2018-04-19 14:05 ./usr/share/doc/ drwxr-xr-x root/root 0 2018-04-19 14:05 ./usr/share/doc/libgtop-2.0-11/ -rw-r--r-- root/root 106 2016-11-27 18:05 ./usr/share/doc/libgtop-2.0-11/AUTHORS -rw-r--r-- root/root 5828 2017-09-11 20:19 ./usr/share/doc/libgtop-2.0-11/NEWS.gz -rw-r--r-- root/root 418 2016-11-27 18:05 ./usr/share/doc/libgtop-2.0-11/README -rw-r--r-- root/root 886 2018-04-19 14:05 ./usr/share/doc/libgtop-2.0-11/changelog.Debian.gz -rw-r--r-- root/root 3290 2017-12-18 23:42 ./usr/share/doc/libgtop-2.0-11/copyright libgtop2-dev_2.38.0-2ubuntu0.18.04.1_s390x.deb ---------------------------------------------- new debian package, version 2.0. size 56184 bytes: control archive=1872 bytes. 692 bytes, 16 lines control 3408 bytes, 45 lines md5sums Package: libgtop2-dev Source: libgtop2 Version: 2.38.0-2ubuntu0.18.04.1 Architecture: s390x Maintainer: Ubuntu Developers Installed-Size: 519 Depends: libgtop-2.0-11 (= 2.38.0-2ubuntu0.18.04.1), gir1.2-gtop-2.0 (= 2.38.0-2ubuntu0.18.04.1), libglib2.0-dev Section: libdevel Priority: optional Multi-Arch: same Description: gtop system monitoring library (devel) The gtop library reads information about processes and the state of the system. It is used by the GNOME desktop environment. . This package contains the static library and development headers. Original-Maintainer: Debian GNOME Maintainers drwxr-xr-x root/root 0 2018-04-19 14:05 ./ drwxr-xr-x root/root 0 2018-04-19 14:05 ./usr/ drwxr-xr-x root/root 0 2018-04-19 14:05 ./usr/include/ drwxr-xr-x root/root 0 2018-04-19 14:05 ./usr/include/libgtop-2.0/ -rw-r--r-- root/root 3841 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop.h drwxr-xr-x root/root 0 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/ -rw-r--r-- root/root 1142 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/close.h -rw-r--r-- root/root 2917 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/command.h -rw-r--r-- root/root 3228 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/cpu.h -rw-r--r-- root/root 2079 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/fsusage.h -rw-r--r-- root/root 1659 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/global.h -rw-r--r-- root/root 4523 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/gnuserv.h -rw-r--r-- root/root 2039 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/loadavg.h -rw-r--r-- root/root 2155 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/mem.h -rw-r--r-- root/root 2478 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/mountlist.h -rw-r--r-- root/root 2258 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/msg_limits.h -rw-r--r-- root/root 2518 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/netlist.h -rw-r--r-- root/root 4086 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/netload.h -rw-r--r-- root/root 2102 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/open.h -rw-r--r-- root/root 1658 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/parameter.h -rw-r--r-- root/root 2017 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/ppp.h -rw-r--r-- root/root 1862 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/procaffinity.h -rw-r--r-- root/root 2314 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/procargs.h -rw-r--r-- root/root 2950 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/procio.h -rw-r--r-- root/root 2746 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/prockernel.h -rw-r--r-- root/root 5038 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/proclist.h -rw-r--r-- root/root 3804 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/procmap.h -rw-r--r-- root/root 2433 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/procmem.h -rw-r--r-- root/root 3982 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/procopenfiles.h -rw-r--r-- root/root 2634 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/procsegment.h -rw-r--r-- root/root 2207 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/procsignal.h -rw-r--r-- root/root 3043 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/procstate.h -rw-r--r-- root/root 3920 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/proctime.h -rw-r--r-- root/root 3160 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/procuid.h -rw-r--r-- root/root 1968 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/procwd.h -rw-r--r-- root/root 2472 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/sem_limits.h -rw-r--r-- root/root 2496 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/shm_limits.h -rw-r--r-- root/root 1231 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/signal.h -rw-r--r-- root/root 1978 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/swap.h -rw-r--r-- root/root 3836 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/sysdeps.h -rw-r--r-- root/root 1667 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/sysinfo.h -rw-r--r-- root/root 2626 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/union.h -rw-r--r-- root/root 1886 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop/uptime.h -rw-r--r-- root/root 1023 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop_machine.h -rw-r--r-- root/root 1813 2018-04-19 14:05 ./usr/include/libgtop-2.0/glibtop_server.h -rw-r--r-- root/root 176 2018-04-19 14:05 ./usr/include/libgtop-2.0/libgtopconfig.h drwxr-xr-x root/root 0 2018-04-19 14:05 ./usr/lib/ drwxr-xr-x root/root 0 2018-04-19 14:05 ./usr/lib/s390x-linux-gnu/ -rw-r--r-- root/root 184494 2018-04-19 14:05 ./usr/lib/s390x-linux-gnu/libgtop-2.0.a lrwxrwxrwx root/root 0 2018-04-19 14:05 ./usr/lib/s390x-linux-gnu/libgtop-2.0.so -> libgtop-2.0.so.11.0.0 drwxr-xr-x root/root 0 2018-04-19 14:05 ./usr/lib/s390x-linux-gnu/pkgconfig/ -rw-r--r-- root/root 266 2018-04-19 14:05 ./usr/lib/s390x-linux-gnu/pkgconfig/libgtop-2.0.pc drwxr-xr-x root/root 0 2018-04-19 14:05 ./usr/share/ drwxr-xr-x root/root 0 2018-04-19 14:05 ./usr/share/doc/ drwxr-xr-x root/root 0 2018-04-19 14:05 ./usr/share/doc/libgtop2-dev/ lrwxrwxrwx root/root 0 2018-04-19 14:05 ./usr/share/doc/libgtop2-dev/changelog.Debian.gz -> ../libgtop-2.0-11/changelog.Debian.gz -rw-r--r-- root/root 3290 2017-12-18 23:42 ./usr/share/doc/libgtop2-dev/copyright drwxr-xr-x root/root 0 2018-04-19 14:05 ./usr/share/gir-1.0/ -rw-r--r-- root/root 195680 2018-04-19 14:05 ./usr/share/gir-1.0/GTop-2.0.gir +------------------------------------------------------------------------------+ | Post Build | +------------------------------------------------------------------------------+ +------------------------------------------------------------------------------+ | Cleanup | +------------------------------------------------------------------------------+ Purging /<> Not removing build depends: as requested +------------------------------------------------------------------------------+ | Summary | +------------------------------------------------------------------------------+ Build Architecture: s390x Build-Space: 25140 Build-Time: 38 Distribution: bionic-proposed Host Architecture: s390x Install-Time: 25 Job: libgtop2_2.38.0-2ubuntu0.18.04.1.dsc Machine Architecture: s390x Package: libgtop2 Package-Time: 63 Source-Version: 2.38.0-2ubuntu0.18.04.1 Space: 25140 Status: successful Version: 2.38.0-2ubuntu0.18.04.1 -------------------------------------------------------------------------------- Finished at 20180503-1920 Build needed 00:01:03, 25140k disc space RUN: /usr/share/launchpad-buildd/slavebin/in-target scan-for-processes --backend=chroot --series=bionic --arch=s390x PACKAGEBUILD-14822017 Scanning for processes to kill in build PACKAGEBUILD-14822017 RUN: /usr/share/launchpad-buildd/slavebin/in-target umount-chroot --backend=chroot --series=bionic --arch=s390x PACKAGEBUILD-14822017 Stopping target for build PACKAGEBUILD-14822017 RUN: /usr/share/launchpad-buildd/slavebin/in-target remove-build --backend=chroot --series=bionic --arch=s390x PACKAGEBUILD-14822017 Removing build PACKAGEBUILD-14822017