https://launchpad.net/ubuntu/+source/libgtop2/2.38.0-4/+build/16210574 RUN: /usr/share/launchpad-buildd/slavebin/slave-prep Forking launchpad-buildd slave process... Kernel version: Linux bos02-ppc64el-001 4.4.0-141-generic #167-Ubuntu SMP Wed Dec 5 10:33:00 UTC 2018 ppc64le Buildd toolchain package versions: launchpad-buildd_165 python-lpbuildd_165 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.6 dpkg-dev_1.18.4ubuntu1.5 python-debian_0.1.27ubuntu2. Syncing the system clock with the buildd NTP service... 28 Dec 13:13:40 ntpdate[1791]: adjust time server 10.211.37.1 offset 0.003647 sec RUN: /usr/share/launchpad-buildd/slavebin/in-target unpack-chroot --backend=chroot --series=disco --arch=ppc64el PACKAGEBUILD-16210574 /home/buildd/filecache-default/8ecade3ba39252410f2285d8b2f76e6336361d85 Creating target for build PACKAGEBUILD-16210574 RUN: /usr/share/launchpad-buildd/slavebin/in-target mount-chroot --backend=chroot --series=disco --arch=ppc64el PACKAGEBUILD-16210574 Starting target for build PACKAGEBUILD-16210574 RUN: /usr/share/launchpad-buildd/slavebin/in-target override-sources-list --backend=chroot --series=disco --arch=ppc64el PACKAGEBUILD-16210574 'deb http://ftpmaster.internal/ubuntu disco main universe' 'deb http://ftpmaster.internal/ubuntu disco-security main universe' 'deb http://ftpmaster.internal/ubuntu disco-updates main universe' 'deb http://ftpmaster.internal/ubuntu disco-proposed main universe' Overriding sources.list in build-PACKAGEBUILD-16210574 RUN: /usr/share/launchpad-buildd/slavebin/in-target update-debian-chroot --backend=chroot --series=disco --arch=ppc64el PACKAGEBUILD-16210574 Updating target for build PACKAGEBUILD-16210574 Get:1 http://ftpmaster.internal/ubuntu disco InRelease [243 kB] Get:2 http://ftpmaster.internal/ubuntu disco-security InRelease [65.4 kB] Get:3 http://ftpmaster.internal/ubuntu disco-updates InRelease [65.4 kB] Get:4 http://ftpmaster.internal/ubuntu disco-proposed InRelease [93.2 kB] Get:5 http://ftpmaster.internal/ubuntu disco/main ppc64el Packages [967 kB] Get:6 http://ftpmaster.internal/ubuntu disco/main Translation-en [509 kB] Get:7 http://ftpmaster.internal/ubuntu disco/universe ppc64el Packages [8710 kB] Get:8 http://ftpmaster.internal/ubuntu disco/universe Translation-en [5173 kB] Get:9 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el Packages [81.2 kB] Get:10 http://ftpmaster.internal/ubuntu disco-proposed/main Translation-en [43.5 kB] Get:11 http://ftpmaster.internal/ubuntu disco-proposed/universe ppc64el Packages [301 kB] Get:12 http://ftpmaster.internal/ubuntu disco-proposed/universe Translation-en [175 kB] Fetched 16.4 MB in 3s (4854 kB/s) Reading package lists... Reading package lists... Building dependency tree... Reading state information... Calculating upgrade... The following packages will be upgraded: apt binutils binutils-common binutils-powerpc64le-linux-gnu cpp-8 dash dpkg dpkg-dev e2fslibs e2fsprogs g++-8 gcc-8 gcc-8-base init init-system-helpers libapt-pkg5.0 libasan5 libassuan0 libatomic1 libbinutils libcc1-0 libcom-err2 libcomerr2 libdpkg-perl libext2fs2 libgcc-8-dev libgcc1 libgnutls30 libgomp1 libgpg-error0 libitm1 liblsan0 libpng16-16 libquadmath0 libsqlite3-0 libss2 libstdc++-8-dev libstdc++6 libtsan0 libubsan1 linux-libc-dev sed 42 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 37.0 MB of archives. After this operation, 178 kB of additional disk space will be used. Get:1 http://ftpmaster.internal/ubuntu disco/main ppc64el dpkg ppc64el 1.19.2ubuntu2 [1138 kB] Get:2 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el dash ppc64el 0.5.10.2-4 [101 kB] Get:3 http://ftpmaster.internal/ubuntu disco/main ppc64el sed ppc64el 4.7-1 [203 kB] Get:4 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el init-system-helpers all 1.56+nmu1 [38.2 kB] Get:5 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el libgnutls30 ppc64el 3.6.5-2ubuntu1 [758 kB] Get:6 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el libubsan1 ppc64el 8.2.0-13ubuntu1 [133 kB] Get:7 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el libtsan0 ppc64el 8.2.0-13ubuntu1 [296 kB] Get:8 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el gcc-8-base ppc64el 8.2.0-13ubuntu1 [18.6 kB] Get:9 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el libgcc1 ppc64el 1:8.2.0-13ubuntu1 [30.3 kB] Get:10 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el libgomp1 ppc64el 8.2.0-13ubuntu1 [79.9 kB] Get:11 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el libitm1 ppc64el 8.2.0-13ubuntu1 [29.3 kB] Get:12 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el libatomic1 ppc64el 8.2.0-13ubuntu1 [9888 B] Get:13 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el libasan5 ppc64el 8.2.0-13ubuntu1 [388 kB] Get:14 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el liblsan0 ppc64el 8.2.0-13ubuntu1 [144 kB] Get:15 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el libquadmath0 ppc64el 8.2.0-13ubuntu1 [136 kB] Get:16 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el cpp-8 ppc64el 8.2.0-13ubuntu1 [6739 kB] Get:17 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el libcc1-0 ppc64el 8.2.0-13ubuntu1 [40.8 kB] Get:18 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el g++-8 ppc64el 8.2.0-13ubuntu1 [7647 kB] Get:19 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el gcc-8 ppc64el 8.2.0-13ubuntu1 [7501 kB] Get:20 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el libgcc-8-dev ppc64el 8.2.0-13ubuntu1 [1200 kB] Get:21 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el libstdc++-8-dev ppc64el 8.2.0-13ubuntu1 [1592 kB] Get:22 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el libstdc++6 ppc64el 8.2.0-13ubuntu1 [443 kB] Get:23 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el libbinutils ppc64el 2.31.1-11ubuntu1 [521 kB] Get:24 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el binutils-common ppc64el 2.31.1-11ubuntu1 [194 kB] Get:25 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el binutils ppc64el 2.31.1-11ubuntu1 [3388 B] Get:26 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el binutils-powerpc64le-linux-gnu ppc64el 2.31.1-11ubuntu1 [2049 kB] Get:27 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el libapt-pkg5.0 ppc64el 1.8.0~alpha3 [899 kB] Get:28 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el apt ppc64el 1.8.0~alpha3 [1201 kB] Get:29 http://ftpmaster.internal/ubuntu disco/main ppc64el libext2fs2 ppc64el 1.44.5-1 [191 kB] Get:30 http://ftpmaster.internal/ubuntu disco/main ppc64el e2fsprogs ppc64el 1.44.5-1 [554 kB] Get:31 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el init ppc64el 1.56+nmu1 [6080 B] Get:32 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el libgpg-error0 ppc64el 1.33-3 [70.4 kB] Get:33 http://ftpmaster.internal/ubuntu disco/main ppc64el libcom-err2 ppc64el 1.44.5-1 [9956 B] Get:34 http://ftpmaster.internal/ubuntu disco/main ppc64el libss2 ppc64el 1.44.5-1 [12.6 kB] Get:35 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el libsqlite3-0 ppc64el 3.26.0+fossilbc891ac6b-1 [565 kB] Get:36 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el libpng16-16 ppc64el 1.6.36-1 [204 kB] Get:37 http://ftpmaster.internal/ubuntu disco/main ppc64el dpkg-dev all 1.19.2ubuntu2 [549 kB] Get:38 http://ftpmaster.internal/ubuntu disco/main ppc64el libdpkg-perl all 1.19.2ubuntu2 [227 kB] Get:39 http://ftpmaster.internal/ubuntu disco/main ppc64el e2fslibs ppc64el 1.44.5-1 [2704 B] Get:40 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el libassuan0 ppc64el 2.5.2-1 [38.7 kB] Get:41 http://ftpmaster.internal/ubuntu disco/main ppc64el libcomerr2 ppc64el 1.44.5-1 [2700 B] Get:42 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el linux-libc-dev ppc64el 4.19.0-9.10 [1035 kB] debconf: delaying package configuration, since apt-utils is not installed Fetched 37.0 MB in 1s (64.3 MB/s) (Reading database ... 12596 files and directories currently installed.) Preparing to unpack .../dpkg_1.19.2ubuntu2_ppc64el.deb ... Unpacking dpkg (1.19.2ubuntu2) over (1.19.2ubuntu1) ... Setting up dpkg (1.19.2ubuntu2) ... (Reading database ... 12596 files and directories currently installed.) Preparing to unpack .../dash_0.5.10.2-4_ppc64el.deb ... Unpacking dash (0.5.10.2-4) over (0.5.10.2-2) ... Setting up dash (0.5.10.2-4) ... (Reading database ... 12596 files and directories currently installed.) Preparing to unpack .../archives/sed_4.7-1_ppc64el.deb ... Unpacking sed (4.7-1) over (4.5-2) ... Setting up sed (4.7-1) ... (Reading database ... 12596 files and directories currently installed.) Preparing to unpack .../init-system-helpers_1.56+nmu1_all.deb ... Unpacking init-system-helpers (1.56+nmu1) over (1.56) ... Setting up init-system-helpers (1.56+nmu1) ... (Reading database ... 12596 files and directories currently installed.) Preparing to unpack .../libgnutls30_3.6.5-2ubuntu1_ppc64el.deb ... Unpacking libgnutls30:ppc64el (3.6.5-2ubuntu1) over (3.6.4-2ubuntu2) ... Setting up libgnutls30:ppc64el (3.6.5-2ubuntu1) ... (Reading database ... 12596 files and directories currently installed.) Preparing to unpack .../libubsan1_8.2.0-13ubuntu1_ppc64el.deb ... Unpacking libubsan1:ppc64el (8.2.0-13ubuntu1) over (8.2.0-12ubuntu1) ... Preparing to unpack .../libtsan0_8.2.0-13ubuntu1_ppc64el.deb ... Unpacking libtsan0:ppc64el (8.2.0-13ubuntu1) over (8.2.0-12ubuntu1) ... Preparing to unpack .../gcc-8-base_8.2.0-13ubuntu1_ppc64el.deb ... Unpacking gcc-8-base:ppc64el (8.2.0-13ubuntu1) over (8.2.0-12ubuntu1) ... Setting up gcc-8-base:ppc64el (8.2.0-13ubuntu1) ... (Reading database ... 12596 files and directories currently installed.) Preparing to unpack .../libgcc1_1%3a8.2.0-13ubuntu1_ppc64el.deb ... Unpacking libgcc1:ppc64el (1:8.2.0-13ubuntu1) over (1:8.2.0-12ubuntu1) ... Setting up libgcc1:ppc64el (1:8.2.0-13ubuntu1) ... (Reading database ... 12596 files and directories currently installed.) Preparing to unpack .../00-libgomp1_8.2.0-13ubuntu1_ppc64el.deb ... Unpacking libgomp1:ppc64el (8.2.0-13ubuntu1) over (8.2.0-12ubuntu1) ... Preparing to unpack .../01-libitm1_8.2.0-13ubuntu1_ppc64el.deb ... Unpacking libitm1:ppc64el (8.2.0-13ubuntu1) over (8.2.0-12ubuntu1) ... Preparing to unpack .../02-libatomic1_8.2.0-13ubuntu1_ppc64el.deb ... Unpacking libatomic1:ppc64el (8.2.0-13ubuntu1) over (8.2.0-12ubuntu1) ... Preparing to unpack .../03-libasan5_8.2.0-13ubuntu1_ppc64el.deb ... Unpacking libasan5:ppc64el (8.2.0-13ubuntu1) over (8.2.0-12ubuntu1) ... Preparing to unpack .../04-liblsan0_8.2.0-13ubuntu1_ppc64el.deb ... Unpacking liblsan0:ppc64el (8.2.0-13ubuntu1) over (8.2.0-12ubuntu1) ... Preparing to unpack .../05-libquadmath0_8.2.0-13ubuntu1_ppc64el.deb ... Unpacking libquadmath0:ppc64el (8.2.0-13ubuntu1) over (8.2.0-12ubuntu1) ... Preparing to unpack .../06-cpp-8_8.2.0-13ubuntu1_ppc64el.deb ... Unpacking cpp-8 (8.2.0-13ubuntu1) over (8.2.0-12ubuntu1) ... Preparing to unpack .../07-libcc1-0_8.2.0-13ubuntu1_ppc64el.deb ... Unpacking libcc1-0:ppc64el (8.2.0-13ubuntu1) over (8.2.0-12ubuntu1) ... Preparing to unpack .../08-g++-8_8.2.0-13ubuntu1_ppc64el.deb ... Unpacking g++-8 (8.2.0-13ubuntu1) over (8.2.0-12ubuntu1) ... Preparing to unpack .../09-gcc-8_8.2.0-13ubuntu1_ppc64el.deb ... Unpacking gcc-8 (8.2.0-13ubuntu1) over (8.2.0-12ubuntu1) ... Preparing to unpack .../10-libgcc-8-dev_8.2.0-13ubuntu1_ppc64el.deb ... Unpacking libgcc-8-dev:ppc64el (8.2.0-13ubuntu1) over (8.2.0-12ubuntu1) ... Preparing to unpack .../11-libstdc++-8-dev_8.2.0-13ubuntu1_ppc64el.deb ... Unpacking libstdc++-8-dev:ppc64el (8.2.0-13ubuntu1) over (8.2.0-12ubuntu1) ... Preparing to unpack .../12-libstdc++6_8.2.0-13ubuntu1_ppc64el.deb ... Unpacking libstdc++6:ppc64el (8.2.0-13ubuntu1) over (8.2.0-12ubuntu1) ... Setting up libstdc++6:ppc64el (8.2.0-13ubuntu1) ... (Reading database ... 12596 files and directories currently installed.) Preparing to unpack .../libbinutils_2.31.1-11ubuntu1_ppc64el.deb ... Unpacking libbinutils:ppc64el (2.31.1-11ubuntu1) over (2.31.1-10ubuntu1) ... Preparing to unpack .../binutils-common_2.31.1-11ubuntu1_ppc64el.deb ... Unpacking binutils-common:ppc64el (2.31.1-11ubuntu1) over (2.31.1-10ubuntu1) ... Preparing to unpack .../binutils_2.31.1-11ubuntu1_ppc64el.deb ... Unpacking binutils (2.31.1-11ubuntu1) over (2.31.1-10ubuntu1) ... Preparing to unpack .../binutils-powerpc64le-linux-gnu_2.31.1-11ubuntu1_ppc64el.deb ... Unpacking binutils-powerpc64le-linux-gnu (2.31.1-11ubuntu1) over (2.31.1-10ubuntu1) ... Preparing to unpack .../libapt-pkg5.0_1.8.0~alpha3_ppc64el.deb ... Unpacking libapt-pkg5.0:ppc64el (1.8.0~alpha3) over (1.8.0~alpha2ubuntu1) ... Setting up libapt-pkg5.0:ppc64el (1.8.0~alpha3) ... (Reading database ... 12596 files and directories currently installed.) Preparing to unpack .../apt_1.8.0~alpha3_ppc64el.deb ... Unpacking apt (1.8.0~alpha3) over (1.8.0~alpha2ubuntu1) ... Setting up apt (1.8.0~alpha3) ... (Reading database ... 12595 files and directories currently installed.) Preparing to unpack .../libext2fs2_1.44.5-1_ppc64el.deb ... Unpacking libext2fs2:ppc64el (1.44.5-1) over (1.44.4-2ubuntu1) ... Setting up libext2fs2:ppc64el (1.44.5-1) ... (Reading database ... 12594 files and directories currently installed.) Preparing to unpack .../e2fsprogs_1.44.5-1_ppc64el.deb ... Unpacking e2fsprogs (1.44.5-1) over (1.44.4-2ubuntu1) ... Preparing to unpack .../init_1.56+nmu1_ppc64el.deb ... Unpacking init (1.56+nmu1) over (1.56) ... Preparing to unpack .../libgpg-error0_1.33-3_ppc64el.deb ... Unpacking libgpg-error0:ppc64el (1.33-3) over (1.32-3) ... Setting up libgpg-error0:ppc64el (1.33-3) ... (Reading database ... 12594 files and directories currently installed.) Preparing to unpack .../0-libcom-err2_1.44.5-1_ppc64el.deb ... Unpacking libcom-err2:ppc64el (1.44.5-1) over (1.44.4-2ubuntu1) ... Preparing to unpack .../1-libss2_1.44.5-1_ppc64el.deb ... Unpacking libss2:ppc64el (1.44.5-1) over (1.44.4-2ubuntu1) ... Preparing to unpack .../2-libsqlite3-0_3.26.0+fossilbc891ac6b-1_ppc64el.deb ... Unpacking libsqlite3-0:ppc64el (3.26.0+fossilbc891ac6b-1) over (3.26.0-2) ... Preparing to unpack .../3-libpng16-16_1.6.36-1_ppc64el.deb ... Unpacking libpng16-16:ppc64el (1.6.36-1) over (1.6.34-2) ... Preparing to unpack .../4-dpkg-dev_1.19.2ubuntu2_all.deb ... Unpacking dpkg-dev (1.19.2ubuntu2) over (1.19.2ubuntu1) ... Preparing to unpack .../5-libdpkg-perl_1.19.2ubuntu2_all.deb ... Unpacking libdpkg-perl (1.19.2ubuntu2) over (1.19.2ubuntu1) ... Preparing to unpack .../6-e2fslibs_1.44.5-1_ppc64el.deb ... Unpacking e2fslibs:ppc64el (1.44.5-1) over (1.44.4-2ubuntu1) ... Preparing to unpack .../7-libassuan0_2.5.2-1_ppc64el.deb ... Unpacking libassuan0:ppc64el (2.5.2-1) over (2.5.1-2) ... Preparing to unpack .../8-libcomerr2_1.44.5-1_ppc64el.deb ... Unpacking libcomerr2:ppc64el (1.44.5-1) over (1.44.4-2ubuntu1) ... Preparing to unpack .../9-linux-libc-dev_4.19.0-9.10_ppc64el.deb ... Unpacking linux-libc-dev:ppc64el (4.19.0-9.10) over (4.18.0-11.12) ... Setting up libquadmath0:ppc64el (8.2.0-13ubuntu1) ... Setting up cpp-8 (8.2.0-13ubuntu1) ... Setting up libcom-err2:ppc64el (1.44.5-1) ... Setting up libgomp1:ppc64el (8.2.0-13ubuntu1) ... Setting up libatomic1:ppc64el (8.2.0-13ubuntu1) ... Setting up libss2:ppc64el (1.44.5-1) ... Setting up libcc1-0:ppc64el (8.2.0-13ubuntu1) ... Setting up e2fslibs:ppc64el (1.44.5-1) ... Setting up libpng16-16:ppc64el (1.6.36-1) ... Setting up init (1.56+nmu1) ... Setting up libtsan0:ppc64el (8.2.0-13ubuntu1) ... Setting up linux-libc-dev:ppc64el (4.19.0-9.10) ... Setting up libdpkg-perl (1.19.2ubuntu2) ... Setting up e2fsprogs (1.44.5-1) ... Setting up liblsan0:ppc64el (8.2.0-13ubuntu1) ... Setting up binutils-common:ppc64el (2.31.1-11ubuntu1) ... Processing triggers for libc-bin (2.28-0ubuntu1) ... Setting up libsqlite3-0:ppc64el (3.26.0+fossilbc891ac6b-1) ... Setting up libcomerr2:ppc64el (1.44.5-1) ... Setting up libasan5:ppc64el (8.2.0-13ubuntu1) ... Setting up libassuan0:ppc64el (2.5.2-1) ... Setting up libitm1:ppc64el (8.2.0-13ubuntu1) ... Setting up libubsan1:ppc64el (8.2.0-13ubuntu1) ... Setting up libbinutils:ppc64el (2.31.1-11ubuntu1) ... Setting up binutils-powerpc64le-linux-gnu (2.31.1-11ubuntu1) ... Setting up libgcc-8-dev:ppc64el (8.2.0-13ubuntu1) ... Setting up binutils (2.31.1-11ubuntu1) ... Setting up libstdc++-8-dev:ppc64el (8.2.0-13ubuntu1) ... Setting up gcc-8 (8.2.0-13ubuntu1) ... Setting up g++-8 (8.2.0-13ubuntu1) ... Setting up dpkg-dev (1.19.2ubuntu2) ... Processing triggers for libc-bin (2.28-0ubuntu1) ... RUN: /usr/share/launchpad-buildd/slavebin/sbuild-package PACKAGEBUILD-16210574 ppc64el disco-proposed -c chroot:build-PACKAGEBUILD-16210574 --arch=ppc64el --dist=disco-proposed --nolog libgtop2_2.38.0-4.dsc Initiating build PACKAGEBUILD-16210574 with 4 jobs across 4 processor cores. Kernel reported to sbuild: 4.4.0-141-generic #167-Ubuntu SMP Wed Dec 5 10:33:00 UTC 2018 ppc64le sbuild (Debian sbuild) 0.67.0 (26 Dec 2015) on bos02-ppc64el-001.buildd +==============================================================================+ | libgtop2 2.38.0-4 (ppc64el) 28 Dec 2018 13:13 | +==============================================================================+ Package: libgtop2 Version: 2.38.0-4 Source Version: 2.38.0-4 Distribution: disco-proposed Machine Architecture: ppc64el Host Architecture: ppc64el Build Architecture: ppc64el I: NOTICE: Log filtering will replace 'build/libgtop2-UhCDmx/libgtop2-2.38.0' with '<>' I: NOTICE: Log filtering will replace 'build/libgtop2-UhCDmx' with '<>' I: NOTICE: Log filtering will replace 'home/buildd/build-PACKAGEBUILD-16210574/chroot-autobuild' with '<>' +------------------------------------------------------------------------------+ | Fetch source files | +------------------------------------------------------------------------------+ Local sources ------------- libgtop2_2.38.0-4.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-340pHG/apt_archive/sbuild-build-depends-core-dummy.deb'. Ign:1 copy:/<>/resolver-340pHG/apt_archive ./ InRelease Get:2 copy:/<>/resolver-340pHG/apt_archive ./ Release [2119 B] Ign:3 copy:/<>/resolver-340pHG/apt_archive ./ Release.gpg Get:4 copy:/<>/resolver-340pHG/apt_archive ./ Sources [214 B] Get:5 copy:/<>/resolver-340pHG/apt_archive ./ Packages [528 B] Fetched 2861 B in 0s (206 kB/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 856 B of archives. After this operation, 0 B of additional disk space will be used. Get:1 copy:/<>/resolver-340pHG/apt_archive ./ sbuild-build-depends-core-dummy 0.invalid.0 [856 B] debconf: delaying package configuration, since apt-utils is not installed Fetched 856 B in 0s (0 B/s) Selecting previously unselected package sbuild-build-depends-core-dummy. (Reading database ... 12597 files and directories currently installed.) Preparing to unpack .../sbuild-build-depends-core-dummy_0.invalid.0_ppc64el.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-UZYT6u/apt_archive/sbuild-build-depends-libgtop2-dummy.deb'. Ign:1 copy:/<>/resolver-UZYT6u/apt_archive ./ InRelease Get:2 copy:/<>/resolver-UZYT6u/apt_archive ./ Release [2119 B] Ign:3 copy:/<>/resolver-UZYT6u/apt_archive ./ Release.gpg Get:4 copy:/<>/resolver-UZYT6u/apt_archive ./ Sources [353 B] Get:5 copy:/<>/resolver-UZYT6u/apt_archive ./ Packages [644 B] Fetched 3116 B in 0s (273 kB/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 dwz 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 libfribidi0 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 libicu63 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 libonig5 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-stdlib libpython2.7-minimal libpython2.7-stdlib libpython3-stdlib libpython3.7-minimal libpython3.7-stdlib librsvg2-2 libsigsegv2 libsm-dev libsm6 libtext-unidecode-perl libthai-data libthai0 libtiff5 libtimedate-perl libtool libtry-tiny-perl libuchardet0 liburi-perl libwebp6 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-setuptools python-six python2 python2-minimal python2.7 python2.7-minimal python3 python3-cairo python3-distutils python3-gi python3-gi-cairo python3-lib2to3 python3-mako python3-markdown python3-markupsafe python3-minimal python3-pkg-resources python3-scour python3-six python3.7 python3.7-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 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 libgdk-pixbuf2.0-bin | libgdk-pixbuf2.0-dev libxml2-utils libdata-dump-perl libice-doc libcrypt-ssleay-perl librsvg2-bin libsm-doc libtool-doc gfortran | fortran95-compiler gcj-jdk libauthen-ntlm-perl libx11-doc 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-doc python2-doc python2.7-doc binfmt-support python3-doc python3-tk python3-venv python3-beaker python-mako-doc python-markdown-doc python3-setuptools python3.7-venv python3.7-doc sgml-base-doc perlsgml w3-recs 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 libxml-sax-expat-perl libmail-sendmail-perl python3-pygments python3-yaml 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 dwz 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 libfribidi0 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 libicu63 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 libonig5 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-stdlib libpython2.7-minimal libpython2.7-stdlib libpython3-stdlib libpython3.7-minimal libpython3.7-stdlib librsvg2-2 libsigsegv2 libsm-dev libsm6 libtext-unidecode-perl libthai-data libthai0 libtiff5 libtimedate-perl libtool libtry-tiny-perl libuchardet0 liburi-perl libwebp6 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-setuptools python-six python2 python2-minimal python2.7 python2.7-minimal python3 python3-cairo python3-distutils python3-gi python3-gi-cairo python3-lib2to3 python3-mako python3-markdown python3-markupsafe python3-minimal python3-pkg-resources python3-scour python3-six python3.7 python3.7-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, 192 newly installed, 0 to remove and 0 not upgraded. Need to get 47.8 MB of archives. After this operation, 244 MB of additional disk space will be used. Get:1 copy:/<>/resolver-UZYT6u/apt_archive ./ sbuild-build-depends-libgtop2-dummy 0.invalid.0 [968 B] Get:2 http://ftpmaster.internal/ubuntu disco/main ppc64el libpython3.7-minimal ppc64el 3.7.2~rc1-1 [549 kB] Get:3 http://ftpmaster.internal/ubuntu disco/main ppc64el libexpat1 ppc64el 2.2.6-1 [87.0 kB] Get:4 http://ftpmaster.internal/ubuntu disco/main ppc64el python3.7-minimal ppc64el 3.7.2~rc1-1 [1973 kB] Get:5 http://ftpmaster.internal/ubuntu disco/main ppc64el python3-minimal ppc64el 3.7.1-1ubuntu1 [23.6 kB] Get:6 http://ftpmaster.internal/ubuntu disco/main ppc64el mime-support all 3.60ubuntu1 [30.1 kB] Get:7 http://ftpmaster.internal/ubuntu disco/main ppc64el libmpdec2 ppc64el 2.4.2-2 [86.8 kB] Get:8 http://ftpmaster.internal/ubuntu disco/main ppc64el libpython3.7-stdlib ppc64el 3.7.2~rc1-1 [1794 kB] Get:9 http://ftpmaster.internal/ubuntu disco/main ppc64el python3.7 ppc64el 3.7.2~rc1-1 [277 kB] Get:10 http://ftpmaster.internal/ubuntu disco/main ppc64el libpython3-stdlib ppc64el 3.7.1-1ubuntu1 [7128 B] Get:11 http://ftpmaster.internal/ubuntu disco/main ppc64el python3 ppc64el 3.7.1-1ubuntu1 [47.2 kB] Get:12 http://ftpmaster.internal/ubuntu disco/main ppc64el libxau6 ppc64el 1:1.0.8-1 [7460 B] Get:13 http://ftpmaster.internal/ubuntu disco/main ppc64el libbsd0 ppc64el 0.9.1-1 [53.6 kB] Get:14 http://ftpmaster.internal/ubuntu disco/main ppc64el libxdmcp6 ppc64el 1:1.1.2-3 [11.0 kB] Get:15 http://ftpmaster.internal/ubuntu disco/main ppc64el libxcb1 ppc64el 1.13.1-2 [51.1 kB] Get:16 http://ftpmaster.internal/ubuntu disco/main ppc64el libx11-data all 2:1.6.7-1 [113 kB] Get:17 http://ftpmaster.internal/ubuntu disco/main ppc64el libx11-6 ppc64el 2:1.6.7-1 [641 kB] Get:18 http://ftpmaster.internal/ubuntu disco/main ppc64el libxext6 ppc64el 2:1.3.3-1 [30.7 kB] Get:19 http://ftpmaster.internal/ubuntu disco/main ppc64el bsdmainutils ppc64el 11.1.2ubuntu2 [185 kB] Get:20 http://ftpmaster.internal/ubuntu disco/universe ppc64el libuchardet0 ppc64el 0.0.6-3 [67.7 kB] Get:21 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el groff-base ppc64el 1.22.4-1 [936 kB] Get:22 http://ftpmaster.internal/ubuntu disco/main ppc64el libpipeline1 ppc64el 1.5.0-2 [27.4 kB] Get:23 http://ftpmaster.internal/ubuntu disco/main ppc64el man-db ppc64el 2.8.4-3 [1057 kB] Get:24 http://ftpmaster.internal/ubuntu disco/main ppc64el x11-common all 1:7.7+19ubuntu8 [22.5 kB] Get:25 http://ftpmaster.internal/ubuntu disco/main ppc64el libice6 ppc64el 2:1.0.9-2 [38.0 kB] Get:26 http://ftpmaster.internal/ubuntu disco/main ppc64el libsm6 ppc64el 2:1.2.2-1 [15.1 kB] Get:27 http://ftpmaster.internal/ubuntu disco/main ppc64el libpython2.7-minimal ppc64el 2.7.15-5 [335 kB] Get:28 http://ftpmaster.internal/ubuntu disco/main ppc64el python2.7-minimal ppc64el 2.7.15-5 [1469 kB] Get:29 http://ftpmaster.internal/ubuntu disco/main ppc64el python2-minimal ppc64el 2.7.15-3 [28.1 kB] Get:30 http://ftpmaster.internal/ubuntu disco/main ppc64el python-minimal ppc64el 2.7.15-3 [5996 B] Get:31 http://ftpmaster.internal/ubuntu disco/main ppc64el libpython2.7-stdlib ppc64el 2.7.15-5 [2009 kB] Get:32 http://ftpmaster.internal/ubuntu disco/main ppc64el python2.7 ppc64el 2.7.15-5 [239 kB] Get:33 http://ftpmaster.internal/ubuntu disco/main ppc64el libpython2-stdlib ppc64el 2.7.15-3 [7728 B] Get:34 http://ftpmaster.internal/ubuntu disco/main ppc64el libpython-stdlib ppc64el 2.7.15-3 [5828 B] Get:35 http://ftpmaster.internal/ubuntu disco/main ppc64el python2 ppc64el 2.7.15-3 [26.5 kB] Get:36 http://ftpmaster.internal/ubuntu disco/main ppc64el python ppc64el 2.7.15-3 [7828 B] Get:37 http://ftpmaster.internal/ubuntu disco/main ppc64el sgml-base all 1.29 [12.3 kB] Get:38 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el ucf all 3.0038+nmu1 [51.6 kB] Get:39 http://ftpmaster.internal/ubuntu disco/main ppc64el tex-common all 6.10 [32.6 kB] Get:40 http://ftpmaster.internal/ubuntu disco/main ppc64el libmagic-mgc ppc64el 1:5.34-2 [197 kB] Get:41 http://ftpmaster.internal/ubuntu disco/main ppc64el libmagic1 ppc64el 1:5.34-2 [89.8 kB] Get:42 http://ftpmaster.internal/ubuntu disco/main ppc64el file ppc64el 1:5.34-2 [24.2 kB] Get:43 http://ftpmaster.internal/ubuntu disco/main ppc64el libglib2.0-0 ppc64el 2.58.1-2 [1301 kB] Get:44 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el libgirepository-1.0-1 ppc64el 1.58.2-2 [91.5 kB] Get:45 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el gir1.2-glib-2.0 ppc64el 1.58.2-2 [132 kB] Get:46 http://ftpmaster.internal/ubuntu disco/main ppc64el libelf1 ppc64el 0.175-1 [52.3 kB] Get:47 http://ftpmaster.internal/ubuntu disco/main ppc64el libfribidi0 ppc64el 1.0.5-3 [27.3 kB] Get:48 http://ftpmaster.internal/ubuntu disco/main ppc64el libglib2.0-data all 2.58.1-2 [5476 B] Get:49 http://ftpmaster.internal/ubuntu disco/main ppc64el libicu63 ppc64el 63.1-5 [8402 kB] Get:50 http://ftpmaster.internal/ubuntu disco/main ppc64el libxml2 ppc64el 2.9.4+dfsg1-7ubuntu3 [666 kB] Get:51 http://ftpmaster.internal/ubuntu disco/main ppc64el netbase all 5.5 [12.9 kB] Get:52 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el python3-gi ppc64el 3.30.4-1 [182 kB] Get:53 http://ftpmaster.internal/ubuntu disco/main ppc64el shared-mime-info ppc64el 1.10-1 [435 kB] Get:54 http://ftpmaster.internal/ubuntu disco/main ppc64el gettext-base ppc64el 0.19.8.1-9 [52.8 kB] Get:55 http://ftpmaster.internal/ubuntu disco/main ppc64el libsigsegv2 ppc64el 2.12-2 [13.9 kB] Get:56 http://ftpmaster.internal/ubuntu disco/main ppc64el m4 ppc64el 1.4.18-2 [203 kB] Get:57 http://ftpmaster.internal/ubuntu disco/main ppc64el autoconf all 2.69-11 [322 kB] Get:58 http://ftpmaster.internal/ubuntu disco/main ppc64el autotools-dev all 20180224.1 [39.6 kB] Get:59 http://ftpmaster.internal/ubuntu disco/main ppc64el automake all 1:1.16.1-4 [522 kB] Get:60 http://ftpmaster.internal/ubuntu disco/main ppc64el autopoint all 0.19.8.1-9 [412 kB] Get:61 http://ftpmaster.internal/ubuntu disco/main ppc64el libtool all 2.4.6-6 [195 kB] Get:62 http://ftpmaster.internal/ubuntu disco/main ppc64el dh-autoreconf all 19 [16.1 kB] Get:63 http://ftpmaster.internal/ubuntu disco/main ppc64el libarchive-zip-perl all 1.64-1 [84.9 kB] Get:64 http://ftpmaster.internal/ubuntu disco/main ppc64el libfile-stripnondeterminism-perl all 1.0.0-1 [13.9 kB] Get:65 http://ftpmaster.internal/ubuntu disco/main ppc64el dh-strip-nondeterminism all 1.0.0-1 [5064 B] Get:66 http://ftpmaster.internal/ubuntu disco/main ppc64el dwz ppc64el 0.12-3 [87.4 kB] Get:67 http://ftpmaster.internal/ubuntu disco/main ppc64el libcroco3 ppc64el 0.6.12-3 [92.5 kB] Get:68 http://ftpmaster.internal/ubuntu disco/main ppc64el gettext ppc64el 0.19.8.1-9 [978 kB] Get:69 http://ftpmaster.internal/ubuntu disco/main ppc64el intltool-debian all 0.35.0+20060710.4 [24.9 kB] Get:70 http://ftpmaster.internal/ubuntu disco/main ppc64el po-debconf all 1.0.21 [233 kB] Get:71 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el debhelper all 12ubuntu1 [887 kB] Get:72 http://ftpmaster.internal/ubuntu disco/main ppc64el xml-core all 0.18 [21.3 kB] Get:73 http://ftpmaster.internal/ubuntu disco/universe ppc64el sgml-data all 2.0.11 [171 kB] Get:74 http://ftpmaster.internal/ubuntu disco/universe ppc64el docbook all 4.5-6 [122 kB] Get:75 http://ftpmaster.internal/ubuntu disco/universe ppc64el libosp5 ppc64el 1.5.2-13ubuntu2 [620 kB] Get:76 http://ftpmaster.internal/ubuntu disco/universe ppc64el opensp ppc64el 1.5.2-13ubuntu2 [156 kB] Get:77 http://ftpmaster.internal/ubuntu disco/universe ppc64el docbook-to-man ppc64el 1:2.0.0-42 [94.5 kB] Get:78 http://ftpmaster.internal/ubuntu disco/universe ppc64el docbook-xml all 4.5-8 [71.8 kB] Get:79 http://ftpmaster.internal/ubuntu disco/universe ppc64el docbook-xsl all 1.79.1+dfsg-2 [1075 kB] Get:80 http://ftpmaster.internal/ubuntu disco/main ppc64el libfreetype6 ppc64el 2.8.1-2ubuntu2 [386 kB] Get:81 http://ftpmaster.internal/ubuntu disco/main ppc64el fonts-dejavu-core all 2.37-1 [1041 kB] Get:82 http://ftpmaster.internal/ubuntu disco/main ppc64el fontconfig-config all 2.13.0-5ubuntu3 [28.4 kB] Get:83 http://ftpmaster.internal/ubuntu disco/main ppc64el libfontconfig1 ppc64el 2.13.0-5ubuntu3 [153 kB] Get:84 http://ftpmaster.internal/ubuntu disco/main ppc64el fontconfig ppc64el 2.13.0-5ubuntu3 [172 kB] Get:85 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el gir1.2-freedesktop ppc64el 1.58.2-2 [9088 B] Get:86 http://ftpmaster.internal/ubuntu disco/main ppc64el libjpeg-turbo8 ppc64el 2.0.0-0ubuntu2 [157 kB] Get:87 http://ftpmaster.internal/ubuntu disco/main ppc64el libjpeg8 ppc64el 8c-2ubuntu8 [2146 B] Get:88 http://ftpmaster.internal/ubuntu disco/main ppc64el libjbig0 ppc64el 2.1-3.1build1 [26.9 kB] Get:89 http://ftpmaster.internal/ubuntu disco/main ppc64el libwebp6 ppc64el 0.6.1-2 [225 kB] Get:90 http://ftpmaster.internal/ubuntu disco/main ppc64el libtiff5 ppc64el 4.0.10-3 [196 kB] Get:91 http://ftpmaster.internal/ubuntu disco/main ppc64el libgdk-pixbuf2.0-common all 2.38.0+dfsg-7 [6080 B] Get:92 http://ftpmaster.internal/ubuntu disco/main ppc64el libgdk-pixbuf2.0-0 ppc64el 2.38.0+dfsg-7 [215 kB] Get:93 http://ftpmaster.internal/ubuntu disco/main ppc64el gir1.2-gdkpixbuf-2.0 ppc64el 2.38.0+dfsg-7 [8236 B] Get:94 http://ftpmaster.internal/ubuntu disco/main ppc64el libpixman-1-0 ppc64el 0.36.0-1 [266 kB] Get:95 http://ftpmaster.internal/ubuntu disco/main ppc64el libxcb-render0 ppc64el 1.13.1-2 [15.6 kB] Get:96 http://ftpmaster.internal/ubuntu disco/main ppc64el libxcb-shm0 ppc64el 1.13.1-2 [5848 B] Get:97 http://ftpmaster.internal/ubuntu disco/main ppc64el libxrender1 ppc64el 1:0.9.10-1 [17.6 kB] Get:98 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el libcairo2 ppc64el 1.16.0-2 [696 kB] Get:99 http://ftpmaster.internal/ubuntu disco/main ppc64el libthai-data all 0.1.28-1 [134 kB] Get:100 http://ftpmaster.internal/ubuntu disco/main ppc64el libdatrie1 ppc64el 0.2.12-1 [18.3 kB] Get:101 http://ftpmaster.internal/ubuntu disco/main ppc64el libthai0 ppc64el 0.1.28-1 [19.9 kB] Get:102 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el libpango-1.0-0 ppc64el 1.42.4-6 [173 kB] Get:103 http://ftpmaster.internal/ubuntu disco/main ppc64el libgraphite2-3 ppc64el 1.3.12-1 [72.8 kB] Get:104 http://ftpmaster.internal/ubuntu disco/main ppc64el libharfbuzz0b ppc64el 2.3.0-1 [407 kB] Get:105 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el libpangoft2-1.0-0 ppc64el 1.42.4-6 [41.0 kB] Get:106 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el libpangocairo-1.0-0 ppc64el 1.42.4-6 [25.6 kB] Get:107 http://ftpmaster.internal/ubuntu disco/main ppc64el librsvg2-2 ppc64el 2.44.10-1 [1203 kB] Get:108 http://ftpmaster.internal/ubuntu disco/main ppc64el gir1.2-rsvg-2.0 ppc64el 2.44.10-1 [7640 B] Get:109 http://ftpmaster.internal/ubuntu disco/main ppc64el liburi-perl all 1.74-1 [77.1 kB] Get:110 http://ftpmaster.internal/ubuntu disco/main ppc64el libencode-locale-perl all 1.05-1 [12.3 kB] Get:111 http://ftpmaster.internal/ubuntu disco/main ppc64el libtimedate-perl all 2.3000-2 [37.5 kB] Get:112 http://ftpmaster.internal/ubuntu disco/main ppc64el libhttp-date-perl all 6.02-1 [10.4 kB] Get:113 http://ftpmaster.internal/ubuntu disco/main ppc64el libfile-listing-perl all 6.04-1 [9774 B] Get:114 http://ftpmaster.internal/ubuntu disco/main ppc64el libhtml-tagset-perl all 3.20-3 [12.1 kB] Get:115 http://ftpmaster.internal/ubuntu disco/main ppc64el libhtml-parser-perl ppc64el 3.72-3build2 [91.6 kB] Get:116 http://ftpmaster.internal/ubuntu disco/main ppc64el libhtml-tree-perl all 5.07-1 [200 kB] Get:117 http://ftpmaster.internal/ubuntu disco/main ppc64el libio-html-perl all 1.001-1 [14.9 kB] Get:118 http://ftpmaster.internal/ubuntu disco/main ppc64el liblwp-mediatypes-perl all 6.02-1 [21.7 kB] Get:119 http://ftpmaster.internal/ubuntu disco/main ppc64el libhttp-message-perl all 6.18-1 [75.3 kB] Get:120 http://ftpmaster.internal/ubuntu disco/main ppc64el libhttp-cookies-perl all 6.04-1 [17.2 kB] Get:121 http://ftpmaster.internal/ubuntu disco/main ppc64el libhttp-negotiate-perl all 6.01-1 [12.5 kB] Get:122 http://ftpmaster.internal/ubuntu disco/main ppc64el perl-openssl-defaults ppc64el 3build1 [7012 B] Get:123 http://ftpmaster.internal/ubuntu disco/main ppc64el libnet-ssleay-perl ppc64el 1.85-2ubuntu3 [282 kB] Get:124 http://ftpmaster.internal/ubuntu disco/main ppc64el libio-socket-ssl-perl all 2.060-3 [173 kB] Get:125 http://ftpmaster.internal/ubuntu disco/main ppc64el libnet-http-perl all 6.18-1 [22.8 kB] Get:126 http://ftpmaster.internal/ubuntu disco/main ppc64el liblwp-protocol-https-perl all 6.07-2 [8284 B] Get:127 http://ftpmaster.internal/ubuntu disco/main ppc64el libtry-tiny-perl all 0.30-1 [20.5 kB] Get:128 http://ftpmaster.internal/ubuntu disco/main ppc64el libwww-robotrules-perl all 6.02-1 [12.6 kB] Get:129 http://ftpmaster.internal/ubuntu disco/main ppc64el libwww-perl all 6.36-1 [138 kB] Get:130 http://ftpmaster.internal/ubuntu disco/main ppc64el libxml-parser-perl ppc64el 2.44-2build4 [200 kB] Get:131 http://ftpmaster.internal/ubuntu disco/universe ppc64el intltool all 0.51.0-5ubuntu1 [44.6 kB] Get:132 http://ftpmaster.internal/ubuntu disco/universe ppc64el libonig5 ppc64el 6.9.1-1 [153 kB] Get:133 http://ftpmaster.internal/ubuntu disco/universe ppc64el libjq1 ppc64el 1.5+dfsg-2build1 [119 kB] Get:134 http://ftpmaster.internal/ubuntu disco/universe ppc64el jq ppc64el 1.5+dfsg-2build1 [46.2 kB] Get:135 http://ftpmaster.internal/ubuntu disco/main ppc64el libfile-which-perl all 1.22-1 [12.0 kB] Get:136 http://ftpmaster.internal/ubuntu disco/universe ppc64el dh-translations all 143 [24.7 kB] Get:137 http://ftpmaster.internal/ubuntu disco/main ppc64el python3-cairo ppc64el 1.16.2-1build2 [60.8 kB] Get:138 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el libcairo-gobject2 ppc64el 1.16.0-2 [17.5 kB] Get:139 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el python3-gi-cairo ppc64el 3.30.4-1 [7508 B] Get:140 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el python3-six all 1.12.0-1 [11.7 kB] Get:141 http://ftpmaster.internal/ubuntu disco/main ppc64el python3-pkg-resources all 40.6.2-1 [99.6 kB] Get:142 http://ftpmaster.internal/ubuntu disco/universe ppc64el python3-scour all 0.37-1 [45.7 kB] Get:143 http://ftpmaster.internal/ubuntu disco/universe ppc64el scour all 0.37-1 [7372 B] Get:144 http://ftpmaster.internal/ubuntu disco/universe ppc64el gnome-pkg-tools all 0.21.0ubuntu1 [15.8 kB] Get:145 http://ftpmaster.internal/ubuntu disco/main ppc64el python3-lib2to3 all 3.7.1-1ubuntu4 [74.2 kB] Get:146 http://ftpmaster.internal/ubuntu disco/main ppc64el python3-distutils all 3.7.1-1ubuntu4 [139 kB] Get:147 http://ftpmaster.internal/ubuntu disco/main ppc64el python3-markupsafe ppc64el 1.0-1build3 [14.0 kB] Get:148 http://ftpmaster.internal/ubuntu disco/main ppc64el python3-mako all 1.0.7+ds1-1 [59.3 kB] Get:149 http://ftpmaster.internal/ubuntu disco/main ppc64el python3-markdown all 3.0.1-2 [56.2 kB] Get:150 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el gobject-introspection ppc64el 1.58.2-2 [296 kB] Get:151 http://ftpmaster.internal/ubuntu disco/main ppc64el pkg-config ppc64el 0.29.1-0ubuntu2 [44.1 kB] Get:152 http://ftpmaster.internal/ubuntu disco/main ppc64el python-funcsigs all 1.0.2-4 [13.5 kB] Get:153 http://ftpmaster.internal/ubuntu disco/main ppc64el python-pkg-resources all 40.6.2-1 [129 kB] Get:154 http://ftpmaster.internal/ubuntu disco/main ppc64el python-setuptools all 40.6.2-1 [327 kB] Get:155 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el python-six all 1.12.0-1 [11.6 kB] Get:156 http://ftpmaster.internal/ubuntu disco/main ppc64el python-pbr all 5.1.1-0ubuntu2 [61.0 kB] Get:157 http://ftpmaster.internal/ubuntu disco/universe ppc64el python-mock all 2.0.0-4 [47.6 kB] Get:158 http://ftpmaster.internal/ubuntu disco/main ppc64el libxslt1.1 ppc64el 1.1.32-2 [155 kB] Get:159 http://ftpmaster.internal/ubuntu disco/main ppc64el xsltproc ppc64el 1.1.32-2 [15.0 kB] Get:160 http://ftpmaster.internal/ubuntu disco/main ppc64el liblua5.2-0 ppc64el 5.2.4-1.1build1 [126 kB] Get:161 http://ftpmaster.internal/ubuntu disco/universe ppc64el highlight-common all 3.41-2build1 [188 kB] Get:162 http://ftpmaster.internal/ubuntu disco/universe ppc64el highlight ppc64el 3.41-2build1 [390 kB] Get:163 http://ftpmaster.internal/ubuntu disco/universe ppc64el gtk-doc-tools all 1.28-1 [311 kB] Get:164 http://ftpmaster.internal/ubuntu disco/main ppc64el libglib2.0-bin ppc64el 2.58.1-2 [79.8 kB] Get:165 http://ftpmaster.internal/ubuntu disco/main ppc64el libglib2.0-dev-bin ppc64el 2.58.1-2 [108 kB] Get:166 http://ftpmaster.internal/ubuntu disco/main ppc64el libpcre16-3 ppc64el 2:8.39-11 [158 kB] Get:167 http://ftpmaster.internal/ubuntu disco/main ppc64el libpcre32-3 ppc64el 2:8.39-11 [146 kB] Get:168 http://ftpmaster.internal/ubuntu disco/main ppc64el libpcrecpp0v5 ppc64el 2:8.39-11 [17.0 kB] Get:169 http://ftpmaster.internal/ubuntu disco/main ppc64el libpcre3-dev ppc64el 2:8.39-11 [550 kB] Get:170 http://ftpmaster.internal/ubuntu disco/main ppc64el zlib1g-dev ppc64el 1:1.2.11.dfsg-0ubuntu2 [178 kB] Get:171 http://ftpmaster.internal/ubuntu disco/main ppc64el libglib2.0-dev ppc64el 2.58.1-2 [1720 kB] Get:172 http://ftpmaster.internal/ubuntu disco/main ppc64el libffi-dev ppc64el 3.2.1-9 [162 kB] Get:173 http://ftpmaster.internal/ubuntu disco-proposed/main ppc64el libgirepository1.0-dev ppc64el 1.58.2-2 [706 kB] Get:174 http://ftpmaster.internal/ubuntu disco/main ppc64el xorg-sgml-doctools all 1:1.11-1 [12.9 kB] Get:175 http://ftpmaster.internal/ubuntu disco/main ppc64el x11proto-dev all 2018.4-4 [251 kB] Get:176 http://ftpmaster.internal/ubuntu disco/main ppc64el x11proto-core-dev all 2018.4-4 [2620 B] Get:177 http://ftpmaster.internal/ubuntu disco/main ppc64el libice-dev ppc64el 2:1.0.9-2 [48.6 kB] Get:178 http://ftpmaster.internal/ubuntu disco/main ppc64el libpthread-stubs0-dev ppc64el 0.3-4 [3894 B] Get:179 http://ftpmaster.internal/ubuntu disco/main ppc64el libsm-dev ppc64el 2:1.2.2-1 [16.6 kB] Get:180 http://ftpmaster.internal/ubuntu disco/universe ppc64el libtext-unidecode-perl all 1.30-1 [99.0 kB] Get:181 http://ftpmaster.internal/ubuntu disco/main ppc64el libxau-dev ppc64el 1:1.0.8-1 [9358 B] Get:182 http://ftpmaster.internal/ubuntu disco/main ppc64el libxdmcp-dev ppc64el 1:1.1.2-3 [26.1 kB] Get:183 http://ftpmaster.internal/ubuntu disco/main ppc64el xtrans-dev all 1.3.5-1 [70.5 kB] Get:184 http://ftpmaster.internal/ubuntu disco/main ppc64el libxcb1-dev ppc64el 1.13.1-2 [88.5 kB] Get:185 http://ftpmaster.internal/ubuntu disco/main ppc64el libx11-dev ppc64el 2:1.6.7-1 [733 kB] Get:186 http://ftpmaster.internal/ubuntu disco/main ppc64el libxml-namespacesupport-perl all 1.12-1 [13.2 kB] Get:187 http://ftpmaster.internal/ubuntu disco/main ppc64el libxml-sax-base-perl all 1.09-1 [18.8 kB] Get:188 http://ftpmaster.internal/ubuntu disco/main ppc64el libxml-sax-perl all 1.00+dfsg-1.1~build1 [56.1 kB] Get:189 http://ftpmaster.internal/ubuntu disco/main ppc64el libxml-libxml-perl ppc64el 2.0132+dfsg-2build1 [319 kB] Get:190 http://ftpmaster.internal/ubuntu disco/main ppc64el libxt6 ppc64el 1:1.1.5-1 [152 kB] Get:191 http://ftpmaster.internal/ubuntu disco/main ppc64el libxt-dev ppc64el 1:1.1.5-1 [406 kB] Get:192 http://ftpmaster.internal/ubuntu disco/universe ppc64el texinfo ppc64el 6.5.0.dfsg.1-4build1 [856 kB] debconf: delaying package configuration, since apt-utils is not installed Fetched 47.8 MB in 1s (59.4 MB/s) Selecting previously unselected package libpython3.7-minimal:ppc64el. (Reading database ... 12597 files and directories currently installed.) Preparing to unpack .../libpython3.7-minimal_3.7.2~rc1-1_ppc64el.deb ... Unpacking libpython3.7-minimal:ppc64el (3.7.2~rc1-1) ... Selecting previously unselected package libexpat1:ppc64el. Preparing to unpack .../libexpat1_2.2.6-1_ppc64el.deb ... Unpacking libexpat1:ppc64el (2.2.6-1) ... Selecting previously unselected package python3.7-minimal. Preparing to unpack .../python3.7-minimal_3.7.2~rc1-1_ppc64el.deb ... Unpacking python3.7-minimal (3.7.2~rc1-1) ... Setting up libpython3.7-minimal:ppc64el (3.7.2~rc1-1) ... Setting up libexpat1:ppc64el (2.2.6-1) ... Setting up python3.7-minimal (3.7.2~rc1-1) ... Selecting previously unselected package python3-minimal. (Reading database ... 12846 files and directories currently installed.) Preparing to unpack .../0-python3-minimal_3.7.1-1ubuntu1_ppc64el.deb ... Unpacking python3-minimal (3.7.1-1ubuntu1) ... Selecting previously unselected package mime-support. Preparing to unpack .../1-mime-support_3.60ubuntu1_all.deb ... Unpacking mime-support (3.60ubuntu1) ... Selecting previously unselected package libmpdec2:ppc64el. Preparing to unpack .../2-libmpdec2_2.4.2-2_ppc64el.deb ... Unpacking libmpdec2:ppc64el (2.4.2-2) ... Selecting previously unselected package libpython3.7-stdlib:ppc64el. Preparing to unpack .../3-libpython3.7-stdlib_3.7.2~rc1-1_ppc64el.deb ... Unpacking libpython3.7-stdlib:ppc64el (3.7.2~rc1-1) ... Selecting previously unselected package python3.7. Preparing to unpack .../4-python3.7_3.7.2~rc1-1_ppc64el.deb ... Unpacking python3.7 (3.7.2~rc1-1) ... Selecting previously unselected package libpython3-stdlib:ppc64el. Preparing to unpack .../5-libpython3-stdlib_3.7.1-1ubuntu1_ppc64el.deb ... Unpacking libpython3-stdlib:ppc64el (3.7.1-1ubuntu1) ... Setting up python3-minimal (3.7.1-1ubuntu1) ... Selecting previously unselected package python3. (Reading database ... 13280 files and directories currently installed.) Preparing to unpack .../00-python3_3.7.1-1ubuntu1_ppc64el.deb ... Unpacking python3 (3.7.1-1ubuntu1) ... Selecting previously unselected package libxau6:ppc64el. Preparing to unpack .../01-libxau6_1%3a1.0.8-1_ppc64el.deb ... Unpacking libxau6:ppc64el (1:1.0.8-1) ... Selecting previously unselected package libbsd0:ppc64el. Preparing to unpack .../02-libbsd0_0.9.1-1_ppc64el.deb ... Unpacking libbsd0:ppc64el (0.9.1-1) ... Selecting previously unselected package libxdmcp6:ppc64el. Preparing to unpack .../03-libxdmcp6_1%3a1.1.2-3_ppc64el.deb ... Unpacking libxdmcp6:ppc64el (1:1.1.2-3) ... Selecting previously unselected package libxcb1:ppc64el. Preparing to unpack .../04-libxcb1_1.13.1-2_ppc64el.deb ... Unpacking libxcb1:ppc64el (1.13.1-2) ... Selecting previously unselected package libx11-data. Preparing to unpack .../05-libx11-data_2%3a1.6.7-1_all.deb ... Unpacking libx11-data (2:1.6.7-1) ... Selecting previously unselected package libx11-6:ppc64el. Preparing to unpack .../06-libx11-6_2%3a1.6.7-1_ppc64el.deb ... Unpacking libx11-6:ppc64el (2:1.6.7-1) ... Selecting previously unselected package libxext6:ppc64el. Preparing to unpack .../07-libxext6_2%3a1.3.3-1_ppc64el.deb ... Unpacking libxext6:ppc64el (2:1.3.3-1) ... Selecting previously unselected package bsdmainutils. Preparing to unpack .../08-bsdmainutils_11.1.2ubuntu2_ppc64el.deb ... Unpacking bsdmainutils (11.1.2ubuntu2) ... Selecting previously unselected package libuchardet0:ppc64el. Preparing to unpack .../09-libuchardet0_0.0.6-3_ppc64el.deb ... Unpacking libuchardet0:ppc64el (0.0.6-3) ... Selecting previously unselected package groff-base. Preparing to unpack .../10-groff-base_1.22.4-1_ppc64el.deb ... Unpacking groff-base (1.22.4-1) ... Selecting previously unselected package libpipeline1:ppc64el. Preparing to unpack .../11-libpipeline1_1.5.0-2_ppc64el.deb ... Unpacking libpipeline1:ppc64el (1.5.0-2) ... Selecting previously unselected package man-db. Preparing to unpack .../12-man-db_2.8.4-3_ppc64el.deb ... Unpacking man-db (2.8.4-3) ... Selecting previously unselected package x11-common. Preparing to unpack .../13-x11-common_1%3a7.7+19ubuntu8_all.deb ... dpkg-query: no packages found matching nux-tools Unpacking x11-common (1:7.7+19ubuntu8) ... Selecting previously unselected package libice6:ppc64el. Preparing to unpack .../14-libice6_2%3a1.0.9-2_ppc64el.deb ... Unpacking libice6:ppc64el (2:1.0.9-2) ... Selecting previously unselected package libsm6:ppc64el. Preparing to unpack .../15-libsm6_2%3a1.2.2-1_ppc64el.deb ... Unpacking libsm6:ppc64el (2:1.2.2-1) ... Selecting previously unselected package libpython2.7-minimal:ppc64el. Preparing to unpack .../16-libpython2.7-minimal_2.7.15-5_ppc64el.deb ... Unpacking libpython2.7-minimal:ppc64el (2.7.15-5) ... Selecting previously unselected package python2.7-minimal. Preparing to unpack .../17-python2.7-minimal_2.7.15-5_ppc64el.deb ... Unpacking python2.7-minimal (2.7.15-5) ... Selecting previously unselected package python2-minimal. Preparing to unpack .../18-python2-minimal_2.7.15-3_ppc64el.deb ... Unpacking python2-minimal (2.7.15-3) ... Selecting previously unselected package python-minimal. Preparing to unpack .../19-python-minimal_2.7.15-3_ppc64el.deb ... Unpacking python-minimal (2.7.15-3) ... Selecting previously unselected package libpython2.7-stdlib:ppc64el. Preparing to unpack .../20-libpython2.7-stdlib_2.7.15-5_ppc64el.deb ... Unpacking libpython2.7-stdlib:ppc64el (2.7.15-5) ... Selecting previously unselected package python2.7. Preparing to unpack .../21-python2.7_2.7.15-5_ppc64el.deb ... Unpacking python2.7 (2.7.15-5) ... Selecting previously unselected package libpython2-stdlib:ppc64el. Preparing to unpack .../22-libpython2-stdlib_2.7.15-3_ppc64el.deb ... Unpacking libpython2-stdlib:ppc64el (2.7.15-3) ... Selecting previously unselected package libpython-stdlib:ppc64el. Preparing to unpack .../23-libpython-stdlib_2.7.15-3_ppc64el.deb ... Unpacking libpython-stdlib:ppc64el (2.7.15-3) ... Setting up libpython2.7-minimal:ppc64el (2.7.15-5) ... Setting up python2.7-minimal (2.7.15-5) ... Setting up python2-minimal (2.7.15-3) ... Selecting previously unselected package python2. (Reading database ... 14953 files and directories currently installed.) Preparing to unpack .../python2_2.7.15-3_ppc64el.deb ... Unpacking python2 (2.7.15-3) ... Setting up python-minimal (2.7.15-3) ... Selecting previously unselected package python. (Reading database ... 14985 files and directories currently installed.) Preparing to unpack .../000-python_2.7.15-3_ppc64el.deb ... Unpacking python (2.7.15-3) ... 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 ucf. Preparing to unpack .../002-ucf_3.0038+nmu1_all.deb ... Moving old data out of the way Unpacking ucf (3.0038+nmu1) ... Selecting previously unselected package tex-common. Preparing to unpack .../003-tex-common_6.10_all.deb ... Unpacking tex-common (6.10) ... Selecting previously unselected package libmagic-mgc. Preparing to unpack .../004-libmagic-mgc_1%3a5.34-2_ppc64el.deb ... Unpacking libmagic-mgc (1:5.34-2) ... Selecting previously unselected package libmagic1:ppc64el. Preparing to unpack .../005-libmagic1_1%3a5.34-2_ppc64el.deb ... Unpacking libmagic1:ppc64el (1:5.34-2) ... Selecting previously unselected package file. Preparing to unpack .../006-file_1%3a5.34-2_ppc64el.deb ... Unpacking file (1:5.34-2) ... Selecting previously unselected package libglib2.0-0:ppc64el. Preparing to unpack .../007-libglib2.0-0_2.58.1-2_ppc64el.deb ... Unpacking libglib2.0-0:ppc64el (2.58.1-2) ... Selecting previously unselected package libgirepository-1.0-1:ppc64el. Preparing to unpack .../008-libgirepository-1.0-1_1.58.2-2_ppc64el.deb ... Unpacking libgirepository-1.0-1:ppc64el (1.58.2-2) ... Selecting previously unselected package gir1.2-glib-2.0:ppc64el. Preparing to unpack .../009-gir1.2-glib-2.0_1.58.2-2_ppc64el.deb ... Unpacking gir1.2-glib-2.0:ppc64el (1.58.2-2) ... Selecting previously unselected package libelf1:ppc64el. Preparing to unpack .../010-libelf1_0.175-1_ppc64el.deb ... Unpacking libelf1:ppc64el (0.175-1) ... Selecting previously unselected package libfribidi0:ppc64el. Preparing to unpack .../011-libfribidi0_1.0.5-3_ppc64el.deb ... Unpacking libfribidi0:ppc64el (1.0.5-3) ... Selecting previously unselected package libglib2.0-data. Preparing to unpack .../012-libglib2.0-data_2.58.1-2_all.deb ... Unpacking libglib2.0-data (2.58.1-2) ... Selecting previously unselected package libicu63:ppc64el. Preparing to unpack .../013-libicu63_63.1-5_ppc64el.deb ... Unpacking libicu63:ppc64el (63.1-5) ... Selecting previously unselected package libxml2:ppc64el. Preparing to unpack .../014-libxml2_2.9.4+dfsg1-7ubuntu3_ppc64el.deb ... Unpacking libxml2:ppc64el (2.9.4+dfsg1-7ubuntu3) ... Selecting previously unselected package netbase. Preparing to unpack .../015-netbase_5.5_all.deb ... Unpacking netbase (5.5) ... Selecting previously unselected package python3-gi. Preparing to unpack .../016-python3-gi_3.30.4-1_ppc64el.deb ... Unpacking python3-gi (3.30.4-1) ... Selecting previously unselected package shared-mime-info. Preparing to unpack .../017-shared-mime-info_1.10-1_ppc64el.deb ... Unpacking shared-mime-info (1.10-1) ... Selecting previously unselected package gettext-base. Preparing to unpack .../018-gettext-base_0.19.8.1-9_ppc64el.deb ... Unpacking gettext-base (0.19.8.1-9) ... Selecting previously unselected package libsigsegv2:ppc64el. Preparing to unpack .../019-libsigsegv2_2.12-2_ppc64el.deb ... Unpacking libsigsegv2:ppc64el (2.12-2) ... Selecting previously unselected package m4. Preparing to unpack .../020-m4_1.4.18-2_ppc64el.deb ... Unpacking m4 (1.4.18-2) ... Selecting previously unselected package autoconf. Preparing to unpack .../021-autoconf_2.69-11_all.deb ... Unpacking autoconf (2.69-11) ... Selecting previously unselected package autotools-dev. Preparing to unpack .../022-autotools-dev_20180224.1_all.deb ... Unpacking autotools-dev (20180224.1) ... Selecting previously unselected package automake. Preparing to unpack .../023-automake_1%3a1.16.1-4_all.deb ... Unpacking automake (1:1.16.1-4) ... Selecting previously unselected package autopoint. Preparing to unpack .../024-autopoint_0.19.8.1-9_all.deb ... Unpacking autopoint (0.19.8.1-9) ... Selecting previously unselected package libtool. Preparing to unpack .../025-libtool_2.4.6-6_all.deb ... Unpacking libtool (2.4.6-6) ... Selecting previously unselected package dh-autoreconf. Preparing to unpack .../026-dh-autoreconf_19_all.deb ... Unpacking dh-autoreconf (19) ... Selecting previously unselected package libarchive-zip-perl. Preparing to unpack .../027-libarchive-zip-perl_1.64-1_all.deb ... Unpacking libarchive-zip-perl (1.64-1) ... Selecting previously unselected package libfile-stripnondeterminism-perl. Preparing to unpack .../028-libfile-stripnondeterminism-perl_1.0.0-1_all.deb ... Unpacking libfile-stripnondeterminism-perl (1.0.0-1) ... Selecting previously unselected package dh-strip-nondeterminism. Preparing to unpack .../029-dh-strip-nondeterminism_1.0.0-1_all.deb ... Unpacking dh-strip-nondeterminism (1.0.0-1) ... Selecting previously unselected package dwz. Preparing to unpack .../030-dwz_0.12-3_ppc64el.deb ... Unpacking dwz (0.12-3) ... Selecting previously unselected package libcroco3:ppc64el. Preparing to unpack .../031-libcroco3_0.6.12-3_ppc64el.deb ... Unpacking libcroco3:ppc64el (0.6.12-3) ... Selecting previously unselected package gettext. Preparing to unpack .../032-gettext_0.19.8.1-9_ppc64el.deb ... Unpacking gettext (0.19.8.1-9) ... Selecting previously unselected package intltool-debian. Preparing to unpack .../033-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 .../034-po-debconf_1.0.21_all.deb ... Unpacking po-debconf (1.0.21) ... Selecting previously unselected package debhelper. Preparing to unpack .../035-debhelper_12ubuntu1_all.deb ... Unpacking debhelper (12ubuntu1) ... Selecting previously unselected package xml-core. Preparing to unpack .../036-xml-core_0.18_all.deb ... Unpacking xml-core (0.18) ... Selecting previously unselected package sgml-data. Preparing to unpack .../037-sgml-data_2.0.11_all.deb ... Unpacking sgml-data (2.0.11) ... Selecting previously unselected package docbook. Preparing to unpack .../038-docbook_4.5-6_all.deb ... Unpacking docbook (4.5-6) ... Selecting previously unselected package libosp5. Preparing to unpack .../039-libosp5_1.5.2-13ubuntu2_ppc64el.deb ... Unpacking libosp5 (1.5.2-13ubuntu2) ... Selecting previously unselected package opensp. Preparing to unpack .../040-opensp_1.5.2-13ubuntu2_ppc64el.deb ... Unpacking opensp (1.5.2-13ubuntu2) ... Selecting previously unselected package docbook-to-man. Preparing to unpack .../041-docbook-to-man_1%3a2.0.0-42_ppc64el.deb ... Unpacking docbook-to-man (1:2.0.0-42) ... Selecting previously unselected package docbook-xml. Preparing to unpack .../042-docbook-xml_4.5-8_all.deb ... Unpacking docbook-xml (4.5-8) ... Selecting previously unselected package docbook-xsl. Preparing to unpack .../043-docbook-xsl_1.79.1+dfsg-2_all.deb ... Unpacking docbook-xsl (1.79.1+dfsg-2) ... Selecting previously unselected package libfreetype6:ppc64el. Preparing to unpack .../044-libfreetype6_2.8.1-2ubuntu2_ppc64el.deb ... Unpacking libfreetype6:ppc64el (2.8.1-2ubuntu2) ... Selecting previously unselected package fonts-dejavu-core. Preparing to unpack .../045-fonts-dejavu-core_2.37-1_all.deb ... Unpacking fonts-dejavu-core (2.37-1) ... Selecting previously unselected package fontconfig-config. Preparing to unpack .../046-fontconfig-config_2.13.0-5ubuntu3_all.deb ... Unpacking fontconfig-config (2.13.0-5ubuntu3) ... Selecting previously unselected package libfontconfig1:ppc64el. Preparing to unpack .../047-libfontconfig1_2.13.0-5ubuntu3_ppc64el.deb ... Unpacking libfontconfig1:ppc64el (2.13.0-5ubuntu3) ... Selecting previously unselected package fontconfig. Preparing to unpack .../048-fontconfig_2.13.0-5ubuntu3_ppc64el.deb ... Unpacking fontconfig (2.13.0-5ubuntu3) ... Selecting previously unselected package gir1.2-freedesktop:ppc64el. Preparing to unpack .../049-gir1.2-freedesktop_1.58.2-2_ppc64el.deb ... Unpacking gir1.2-freedesktop:ppc64el (1.58.2-2) ... Selecting previously unselected package libjpeg-turbo8:ppc64el. Preparing to unpack .../050-libjpeg-turbo8_2.0.0-0ubuntu2_ppc64el.deb ... Unpacking libjpeg-turbo8:ppc64el (2.0.0-0ubuntu2) ... Selecting previously unselected package libjpeg8:ppc64el. Preparing to unpack .../051-libjpeg8_8c-2ubuntu8_ppc64el.deb ... Unpacking libjpeg8:ppc64el (8c-2ubuntu8) ... Selecting previously unselected package libjbig0:ppc64el. Preparing to unpack .../052-libjbig0_2.1-3.1build1_ppc64el.deb ... Unpacking libjbig0:ppc64el (2.1-3.1build1) ... Selecting previously unselected package libwebp6:ppc64el. Preparing to unpack .../053-libwebp6_0.6.1-2_ppc64el.deb ... Unpacking libwebp6:ppc64el (0.6.1-2) ... Selecting previously unselected package libtiff5:ppc64el. Preparing to unpack .../054-libtiff5_4.0.10-3_ppc64el.deb ... Unpacking libtiff5:ppc64el (4.0.10-3) ... Selecting previously unselected package libgdk-pixbuf2.0-common. Preparing to unpack .../055-libgdk-pixbuf2.0-common_2.38.0+dfsg-7_all.deb ... Unpacking libgdk-pixbuf2.0-common (2.38.0+dfsg-7) ... Selecting previously unselected package libgdk-pixbuf2.0-0:ppc64el. Preparing to unpack .../056-libgdk-pixbuf2.0-0_2.38.0+dfsg-7_ppc64el.deb ... Unpacking libgdk-pixbuf2.0-0:ppc64el (2.38.0+dfsg-7) ... Selecting previously unselected package gir1.2-gdkpixbuf-2.0:ppc64el. Preparing to unpack .../057-gir1.2-gdkpixbuf-2.0_2.38.0+dfsg-7_ppc64el.deb ... Unpacking gir1.2-gdkpixbuf-2.0:ppc64el (2.38.0+dfsg-7) ... Selecting previously unselected package libpixman-1-0:ppc64el. Preparing to unpack .../058-libpixman-1-0_0.36.0-1_ppc64el.deb ... Unpacking libpixman-1-0:ppc64el (0.36.0-1) ... Selecting previously unselected package libxcb-render0:ppc64el. Preparing to unpack .../059-libxcb-render0_1.13.1-2_ppc64el.deb ... Unpacking libxcb-render0:ppc64el (1.13.1-2) ... Selecting previously unselected package libxcb-shm0:ppc64el. Preparing to unpack .../060-libxcb-shm0_1.13.1-2_ppc64el.deb ... Unpacking libxcb-shm0:ppc64el (1.13.1-2) ... Selecting previously unselected package libxrender1:ppc64el. Preparing to unpack .../061-libxrender1_1%3a0.9.10-1_ppc64el.deb ... Unpacking libxrender1:ppc64el (1:0.9.10-1) ... Selecting previously unselected package libcairo2:ppc64el. Preparing to unpack .../062-libcairo2_1.16.0-2_ppc64el.deb ... Unpacking libcairo2:ppc64el (1.16.0-2) ... Selecting previously unselected package libthai-data. Preparing to unpack .../063-libthai-data_0.1.28-1_all.deb ... Unpacking libthai-data (0.1.28-1) ... Selecting previously unselected package libdatrie1:ppc64el. Preparing to unpack .../064-libdatrie1_0.2.12-1_ppc64el.deb ... Unpacking libdatrie1:ppc64el (0.2.12-1) ... Selecting previously unselected package libthai0:ppc64el. Preparing to unpack .../065-libthai0_0.1.28-1_ppc64el.deb ... Unpacking libthai0:ppc64el (0.1.28-1) ... Selecting previously unselected package libpango-1.0-0:ppc64el. Preparing to unpack .../066-libpango-1.0-0_1.42.4-6_ppc64el.deb ... Unpacking libpango-1.0-0:ppc64el (1.42.4-6) ... Selecting previously unselected package libgraphite2-3:ppc64el. Preparing to unpack .../067-libgraphite2-3_1.3.12-1_ppc64el.deb ... Unpacking libgraphite2-3:ppc64el (1.3.12-1) ... Selecting previously unselected package libharfbuzz0b:ppc64el. Preparing to unpack .../068-libharfbuzz0b_2.3.0-1_ppc64el.deb ... Unpacking libharfbuzz0b:ppc64el (2.3.0-1) ... Selecting previously unselected package libpangoft2-1.0-0:ppc64el. Preparing to unpack .../069-libpangoft2-1.0-0_1.42.4-6_ppc64el.deb ... Unpacking libpangoft2-1.0-0:ppc64el (1.42.4-6) ... Selecting previously unselected package libpangocairo-1.0-0:ppc64el. Preparing to unpack .../070-libpangocairo-1.0-0_1.42.4-6_ppc64el.deb ... Unpacking libpangocairo-1.0-0:ppc64el (1.42.4-6) ... Selecting previously unselected package librsvg2-2:ppc64el. Preparing to unpack .../071-librsvg2-2_2.44.10-1_ppc64el.deb ... Unpacking librsvg2-2:ppc64el (2.44.10-1) ... Selecting previously unselected package gir1.2-rsvg-2.0:ppc64el. Preparing to unpack .../072-gir1.2-rsvg-2.0_2.44.10-1_ppc64el.deb ... Unpacking gir1.2-rsvg-2.0:ppc64el (2.44.10-1) ... Selecting previously unselected package liburi-perl. Preparing to unpack .../073-liburi-perl_1.74-1_all.deb ... Unpacking liburi-perl (1.74-1) ... Selecting previously unselected package libencode-locale-perl. Preparing to unpack .../074-libencode-locale-perl_1.05-1_all.deb ... Unpacking libencode-locale-perl (1.05-1) ... Selecting previously unselected package libtimedate-perl. Preparing to unpack .../075-libtimedate-perl_2.3000-2_all.deb ... Unpacking libtimedate-perl (2.3000-2) ... Selecting previously unselected package libhttp-date-perl. Preparing to unpack .../076-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 .../077-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 .../078-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 .../079-libhtml-parser-perl_3.72-3build2_ppc64el.deb ... Unpacking libhtml-parser-perl (3.72-3build2) ... Selecting previously unselected package libhtml-tree-perl. Preparing to unpack .../080-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 .../081-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 .../082-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 .../083-libhttp-message-perl_6.18-1_all.deb ... Unpacking libhttp-message-perl (6.18-1) ... Selecting previously unselected package libhttp-cookies-perl. Preparing to unpack .../084-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 .../085-libhttp-negotiate-perl_6.01-1_all.deb ... Unpacking libhttp-negotiate-perl (6.01-1) ... Selecting previously unselected package perl-openssl-defaults:ppc64el. Preparing to unpack .../086-perl-openssl-defaults_3build1_ppc64el.deb ... Unpacking perl-openssl-defaults:ppc64el (3build1) ... Selecting previously unselected package libnet-ssleay-perl. Preparing to unpack .../087-libnet-ssleay-perl_1.85-2ubuntu3_ppc64el.deb ... Unpacking libnet-ssleay-perl (1.85-2ubuntu3) ... Selecting previously unselected package libio-socket-ssl-perl. Preparing to unpack .../088-libio-socket-ssl-perl_2.060-3_all.deb ... Unpacking libio-socket-ssl-perl (2.060-3) ... Selecting previously unselected package libnet-http-perl. Preparing to unpack .../089-libnet-http-perl_6.18-1_all.deb ... Unpacking libnet-http-perl (6.18-1) ... Selecting previously unselected package liblwp-protocol-https-perl. Preparing to unpack .../090-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 .../091-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 .../092-libwww-robotrules-perl_6.02-1_all.deb ... Unpacking libwww-robotrules-perl (6.02-1) ... Selecting previously unselected package libwww-perl. Preparing to unpack .../093-libwww-perl_6.36-1_all.deb ... Unpacking libwww-perl (6.36-1) ... Selecting previously unselected package libxml-parser-perl. Preparing to unpack .../094-libxml-parser-perl_2.44-2build4_ppc64el.deb ... Unpacking libxml-parser-perl (2.44-2build4) ... Selecting previously unselected package intltool. Preparing to unpack .../095-intltool_0.51.0-5ubuntu1_all.deb ... Unpacking intltool (0.51.0-5ubuntu1) ... Selecting previously unselected package libonig5:ppc64el. Preparing to unpack .../096-libonig5_6.9.1-1_ppc64el.deb ... Unpacking libonig5:ppc64el (6.9.1-1) ... Selecting previously unselected package libjq1:ppc64el. Preparing to unpack .../097-libjq1_1.5+dfsg-2build1_ppc64el.deb ... Unpacking libjq1:ppc64el (1.5+dfsg-2build1) ... Selecting previously unselected package jq. Preparing to unpack .../098-jq_1.5+dfsg-2build1_ppc64el.deb ... Unpacking jq (1.5+dfsg-2build1) ... Selecting previously unselected package libfile-which-perl. Preparing to unpack .../099-libfile-which-perl_1.22-1_all.deb ... Unpacking libfile-which-perl (1.22-1) ... Selecting previously unselected package dh-translations. Preparing to unpack .../100-dh-translations_143_all.deb ... Unpacking dh-translations (143) ... Selecting previously unselected package python3-cairo:ppc64el. Preparing to unpack .../101-python3-cairo_1.16.2-1build2_ppc64el.deb ... Unpacking python3-cairo:ppc64el (1.16.2-1build2) ... Selecting previously unselected package libcairo-gobject2:ppc64el. Preparing to unpack .../102-libcairo-gobject2_1.16.0-2_ppc64el.deb ... Unpacking libcairo-gobject2:ppc64el (1.16.0-2) ... Selecting previously unselected package python3-gi-cairo. Preparing to unpack .../103-python3-gi-cairo_3.30.4-1_ppc64el.deb ... Unpacking python3-gi-cairo (3.30.4-1) ... Selecting previously unselected package python3-six. Preparing to unpack .../104-python3-six_1.12.0-1_all.deb ... Unpacking python3-six (1.12.0-1) ... Selecting previously unselected package python3-pkg-resources. Preparing to unpack .../105-python3-pkg-resources_40.6.2-1_all.deb ... Unpacking python3-pkg-resources (40.6.2-1) ... Selecting previously unselected package python3-scour. Preparing to unpack .../106-python3-scour_0.37-1_all.deb ... Unpacking python3-scour (0.37-1) ... Selecting previously unselected package scour. Preparing to unpack .../107-scour_0.37-1_all.deb ... Unpacking scour (0.37-1) ... Selecting previously unselected package gnome-pkg-tools. Preparing to unpack .../108-gnome-pkg-tools_0.21.0ubuntu1_all.deb ... Unpacking gnome-pkg-tools (0.21.0ubuntu1) ... Selecting previously unselected package python3-lib2to3. Preparing to unpack .../109-python3-lib2to3_3.7.1-1ubuntu4_all.deb ... Unpacking python3-lib2to3 (3.7.1-1ubuntu4) ... Selecting previously unselected package python3-distutils. Preparing to unpack .../110-python3-distutils_3.7.1-1ubuntu4_all.deb ... Unpacking python3-distutils (3.7.1-1ubuntu4) ... Selecting previously unselected package python3-markupsafe. Preparing to unpack .../111-python3-markupsafe_1.0-1build3_ppc64el.deb ... Unpacking python3-markupsafe (1.0-1build3) ... Selecting previously unselected package python3-mako. Preparing to unpack .../112-python3-mako_1.0.7+ds1-1_all.deb ... Unpacking python3-mako (1.0.7+ds1-1) ... Selecting previously unselected package python3-markdown. Preparing to unpack .../113-python3-markdown_3.0.1-2_all.deb ... Unpacking python3-markdown (3.0.1-2) ... Selecting previously unselected package gobject-introspection. Preparing to unpack .../114-gobject-introspection_1.58.2-2_ppc64el.deb ... Unpacking gobject-introspection (1.58.2-2) ... Selecting previously unselected package pkg-config. Preparing to unpack .../115-pkg-config_0.29.1-0ubuntu2_ppc64el.deb ... Unpacking pkg-config (0.29.1-0ubuntu2) ... Selecting previously unselected package python-funcsigs. Preparing to unpack .../116-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 .../117-python-pkg-resources_40.6.2-1_all.deb ... Unpacking python-pkg-resources (40.6.2-1) ... Selecting previously unselected package python-setuptools. Preparing to unpack .../118-python-setuptools_40.6.2-1_all.deb ... Unpacking python-setuptools (40.6.2-1) ... Selecting previously unselected package python-six. Preparing to unpack .../119-python-six_1.12.0-1_all.deb ... Unpacking python-six (1.12.0-1) ... Selecting previously unselected package python-pbr. Preparing to unpack .../120-python-pbr_5.1.1-0ubuntu2_all.deb ... Unpacking python-pbr (5.1.1-0ubuntu2) ... Selecting previously unselected package python-mock. Preparing to unpack .../121-python-mock_2.0.0-4_all.deb ... Unpacking python-mock (2.0.0-4) ... Selecting previously unselected package libxslt1.1:ppc64el. Preparing to unpack .../122-libxslt1.1_1.1.32-2_ppc64el.deb ... Unpacking libxslt1.1:ppc64el (1.1.32-2) ... Selecting previously unselected package xsltproc. Preparing to unpack .../123-xsltproc_1.1.32-2_ppc64el.deb ... Unpacking xsltproc (1.1.32-2) ... Selecting previously unselected package liblua5.2-0:ppc64el. Preparing to unpack .../124-liblua5.2-0_5.2.4-1.1build1_ppc64el.deb ... Unpacking liblua5.2-0:ppc64el (5.2.4-1.1build1) ... Selecting previously unselected package highlight-common. Preparing to unpack .../125-highlight-common_3.41-2build1_all.deb ... Unpacking highlight-common (3.41-2build1) ... Selecting previously unselected package highlight. Preparing to unpack .../126-highlight_3.41-2build1_ppc64el.deb ... Unpacking highlight (3.41-2build1) ... Selecting previously unselected package gtk-doc-tools. Preparing to unpack .../127-gtk-doc-tools_1.28-1_all.deb ... Unpacking gtk-doc-tools (1.28-1) ... Selecting previously unselected package libglib2.0-bin. Preparing to unpack .../128-libglib2.0-bin_2.58.1-2_ppc64el.deb ... Unpacking libglib2.0-bin (2.58.1-2) ... Selecting previously unselected package libglib2.0-dev-bin. Preparing to unpack .../129-libglib2.0-dev-bin_2.58.1-2_ppc64el.deb ... Unpacking libglib2.0-dev-bin (2.58.1-2) ... Selecting previously unselected package libpcre16-3:ppc64el. Preparing to unpack .../130-libpcre16-3_2%3a8.39-11_ppc64el.deb ... Unpacking libpcre16-3:ppc64el (2:8.39-11) ... Selecting previously unselected package libpcre32-3:ppc64el. Preparing to unpack .../131-libpcre32-3_2%3a8.39-11_ppc64el.deb ... Unpacking libpcre32-3:ppc64el (2:8.39-11) ... Selecting previously unselected package libpcrecpp0v5:ppc64el. Preparing to unpack .../132-libpcrecpp0v5_2%3a8.39-11_ppc64el.deb ... Unpacking libpcrecpp0v5:ppc64el (2:8.39-11) ... Selecting previously unselected package libpcre3-dev:ppc64el. Preparing to unpack .../133-libpcre3-dev_2%3a8.39-11_ppc64el.deb ... Unpacking libpcre3-dev:ppc64el (2:8.39-11) ... Selecting previously unselected package zlib1g-dev:ppc64el. Preparing to unpack .../134-zlib1g-dev_1%3a1.2.11.dfsg-0ubuntu2_ppc64el.deb ... Unpacking zlib1g-dev:ppc64el (1:1.2.11.dfsg-0ubuntu2) ... Selecting previously unselected package libglib2.0-dev:ppc64el. Preparing to unpack .../135-libglib2.0-dev_2.58.1-2_ppc64el.deb ... Unpacking libglib2.0-dev:ppc64el (2.58.1-2) ... Selecting previously unselected package libffi-dev:ppc64el. Preparing to unpack .../136-libffi-dev_3.2.1-9_ppc64el.deb ... Unpacking libffi-dev:ppc64el (3.2.1-9) ... Selecting previously unselected package libgirepository1.0-dev:ppc64el. Preparing to unpack .../137-libgirepository1.0-dev_1.58.2-2_ppc64el.deb ... Unpacking libgirepository1.0-dev:ppc64el (1.58.2-2) ... Selecting previously unselected package xorg-sgml-doctools. Preparing to unpack .../138-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 .../139-x11proto-dev_2018.4-4_all.deb ... Unpacking x11proto-dev (2018.4-4) ... Selecting previously unselected package x11proto-core-dev. Preparing to unpack .../140-x11proto-core-dev_2018.4-4_all.deb ... Unpacking x11proto-core-dev (2018.4-4) ... Selecting previously unselected package libice-dev:ppc64el. Preparing to unpack .../141-libice-dev_2%3a1.0.9-2_ppc64el.deb ... Unpacking libice-dev:ppc64el (2:1.0.9-2) ... Selecting previously unselected package libpthread-stubs0-dev:ppc64el. Preparing to unpack .../142-libpthread-stubs0-dev_0.3-4_ppc64el.deb ... Unpacking libpthread-stubs0-dev:ppc64el (0.3-4) ... Selecting previously unselected package libsm-dev:ppc64el. Preparing to unpack .../143-libsm-dev_2%3a1.2.2-1_ppc64el.deb ... Unpacking libsm-dev:ppc64el (2:1.2.2-1) ... Selecting previously unselected package libtext-unidecode-perl. Preparing to unpack .../144-libtext-unidecode-perl_1.30-1_all.deb ... Unpacking libtext-unidecode-perl (1.30-1) ... Selecting previously unselected package libxau-dev:ppc64el. Preparing to unpack .../145-libxau-dev_1%3a1.0.8-1_ppc64el.deb ... Unpacking libxau-dev:ppc64el (1:1.0.8-1) ... Selecting previously unselected package libxdmcp-dev:ppc64el. Preparing to unpack .../146-libxdmcp-dev_1%3a1.1.2-3_ppc64el.deb ... Unpacking libxdmcp-dev:ppc64el (1:1.1.2-3) ... Selecting previously unselected package xtrans-dev. Preparing to unpack .../147-xtrans-dev_1.3.5-1_all.deb ... Unpacking xtrans-dev (1.3.5-1) ... Selecting previously unselected package libxcb1-dev:ppc64el. Preparing to unpack .../148-libxcb1-dev_1.13.1-2_ppc64el.deb ... Unpacking libxcb1-dev:ppc64el (1.13.1-2) ... Selecting previously unselected package libx11-dev:ppc64el. Preparing to unpack .../149-libx11-dev_2%3a1.6.7-1_ppc64el.deb ... Unpacking libx11-dev:ppc64el (2:1.6.7-1) ... Selecting previously unselected package libxml-namespacesupport-perl. Preparing to unpack .../150-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 .../151-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 .../152-libxml-sax-perl_1.00+dfsg-1.1~build1_all.deb ... Unpacking libxml-sax-perl (1.00+dfsg-1.1~build1) ... Selecting previously unselected package libxml-libxml-perl. Preparing to unpack .../153-libxml-libxml-perl_2.0132+dfsg-2build1_ppc64el.deb ... Unpacking libxml-libxml-perl (2.0132+dfsg-2build1) ... Selecting previously unselected package libxt6:ppc64el. Preparing to unpack .../154-libxt6_1%3a1.1.5-1_ppc64el.deb ... Unpacking libxt6:ppc64el (1:1.1.5-1) ... Selecting previously unselected package libxt-dev:ppc64el. Preparing to unpack .../155-libxt-dev_1%3a1.1.5-1_ppc64el.deb ... Unpacking libxt-dev:ppc64el (1:1.1.5-1) ... Selecting previously unselected package texinfo. Preparing to unpack .../156-texinfo_6.5.0.dfsg.1-4build1_ppc64el.deb ... Unpacking texinfo (6.5.0.dfsg.1-4build1) ... Selecting previously unselected package sbuild-build-depends-libgtop2-dummy. Preparing to unpack .../157-sbuild-build-depends-libgtop2-dummy_0.invalid.0_ppc64el.deb ... Unpacking sbuild-build-depends-libgtop2-dummy (0.invalid.0) ... Setting up libhtml-tagset-perl (3.20-3) ... Setting up libonig5:ppc64el (6.9.1-1) ... Setting up libtry-tiny-perl (0.30-1) ... Setting up libarchive-zip-perl (1.64-1) ... Setting up mime-support (3.60ubuntu1) ... Setting up libxml-namespacesupport-perl (1.12-1) ... Setting up libicu63:ppc64el (63.1-5) ... Setting up libfile-which-perl (1.22-1) ... Setting up libencode-locale-perl (1.05-1) ... Setting up libtimedate-perl (2.3000-2) ... Setting up libjbig0:ppc64el (2.1-3.1build1) ... Setting up libsigsegv2:ppc64el (2.12-2) ... Setting up libpthread-stubs0-dev:ppc64el (0.3-4) ... Setting up fonts-dejavu-core (2.37-1) ... Setting up perl-openssl-defaults:ppc64el (3build1) ... Setting up libelf1:ppc64el (0.175-1) ... Setting up libglib2.0-0:ppc64el (2.58.1-2) ... 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 libffi-dev:ppc64el (3.2.1-9) ... Setting up libgdk-pixbuf2.0-common (2.38.0+dfsg-7) ... Setting up libosp5 (1.5.2-13ubuntu2) ... Setting up libdatrie1:ppc64el (0.2.12-1) ... Setting up gettext-base (0.19.8.1-9) ... Setting up libjpeg-turbo8:ppc64el (2.0.0-0ubuntu2) ... Setting up libpipeline1:ppc64el (1.5.0-2) ... Setting up m4 (1.4.18-2) ... Setting up sgml-base (1.29) ... Setting up libbsd0:ppc64el (0.9.1-1) ... Setting up ucf (3.0038+nmu1) ... Setting up libgirepository-1.0-1:ppc64el (1.58.2-2) ... Setting up libxml2:ppc64el (2.9.4+dfsg1-7ubuntu3) ... Setting up libuchardet0:ppc64el (0.0.6-3) ... Setting up x11proto-dev (2018.4-4) ... Setting up libfreetype6:ppc64el (2.8.1-2ubuntu2) ... Setting up libmagic-mgc (1:5.34-2) ... Setting up libmagic1:ppc64el (1:5.34-2) ... Setting up libgraphite2-3:ppc64el (1.3.12-1) ... Setting up libcroco3:ppc64el (0.6.12-3) ... Setting up libxslt1.1:ppc64el (1.1.32-2) ... Setting up libjq1:ppc64el (1.5+dfsg-2build1) ... Setting up libxml-sax-base-perl (1.09-1) ... Setting up pkg-config (0.29.1-0ubuntu2) ... Setting up libpixman-1-0:ppc64el (0.36.0-1) ... Setting up xtrans-dev (1.3.5-1) ... Setting up gir1.2-glib-2.0:ppc64el (1.58.2-2) ... Setting up libglib2.0-data (2.58.1-2) ... Setting up liblwp-mediatypes-perl (6.02-1) ... Processing triggers for libc-bin (2.28-0ubuntu1) ... Setting up dwz (0.12-3) ... Setting up autotools-dev (20180224.1) ... Setting up liburi-perl (1.74-1) ... Processing triggers for systemd (239-7ubuntu15) ... Setting up libhtml-parser-perl (3.72-3build2) ... Setting up libfribidi0:ppc64el (1.0.5-3) ... Setting up shared-mime-info (1.10-1) ... Setting up libpcrecpp0v5:ppc64el (2:8.39-11) ... Setting up libpcre32-3:ppc64el (2:8.39-11) ... Setting up libnet-http-perl (6.18-1) ... Setting up liblua5.2-0:ppc64el (5.2.4-1.1build1) ... Setting up libpcre16-3:ppc64el (2:8.39-11) ... Setting up libthai-data (0.1.28-1) ... Setting up libxdmcp6:ppc64el (1:1.1.2-3) ... Setting up xml-core (0.18) ... Setting up bsdmainutils (11.1.2ubuntu2) ... 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+19ubuntu8) ... 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.58.1-2) ... Setting up libwww-robotrules-perl (6.02-1) ... Setting up libx11-data (2:1.6.7-1) ... Setting up libpython2.7-stdlib:ppc64el (2.7.15-5) ... Setting up libxau6:ppc64el (1:1.0.8-1) ... Setting up autopoint (0.19.8.1-9) ... Setting up libmpdec2:ppc64el (2.4.2-2) ... Setting up highlight-common (3.41-2build1) ... Setting up netbase (5.5) ... Setting up libwebp6:ppc64el (0.6.1-2) ... Setting up zlib1g-dev:ppc64el (1:1.2.11.dfsg-0ubuntu2) ... Setting up libfile-stripnondeterminism-perl (1.0.0-1) ... Setting up libxml-sax-perl (1.00+dfsg-1.1~build1) ... 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:ppc64el (8c-2ubuntu8) ... Setting up jq (1.5+dfsg-2build1) ... Setting up libpcre3-dev:ppc64el (2:8.39-11) ... Setting up libpython3.7-stdlib:ppc64el (3.7.2~rc1-1) ... Setting up fontconfig-config (2.13.0-5ubuntu3) ... Setting up libhttp-date-perl (6.02-1) ... Setting up opensp (1.5.2-13ubuntu2) ... Setting up tex-common (6.10) ... 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-9) ... Setting up libnet-ssleay-perl (1.85-2ubuntu3) ... Setting up gir1.2-freedesktop:ppc64el (1.58.2-2) ... Setting up groff-base (1.22.4-1) ... Setting up python2.7 (2.7.15-5) ... Setting up libharfbuzz0b:ppc64el (2.3.0-1) ... Setting up libtiff5:ppc64el (4.0.10-3) ... Setting up libxau-dev:ppc64el (1:1.0.8-1) ... Setting up xsltproc (1.1.32-2) ... Setting up python3.7 (3.7.2~rc1-1) ... Setting up autoconf (2.69-11) ... Setting up libthai0:ppc64el (0.1.28-1) ... Setting up file (1:5.34-2) ... Setting up libio-socket-ssl-perl (2.060-3) ... Setting up libhtml-tree-perl (5.07-1) ... Setting up intltool-debian (0.35.0+20060710.4) ... Setting up libxdmcp-dev:ppc64el (1:1.1.2-3) ... Setting up highlight (3.41-2build1) ... Setting up automake (1:1.16.1-4) ... update-alternatives: using /usr/bin/automake-1.16 to provide /usr/bin/automake (automake) in auto mode Setting up libice6:ppc64el (2:1.0.9-2) ... Setting up libfile-listing-perl (6.04-1) ... Setting up man-db (2.8.4-3) ... Not building database; man-db/auto-update is not 'true'. Setting up libhttp-message-perl (6.18-1) ... Setting up libpython2-stdlib:ppc64el (2.7.15-3) ... Setting up libxml-libxml-perl (2.0132+dfsg-2build1) ... 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:ppc64el (1.13.1-2) ... Setting up libhttp-negotiate-perl (6.01-1) ... Setting up libtool (2.4.6-6) ... Setting up libpython3-stdlib:ppc64el (3.7.1-1ubuntu1) ... Setting up libfontconfig1:ppc64el (2.13.0-5ubuntu3) ... Setting up libsm6:ppc64el (2:1.2.2-1) ... Setting up libxcb-render0:ppc64el (1.13.1-2) ... Setting up po-debconf (1.0.21) ... Setting up python3 (3.7.1-1ubuntu1) ... Setting up libhttp-cookies-perl (6.04-1) ... Setting up python3-six (1.12.0-1) ... Setting up libx11-6:ppc64el (2:1.6.7-1) ... Setting up python3-pkg-resources (40.6.2-1) ... Setting up python3-gi (3.30.4-1) ... Setting up python2 (2.7.15-3) ... Setting up python3-markupsafe (1.0-1build3) ... Setting up libpython-stdlib:ppc64el (2.7.15-3) ... Setting up libice-dev:ppc64el (2:1.0.9-2) ... Setting up libxcb-shm0:ppc64el (1.13.1-2) ... Setting up libxt6:ppc64el (1:1.1.5-1) ... Setting up libxrender1:ppc64el (1:0.9.10-1) ... Setting up libxcb1-dev:ppc64el (1.13.1-2) ... Setting up texinfo (6.5.0.dfsg.1-4build1) ... Setting up libx11-dev:ppc64el (2:1.6.7-1) ... Setting up python3-lib2to3 (3.7.1-1ubuntu4) ... Setting up python3-distutils (3.7.1-1ubuntu4) ... Setting up python (2.7.15-3) ... Setting up fontconfig (2.13.0-5ubuntu3) ... Regenerating fonts cache... done. Setting up libsm-dev:ppc64el (2:1.2.2-1) ... Setting up python3-markdown (3.0.1-2) ... Setting up libxext6:ppc64el (2:1.3.3-1) ... Setting up libglib2.0-dev-bin (2.58.1-2) ... Setting up python3-mako (1.0.7+ds1-1) ... Setting up libgdk-pixbuf2.0-0:ppc64el (2.38.0+dfsg-7) ... Setting up python3-scour (0.37-1) ... Setting up gir1.2-gdkpixbuf-2.0:ppc64el (2.38.0+dfsg-7) ... Setting up scour (0.37-1) ... Setting up python-pkg-resources (40.6.2-1) ... Setting up libglib2.0-dev:ppc64el (2.58.1-2) ... Setting up python-six (1.12.0-1) ... Setting up libpango-1.0-0:ppc64el (1.42.4-6) ... Setting up python-funcsigs (1.0.2-4) ... Setting up libcairo2:ppc64el (1.16.0-2) ... Setting up python-setuptools (40.6.2-1) ... Setting up libxt-dev:ppc64el (1:1.1.5-1) ... Setting up gobject-introspection (1.58.2-2) ... Setting up libcairo-gobject2:ppc64el (1.16.0-2) ... Setting up libpangoft2-1.0-0:ppc64el (1.42.4-6) ... Setting up python-pbr (5.1.1-0ubuntu2) ... update-alternatives: using /usr/bin/python2-pbr to provide /usr/bin/pbr (pbr) in auto mode Setting up python3-cairo:ppc64el (1.16.2-1build2) ... Setting up libgirepository1.0-dev:ppc64el (1.58.2-2) ... Setting up python-mock (2.0.0-4) ... Setting up libpangocairo-1.0-0:ppc64el (1.42.4-6) ... Setting up python3-gi-cairo (3.30.4-1) ... Setting up librsvg2-2:ppc64el (2.44.10-1) ... Setting up gir1.2-rsvg-2.0:ppc64el (2.44.10-1) ... Processing triggers for sgml-base (1.29) ... Setting up sgml-data (2.0.11) ... 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-42) ... Setting up gtk-doc-tools (1.28-1) ... Setting up dh-autoreconf (19) ... Setting up liblwp-protocol-https-perl (6.07-2) ... Setting up dh-strip-nondeterminism (1.0.0-1) ... Setting up libwww-perl (6.36-1) ... Setting up debhelper (12ubuntu1) ... Setting up libxml-parser-perl (2.44-2build4) ... Setting up intltool (0.51.0-5ubuntu1) ... Setting up dh-translations (143) ... Setting up gnome-pkg-tools (0.21.0ubuntu1) ... Setting up sbuild-build-depends-libgtop2-dummy (0.invalid.0) ... Processing triggers for libc-bin (2.28-0ubuntu1) ... Processing triggers for systemd (239-7ubuntu15) ... +------------------------------------------------------------------------------+ | Build environment | +------------------------------------------------------------------------------+ Kernel: Linux 4.4.0-141-generic ppc64el (ppc64le) Toolchain package versions: binutils_2.31.1-11ubuntu1 dpkg-dev_1.19.2ubuntu2 g++-8_8.2.0-13ubuntu1 gcc-8_8.2.0-13ubuntu1 libc6-dev_2.28-0ubuntu1 libstdc++-8-dev_8.2.0-13ubuntu1 libstdc++6_8.2.0-13ubuntu1 linux-libc-dev_4.19.0-9.10 Package versions: adduser_3.117ubuntu1 advancecomp_2.1-1 apt_1.8.0~alpha3 autoconf_2.69-11 automake_1:1.16.1-4 autopoint_0.19.8.1-9 autotools-dev_20180224.1 base-files_10.1ubuntu8 base-passwd_3.5.45 bash_4.4.18-2ubuntu3 binutils_2.31.1-11ubuntu1 binutils-common_2.31.1-11ubuntu1 binutils-powerpc64le-linux-gnu_2.31.1-11ubuntu1 bsdmainutils_11.1.2ubuntu2 bsdutils_1:2.32-0.1ubuntu2 build-essential_12.5ubuntu2 bzip2_1.0.6-9 ca-certificates_20180409 coreutils_8.28-1ubuntu2 cpp_4:8.2.0-2ubuntu2 cpp-8_8.2.0-13ubuntu1 dash_0.5.10.2-4 debconf_1.5.69 debhelper_12ubuntu1 debianutils_4.8.6 dh-autoreconf_19 dh-strip-nondeterminism_1.0.0-1 dh-translations_143 diffutils_1:3.6-1 dmsetup_2:1.02.145-4.1ubuntu4 docbook_4.5-6 docbook-to-man_1:2.0.0-42 docbook-xml_4.5-8 docbook-xsl_1.79.1+dfsg-2 dpkg_1.19.2ubuntu2 dpkg-dev_1.19.2ubuntu2 dwz_0.12-3 e2fslibs_1.44.5-1 e2fsprogs_1.44.5-1 fakeroot_1.23-1 fdisk_2.32-0.1ubuntu2 file_1:5.34-2 findutils_4.6.0+git+20181018-1 fontconfig_2.13.0-5ubuntu3 fontconfig-config_2.13.0-5ubuntu3 fonts-dejavu-core_2.37-1 g++_4:8.2.0-2ubuntu2 g++-8_8.2.0-13ubuntu1 gcc_4:8.2.0-2ubuntu2 gcc-8_8.2.0-13ubuntu1 gcc-8-base_8.2.0-13ubuntu1 gettext_0.19.8.1-9 gettext-base_0.19.8.1-9 gir1.2-freedesktop_1.58.2-2 gir1.2-gdkpixbuf-2.0_2.38.0+dfsg-7 gir1.2-glib-2.0_1.58.2-2 gir1.2-rsvg-2.0_2.44.10-1 gnome-pkg-tools_0.21.0ubuntu1 gobject-introspection_1.58.2-2 gpg_2.2.8-3ubuntu1 gpg-agent_2.2.8-3ubuntu1 gpgconf_2.2.8-3ubuntu1 gpgv_2.2.8-3ubuntu1 grep_3.1-3 groff-base_1.22.4-1 gtk-doc-tools_1.28-1 gzip_1.6-5ubuntu2 highlight_3.41-2build1 highlight-common_3.41-2build1 hostname_3.21 init_1.56+nmu1 init-system-helpers_1.56+nmu1 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-2build1 libacl1_2.2.52-3build1 libapparmor1_2.12-4ubuntu10 libapt-pkg5.0_1.8.0~alpha3 libarchive-zip-perl_1.64-1 libargon2-1_0~20171227-0.1 libasan5_8.2.0-13ubuntu1 libassuan0_2.5.2-1 libatomic1_8.2.0-13ubuntu1 libattr1_1:2.4.47-2build1 libaudit-common_1:2.8.3-1ubuntu3 libaudit1_1:2.8.3-1ubuntu3 libbinutils_2.31.1-11ubuntu1 libblkid1_2.32-0.1ubuntu2 libbsd0_0.9.1-1 libbz2-1.0_1.0.6-9 libc-bin_2.28-0ubuntu1 libc-dev-bin_2.28-0ubuntu1 libc6_2.28-0ubuntu1 libc6-dev_2.28-0ubuntu1 libcairo-gobject2_1.16.0-2 libcairo2_1.16.0-2 libcap-ng0_0.7.9-1build1 libcap2_1:2.25-1.2 libcc1-0_8.2.0-13ubuntu1 libcom-err2_1.44.5-1 libcomerr2_1.44.5-1 libcroco3_0.6.12-3 libcryptsetup12_2:2.0.4-2ubuntu2 libdatrie1_0.2.12-1 libdb5.3_5.3.28+dfsg1-0.2 libdebconfclient0_0.244ubuntu1 libdevmapper1.02.1_2:1.02.145-4.1ubuntu4 libdpkg-perl_1.19.2ubuntu2 libelf1_0.175-1 libencode-locale-perl_1.05-1 libexpat1_2.2.6-1 libext2fs2_1.44.5-1 libfakeroot_1.23-1 libfdisk1_2.32-0.1ubuntu2 libffi-dev_3.2.1-9 libffi6_3.2.1-9 libfile-listing-perl_6.04-1 libfile-stripnondeterminism-perl_1.0.0-1 libfile-which-perl_1.22-1 libfontconfig1_2.13.0-5ubuntu3 libfreetype6_2.8.1-2ubuntu2 libfribidi0_1.0.5-3 libgcc-8-dev_8.2.0-13ubuntu1 libgcc1_1:8.2.0-13ubuntu1 libgcrypt20_1.8.4-3ubuntu1 libgdbm-compat4_1.18.1-2 libgdbm6_1.18.1-2 libgdk-pixbuf2.0-0_2.38.0+dfsg-7 libgdk-pixbuf2.0-common_2.38.0+dfsg-7 libgirepository-1.0-1_1.58.2-2 libgirepository1.0-dev_1.58.2-2 libglib2.0-0_2.58.1-2 libglib2.0-bin_2.58.1-2 libglib2.0-data_2.58.1-2 libglib2.0-dev_2.58.1-2 libglib2.0-dev-bin_2.58.1-2 libgmp10_2:6.1.2+dfsg-4 libgnutls30_3.6.5-2ubuntu1 libgomp1_8.2.0-13ubuntu1 libgpg-error0_1.33-3 libgraphite2-3_1.3.12-1 libharfbuzz0b_2.3.0-1 libhogweed4_3.4.1~rc1-1 libhtml-parser-perl_3.72-3build2 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.18-1 libhttp-negotiate-perl_6.01-1 libice-dev_2:1.0.9-2 libice6_2:1.0.9-2 libicu63_63.1-5 libidn11_1.33-2.2ubuntu1 libidn2-0_2.0.5-1 libio-html-perl_1.001-1 libio-socket-ssl-perl_2.060-3 libip4tc0_1.6.1-2ubuntu3 libisl19_0.20-2 libitm1_8.2.0-13ubuntu1 libjbig0_2.1-3.1build1 libjpeg-turbo8_2.0.0-0ubuntu2 libjpeg8_8c-2ubuntu8 libjq1_1.5+dfsg-2build1 libjson-c3_0.12.1-1.3 libkmod2_25-1ubuntu2 liblockfile-bin_1.14-1.1 liblockfile1_1.14-1.1 liblsan0_8.2.0-13ubuntu1 liblua5.2-0_5.2.4-1.1build1 liblwp-mediatypes-perl_6.02-1 liblwp-protocol-https-perl_6.07-2 liblz4-1_1.8.2-1ubuntu1 liblzma5_5.2.2-1.3 libmagic-mgc_1:5.34-2 libmagic1_1:5.34-2 libmount1_2.32-0.1ubuntu2 libmpc3_1.1.0-1 libmpdec2_2.4.2-2 libmpfr6_4.0.1-2 libncurses6_6.1+20180210-4ubuntu1 libncursesw6_6.1+20180210-4ubuntu1 libnet-http-perl_6.18-1 libnet-ssleay-perl_1.85-2ubuntu3 libnettle6_3.4.1~rc1-1 libnpth0_1.6-1 libonig5_6.9.1-1 libosp5_1.5.2-13ubuntu2 libp11-kit0_0.23.14-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.42.4-6 libpangocairo-1.0-0_1.42.4-6 libpangoft2-1.0-0_1.42.4-6 libpcre16-3_2:8.39-11 libpcre3_2:8.39-11 libpcre3-dev_2:8.39-11 libpcre32-3_2:8.39-11 libpcrecpp0v5_2:8.39-11 libperl5.28_5.28.1-3 libpipeline1_1.5.0-2 libpixman-1-0_0.36.0-1 libpng16-16_1.6.36-1 libprocps7_2:3.3.15-2ubuntu1 libpthread-stubs0-dev_0.3-4 libpython-stdlib_2.7.15-3 libpython2-stdlib_2.7.15-3 libpython2.7-minimal_2.7.15-5 libpython2.7-stdlib_2.7.15-5 libpython3-stdlib_3.7.1-1ubuntu1 libpython3.7-minimal_3.7.2~rc1-1 libpython3.7-stdlib_3.7.2~rc1-1 libquadmath0_8.2.0-13ubuntu1 libreadline7_7.0-5 librsvg2-2_2.44.10-1 libseccomp2_2.3.3-3ubuntu2 libselinux1_2.8-1build2 libsemanage-common_2.8-1build2 libsemanage1_2.8-1build2 libsepol1_2.8-1 libsigsegv2_2.12-2 libslang2_2.3.2-1ubuntu1 libsm-dev_2:1.2.2-1 libsm6_2:1.2.2-1 libsmartcols1_2.32-0.1ubuntu2 libsqlite3-0_3.26.0+fossilbc891ac6b-1 libss2_1.44.5-1 libssl1.1_1.1.1a-1ubuntu2 libstdc++-8-dev_8.2.0-13ubuntu1 libstdc++6_8.2.0-13ubuntu1 libsystemd0_239-7ubuntu15 libtasn1-6_4.13-3 libtext-unidecode-perl_1.30-1 libthai-data_0.1.28-1 libthai0_0.1.28-1 libtiff5_4.0.10-3 libtimedate-perl_2.3000-2 libtinfo6_6.1+20180210-4ubuntu1 libtool_2.4.6-6 libtry-tiny-perl_0.30-1 libtsan0_8.2.0-13ubuntu1 libubsan1_8.2.0-13ubuntu1 libuchardet0_0.0.6-3 libudev1_239-7ubuntu15 libunistring2_0.9.10-1ubuntu1 liburi-perl_1.74-1 libusb-0.1-4_2:0.1.12-32 libustr-1.0-1_1.0.4-6 libuuid1_2.32-0.1ubuntu2 libwebp6_0.6.1-2 libwww-perl_6.36-1 libwww-robotrules-perl_6.02-1 libx11-6_2:1.6.7-1 libx11-data_2:1.6.7-1 libx11-dev_2:1.6.7-1 libxau-dev_1:1.0.8-1 libxau6_1:1.0.8-1 libxcb-render0_1.13.1-2 libxcb-shm0_1.13.1-2 libxcb1_1.13.1-2 libxcb1-dev_1.13.1-2 libxdmcp-dev_1:1.1.2-3 libxdmcp6_1:1.1.2-3 libxext6_2:1.3.3-1 libxml-libxml-perl_2.0132+dfsg-2build1 libxml-namespacesupport-perl_1.12-1 libxml-parser-perl_2.44-2build4 libxml-sax-base-perl_1.09-1 libxml-sax-perl_1.00+dfsg-1.1~build1 libxml2_2.9.4+dfsg1-7ubuntu3 libxrender1_1:0.9.10-1 libxslt1.1_1.1.32-2 libxt-dev_1:1.1.5-1 libxt6_1:1.1.5-1 libzstd1_1.3.5+dfsg-1ubuntu1 linux-libc-dev_4.19.0-9.10 lockfile-progs_0.1.18 login_1:4.5-1ubuntu1 lsb-base_9.20170808ubuntu1 m4_1.4.18-2 make_4.2.1-1.2 man-db_2.8.4-3 mawk_1.3.3-17ubuntu3 mime-support_3.60ubuntu1 mount_2.32-0.1ubuntu2 multiarch-support_2.28-0ubuntu1 ncurses-base_6.1+20180210-4ubuntu1 ncurses-bin_6.1+20180210-4ubuntu1 netbase_5.5 opensp_1.5.2-13ubuntu2 openssl_1.1.1a-1ubuntu2 optipng_0.7.6-1.1 passwd_1:4.5-1ubuntu1 patch_2.7.6-3 perl_5.28.1-3 perl-base_5.28.1-3 perl-modules-5.28_5.28.1-3 perl-openssl-defaults_3build1 pinentry-curses_1.1.0-1build2 pkg-config_0.29.1-0ubuntu2 pkgbinarymangler_143 po-debconf_1.0.21 policyrcd-script-zg2_0.1-3 procps_2:3.3.15-2ubuntu1 python_2.7.15-3 python-funcsigs_1.0.2-4 python-minimal_2.7.15-3 python-mock_2.0.0-4 python-pbr_5.1.1-0ubuntu2 python-pkg-resources_40.6.2-1 python-setuptools_40.6.2-1 python-six_1.12.0-1 python2_2.7.15-3 python2-minimal_2.7.15-3 python2.7_2.7.15-5 python2.7-minimal_2.7.15-5 python3_3.7.1-1ubuntu1 python3-cairo_1.16.2-1build2 python3-distutils_3.7.1-1ubuntu4 python3-gi_3.30.4-1 python3-gi-cairo_3.30.4-1 python3-lib2to3_3.7.1-1ubuntu4 python3-mako_1.0.7+ds1-1 python3-markdown_3.0.1-2 python3-markupsafe_1.0-1build3 python3-minimal_3.7.1-1ubuntu1 python3-pkg-resources_40.6.2-1 python3-scour_0.37-1 python3-six_1.12.0-1 python3.7_3.7.2~rc1-1 python3.7-minimal_3.7.2~rc1-1 readline-common_7.0-5 sbuild-build-depends-core-dummy_0.invalid.0 sbuild-build-depends-libgtop2-dummy_0.invalid.0 scour_0.37-1 sed_4.7-1 sensible-utils_0.0.12 sgml-base_1.29 sgml-data_2.0.11 shared-mime-info_1.10-1 systemd_239-7ubuntu15 systemd-sysv_239-7ubuntu15 sysv-rc_2.88dsf-59.3ubuntu2 sysvinit-utils_2.88dsf-59.10ubuntu2 tar_1.30+dfsg-3 tex-common_6.10 texinfo_6.5.0.dfsg.1-4build1 tzdata_2018g-1 ubuntu-keyring_2018.09.18.1 ucf_3.0038+nmu1 util-linux_2.32-0.1ubuntu2 x11-common_1:7.7+19ubuntu8 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.32-2 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 Fri Dec 28 04:00:02 2018 UTC gpgv: using RSA key 4D0BE12F0E4776D8AACE9696E66C775AEBFE6C7D gpgv: Can't check signature: No public key dpkg-source: warning: failed to verify signature on ./libgtop2_2.38.0-4.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-4.debian.tar.xz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying 03_kfreebsd_installdirs.patch dpkg-source: info: applying 04_kfreebsd_version.patch dpkg-source: info: applying 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-16210574 SCHROOT_CHROOT_NAME=build-PACKAGEBUILD-16210574 SCHROOT_COMMAND=env SCHROOT_GID=2501 SCHROOT_GROUP=buildd SCHROOT_SESSION_ID=build-PACKAGEBUILD-16210574 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-4 dpkg-buildpackage: info: source distribution unstable dpkg-source --before-build . dpkg-buildpackage: info: host architecture ppc64el 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 Hunk #1 succeeded at 7360 (offset 140 lines). Hunk #2 succeeded at 7755 (offset 140 lines). make[1]: Leaving directory '/<>' debian/rules override_dh_auto_configure make[1]: Entering directory '/<>' dh_auto_configure -- \ --libdir=/usr/lib/powerpc64le-linux-gnu \ --libexecdir=\${libdir}/libgtop-2.0-11 ./configure --build=powerpc64le-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/powerpc64le-linux-gnu --libexecdir=\${prefix}/lib/powerpc64le-linux-gnu --runstatedir=/run --disable-maintainer-mode --disable-dependency-tracking --libdir=/usr/lib/powerpc64le-linux-gnu --libexecdir=\${libdir}/libgtop-2.0-11 configure: WARNING: unrecognized options: --disable-maintainer-mode checking build system type... powerpc64le-unknown-linux-gnu checking host system type... powerpc64le-unknown-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 whether make supports the include directive... yes (GNU style) 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/ld checking if the linker (/usr/bin/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 powerpc64le-unknown-linux-gnu file names to powerpc64le-unknown-linux-gnu format... func_convert_file_noop checking how to convert powerpc64le-unknown-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/bin/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/ld) 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... 267016 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/ld checking if the linker (/usr/bin/ld) 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 make[1]: Entering directory '/<>' make all-recursive make[2]: Entering directory '/<>' Making all in po make[3]: Entering directory '/<>/po' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/<>/po' Making all in misc make[3]: Entering directory '/<>/misc' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/<>/misc' Making all in include make[3]: Entering directory '/<>/include' Making all in glibtop make[4]: Entering directory '/<>/include/glibtop' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/<>/include/glibtop' make[4]: Entering directory '/<>/include' make[4]: Nothing to be done for 'all-am'. make[4]: Leaving directory '/<>/include' make[3]: Leaving directory '/<>/include' Making all in sysdeps make[3]: Entering directory '/<>/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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o error.lo error.c /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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o gnuslib.lo gnuslib.c /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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o procargs.lo procargs.c /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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c gnuslib.c -fPIC -DPIC -o .libs/gnuslib.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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c default.c -fPIC -DPIC -o .libs/default.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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procargs.c -o procargs.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c gnuslib.c -o gnuslib.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c error.c -o error.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c default.c -o default.o >/dev/null 2>&1 /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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c sysdeps_suid.c -fPIC -DPIC -o .libs/sysdeps_suid.o /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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,-O1 -Wl,-z,defs -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: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c sysdeps_suid.c -o sysdeps_suid.o >/dev/null 2>&1 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 /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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,-O1 -Wl,-z,defs -Wl,--as-needed -o libgtop_suid_common-2.0.la error.lo sysdeps_suid.lo libtool: link: ( cd ".libs" && rm -f "libgtop_common-2.0.la" && ln -s "../libgtop_common-2.0.la" "libgtop_common-2.0.la" ) 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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o open.lo open.c /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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o close.lo close.c /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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o cpu.lo cpu.c /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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c close.c -o close.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c open.c -o open.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c mem.c -o mem.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c cpu.c -o cpu.o >/dev/null 2>&1 /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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o swap.lo swap.c /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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o uptime.lo uptime.c /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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c loadavg.c -fPIC -DPIC -o .libs/loadavg.o /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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c swap.c -o swap.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c uptime.c -o uptime.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c loadavg.c -o loadavg.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c shm_limits.c -o shm_limits.o >/dev/null 2>&1 /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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o msg_limits.lo msg_limits.c /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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c sem_limits.c -fPIC -DPIC -o .libs/sem_limits.o /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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o proclist.lo proclist.c /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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c msg_limits.c -o msg_limits.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c sem_limits.c -o sem_limits.o >/dev/null 2>&1 /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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procstate.c -o procstate.o >/dev/null 2>&1 /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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c proclist.c -o proclist.o >/dev/null 2>&1 /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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procuid.c -o procuid.o >/dev/null 2>&1 /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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procmem.c -fPIC -DPIC -o .libs/procmem.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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c proctime.c -o proctime.o >/dev/null 2>&1 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) ^~~~~~~ /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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procmem.c -o procmem.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procsignal.c -o procsignal.o >/dev/null 2>&1 /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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procsegment.c -fPIC -DPIC -o .libs/procsegment.o /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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o procargs.lo procargs.c /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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c prockernel.c -o prockernel.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procmap.c -fPIC -DPIC -o .libs/procmap.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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procsegment.c -o procsegment.o >/dev/null 2>&1 /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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o siglist.lo siglist.c 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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procargs.c -o procargs.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c siglist.c -fPIC -DPIC -o .libs/siglist.o /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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procmap.c -o procmap.o >/dev/null 2>&1 /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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c siglist.c -o siglist.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c netload.c -fPIC -DPIC -o .libs/netload.o /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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o ppp.lo ppp.c /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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c sysinfo.c -o sysinfo.o >/dev/null 2>&1 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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c glibtop_private.c -fPIC -DPIC -o .libs/glibtop_private.o /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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c netload.c -o netload.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c ppp.c -o ppp.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c glibtop_private.c -o glibtop_private.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c mountlist.c -o mountlist.o >/dev/null 2>&1 /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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procaffinity.c -fPIC -DPIC -o .libs/procaffinity.o /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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o procio.lo procio.c /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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procio.c -fPIC -DPIC -o .libs/procio.o /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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procaffinity.c -o procaffinity.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procio.c -o procio.o >/dev/null 2>&1 /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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c netlist.c -o netlist.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c fsusage.c -o fsusage.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procopenfiles.c -fPIC -DPIC -o .libs/procopenfiles.o /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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procopenfiles.c -o procopenfiles.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c procwd.c -o procwd.o >/dev/null 2>&1 /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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,-O1 -Wl,-z,defs -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]: Entering directory '/<>/sysdeps' make[4]: Nothing to be done for 'all-am'. make[4]: Leaving directory '/<>/sysdeps' make[3]: Leaving directory '/<>/sysdeps' Making all in lib make[3]: Entering directory '/<>/lib' perl ./lib.pl < ../features.def > lib-t mv lib-t lib.c 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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o init.lo init.c /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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o open.lo open.c /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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o close.lo close.c /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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c command.c -o command.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c open.c -o open.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c close.c -o close.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c init.c -o init.o >/dev/null 2>&1 /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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o read.lo read.c /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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o read_data.lo read_data.c /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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c write.c -fPIC -DPIC -o .libs/write.o /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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c read.c -o read.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c write.c -o write.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c read_data.c -o read_data.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c lib.c -fPIC -DPIC -o .libs/lib.o /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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o parameter.lo parameter.c /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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o sysdeps.lo sysdeps.c /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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c sysdeps.c -o sysdeps.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c parameter.c -o parameter.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c boxed.c -o boxed.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../sysdeps/linux -I../include -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c lib.c -o lib.o >/dev/null 2>&1 /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 -O3 -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,now -Wl,-O1 -Wl,-z,defs -Wl,--as-needed -o libgtop-2.0.la -rpath /usr/lib/powerpc64le-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 -O3 -fstack-protector-strong -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-O1 -Wl,-z -Wl,defs -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" ) 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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security" LDFLAGS="-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,-O1 -Wl,-z,defs -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/powerpc64le-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-introspect1lzted1h/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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security /<>/lib/tmp-introspect1lzted1h/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,now -Wl,-O1 -Wl,-z,defs -Wl,--as-needed libtool: link: gcc -o /<>/lib/tmp-introspect1lzted1h/.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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security /<>/lib/tmp-introspect1lzted1h/GTop-2.0.o -Wl,--export-dynamic -pthread -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-O1 -Wl,-z -Wl,defs -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 /usr/bin/g-ir-compiler --includedir=. GTop-2.0.gir -o GTop-2.0.typelib make[4]: Leaving directory '/<>/lib' make[3]: Leaving directory '/<>/lib' Making all in src make[3]: Entering directory '/<>/src' make[4]: Entering directory '/<>/src' make[4]: Nothing to be done for 'all-am'. make[4]: Leaving directory '/<>/src' make[3]: Leaving directory '/<>/src' 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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o first.o first.c 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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o second.o second.c 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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o pprint.o pprint.c 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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o procargs.o procargs.c 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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o df.o df.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, ~~~~~~~~~~~~~~ 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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o netlist.o netlist.c 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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o mountlist.o mountlist.c 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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o procmap.o procmap.c 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"); ^~~~~~ 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); ~~~~~~~~~~~~~ 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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o netload.o netload.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 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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o sysdeps.o sysdeps.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 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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o timings.o timings.c 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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o openfiles.o openfiles.c 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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o smp.o smp.c 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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o proclist.o proclist.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'"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o free.o free.c 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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o wd.o wd.c 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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o affinity.o affinity.c 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/powerpc64le-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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o diskio.o diskio.c /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 -O3 -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,now -Wl,-O1 -Wl,-z,defs -Wl,--as-needed -o first first.o ../lib/libgtop-2.0.la /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 -O3 -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,now -Wl,-O1 -Wl,-z,defs -Wl,--as-needed -o second second.o ../lib/libgtop-2.0.la -lm /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 -O3 -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,now -Wl,-O1 -Wl,-z,defs -Wl,--as-needed -o pprint pprint.o ../lib/libgtop-2.0.la /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 -O3 -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,now -Wl,-O1 -Wl,-z,defs -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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-O1 -Wl,-z -Wl,defs -o .libs/first first.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so /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 -O3 -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,now -Wl,-O1 -Wl,-z,defs -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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-O1 -Wl,-z -Wl,defs -o .libs/second second.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so -lm libtool: link: gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-O1 -Wl,-z -Wl,defs -o .libs/procargs procargs.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so /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 -O3 -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,now -Wl,-O1 -Wl,-z,defs -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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-O1 -Wl,-z -Wl,defs -o .libs/pprint pprint.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so /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 -O3 -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,now -Wl,-O1 -Wl,-z,defs -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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-O1 -Wl,-z -Wl,defs -o .libs/df df.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so /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 -O3 -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,now -Wl,-O1 -Wl,-z,defs -Wl,--as-needed -o procmap procmap.o ../lib/libgtop-2.0.la /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 -O3 -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,now -Wl,-O1 -Wl,-z,defs -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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-O1 -Wl,-z -Wl,defs -o .libs/mountlist mountlist.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so libtool: link: gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-O1 -Wl,-z -Wl,defs -o .libs/netlist netlist.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so /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 -O3 -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,now -Wl,-O1 -Wl,-z,defs -Wl,--as-needed -o sysdeps sysdeps.o ../lib/libgtop-2.0.la /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 -O3 -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,now -Wl,-O1 -Wl,-z,defs -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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-O1 -Wl,-z -Wl,defs -o .libs/procmap procmap.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so /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 -O3 -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,now -Wl,-O1 -Wl,-z,defs -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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-O1 -Wl,-z -Wl,defs -o .libs/netload netload.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so /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 -O3 -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,now -Wl,-O1 -Wl,-z,defs -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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-O1 -Wl,-z -Wl,defs -o .libs/sysdeps sysdeps.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so libtool: link: gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-O1 -Wl,-z -Wl,defs -o .libs/timings timings.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so libtool: link: gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-O1 -Wl,-z -Wl,defs -o .libs/openfiles openfiles.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so /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 -O3 -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,now -Wl,-O1 -Wl,-z,defs -Wl,--as-needed -o proclist proclist.o ../lib/libgtop-2.0.la /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 -O3 -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,now -Wl,-O1 -Wl,-z,defs -Wl,--as-needed -o free free.o ../lib/libgtop-2.0.la /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 -O3 -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,now -Wl,-O1 -Wl,-z,defs -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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-O1 -Wl,-z -Wl,defs -o .libs/smp smp.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so -lm /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 -O3 -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,now -Wl,-O1 -Wl,-z,defs -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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-O1 -Wl,-z -Wl,defs -o .libs/free free.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so libtool: link: gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-O1 -Wl,-z -Wl,defs -o .libs/proclist proclist.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so libtool: link: gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-O1 -Wl,-z -Wl,defs -o .libs/wd wd.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so /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 -O3 -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,now -Wl,-O1 -Wl,-z,defs -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 -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-O1 -Wl,-z -Wl,defs -o .libs/affinity affinity.o -lgobject-2.0 -lglib-2.0 -lXau -Wl,--as-needed ../lib/.libs/libgtop-2.0.so libtool: link: gcc -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O3 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-O1 -Wl,-z -Wl,defs -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 make[3]: Entering directory '/<>/doc' Making all in reference make[4]: Entering directory '/<>/doc/reference' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/<>/doc/reference' make[4]: Entering directory '/<>/doc' make[4]: Leaving directory '/<>/doc' make[3]: Leaving directory '/<>/doc' make[3]: Entering directory '/<>' make[3]: Leaving directory '/<>' make[2]: Leaving directory '/<>' make[1]: Leaving directory '/<>' dh_auto_test -a make -j4 check VERBOSE=1 make[1]: Entering directory '/<>' Making check in po make[2]: Entering directory '/<>/po' make[2]: Nothing to be done for 'check'. make[2]: Leaving directory '/<>/po' Making check in misc make[2]: Entering directory '/<>/misc' make[2]: Nothing to be done for 'check'. make[2]: Leaving directory '/<>/misc' Making check in include make[2]: Entering directory '/<>/include' Making check in glibtop make[3]: Entering directory '/<>/include/glibtop' make[3]: Nothing to be done for 'check'. make[3]: Leaving directory '/<>/include/glibtop' make[3]: Entering directory '/<>/include' make[3]: Nothing to be done for 'check-am'. make[3]: Leaving directory '/<>/include' make[2]: Leaving directory '/<>/include' Making check in sysdeps make[2]: Entering directory '/<>/sysdeps' Making check in common make[3]: Entering directory '/<>/sysdeps/common' make[3]: Nothing to be done for 'check'. make[3]: Leaving directory '/<>/sysdeps/common' Making check in linux make[3]: Entering directory '/<>/sysdeps/linux' make[3]: Nothing to be done for 'check'. make[3]: Leaving directory '/<>/sysdeps/linux' make[3]: Entering directory '/<>/sysdeps' make[3]: Nothing to be done for 'check-am'. make[3]: Leaving directory '/<>/sysdeps' make[2]: Leaving directory '/<>/sysdeps' Making check in lib make[2]: Entering directory '/<>/lib' make check-am make[3]: Entering directory '/<>/lib' make[3]: Nothing to be done for 'check-am'. make[3]: Leaving directory '/<>/lib' make[2]: Leaving directory '/<>/lib' Making check in src make[2]: Entering directory '/<>/src' make[3]: Entering directory '/<>/src' make[3]: Nothing to be done for 'check-am'. make[3]: Leaving directory '/<>/src' make[2]: Leaving directory '/<>/src' Making check in examples make[2]: Entering directory '/<>/examples' make[2]: Nothing to be done for 'check'. make[2]: Leaving directory '/<>/examples' Making check in doc make[2]: Entering directory '/<>/doc' Making check in reference make[3]: Entering directory '/<>/doc/reference' make[3]: Nothing to be done for 'check'. make[3]: Leaving directory '/<>/doc/reference' make[3]: Entering directory '/<>/doc' make[3]: Nothing to be done for 'check-am'. make[3]: Leaving directory '/<>/doc' make[2]: Leaving directory '/<>/doc' make[2]: Entering directory '/<>' make[2]: Leaving directory '/<>' make[1]: Leaving directory '/<>' 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/powerpc64le-linux-gnu' /bin/bash ../libtool --mode=install /usr/bin/install -c libgtop-2.0.la '/<>/debian/tmp/usr/lib/powerpc64le-linux-gnu' libtool: install: /usr/bin/install -c .libs/libgtop-2.0.so.11.0.0 /<>/debian/tmp/usr/lib/powerpc64le-linux-gnu/libgtop-2.0.so.11.0.0 libtool: install: (cd /<>/debian/tmp/usr/lib/powerpc64le-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/powerpc64le-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/powerpc64le-linux-gnu/libgtop-2.0.la libtool: install: /usr/bin/install -c .libs/libgtop-2.0.a /<>/debian/tmp/usr/lib/powerpc64le-linux-gnu/libgtop-2.0.a libtool: install: chmod 644 /<>/debian/tmp/usr/lib/powerpc64le-linux-gnu/libgtop-2.0.a libtool: install: ranlib /<>/debian/tmp/usr/lib/powerpc64le-linux-gnu/libgtop-2.0.a libtool: warning: remember to run 'libtool --finish /usr/lib/powerpc64le-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/powerpc64le-linux-gnu/girepository-1.0' /usr/bin/install -c -m 644 GTop-2.0.typelib '/<>/debian/tmp/usr/lib/powerpc64le-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/powerpc64le-linux-gnu/pkgconfig' /usr/bin/install -c -m 644 libgtop-2.0.pc '/<>/debian/tmp/usr/lib/powerpc64le-linux-gnu/pkgconfig' make[3]: Leaving directory '/<>' make[2]: Leaving directory '/<>' make[1]: Leaving directory '/<>' debian/rules override_dh_install make[1]: Entering directory '/<>' find debian/tmp -name '*.la' -print -delete debian/tmp/usr/lib/powerpc64le-linux-gnu/libgtop-2.0.la 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 '/<>' debian/rules override_dh_missing make[1]: Entering directory '/<>' dh_missing --list-missing dh_missing: usr/share/info/libgtop2.info exists in debian/tmp but is not installed to anywhere The following debhelper tools have reported what they installed (with files per package) * dh_install: gir1.2-gtop-2.0 (1), libgtop-2.0-11 (2), libgtop2-common (1), libgtop2-dev (5), libgtop2-doc (1) * dh_installdocs: gir1.2-gtop-2.0 (0), libgtop-2.0-11 (3), libgtop2-common (0), libgtop2-dev (0), libgtop2-doc (0) If the missing files are installed by another tool, please file a bug against it. When filing the report, if the tool is not part of debhelper itself, please reference the "Logging helpers and dh_missing" section from the "PROGRAMMING" guide for debhelper (10.6.3+). (in the debhelper package: /usr/share/doc/debhelper/PROGRAMMING.gz) Be sure to test with dpkg-buildpackage -A/-B as the results may vary when only a subset is built For a short-term work-around: Add the files to debian/not-installed make[1]: Leaving directory '/<>' 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 libgtop-2.0-11: substitution variable ${gnome:NextVersion} unused, but is defined dpkg-gencontrol: warning: package libgtop-2.0-11: substitution variable ${gnome:Version} unused, but is defined dpkg-gencontrol: warning: package gir1.2-gtop-2.0: substitution variable ${gnome:NextVersion} unused, but is defined dpkg-gencontrol: warning: package gir1.2-gtop-2.0: substitution variable ${gnome:Version} unused, but is defined dpkg-gencontrol: warning: package libgtop2-dev: substitution variable ${gnome:NextVersion} unused, but is defined dpkg-gencontrol: warning: package libgtop2-dev: substitution variable ${gnome:Version} unused, but is defined dpkg-gencontrol: warning: package libgtop-2.0-11: substitution variable ${gnome:NextVersion} unused, but is defined dpkg-gencontrol: warning: package libgtop-2.0-11: substitution variable ${gnome:Version} unused, but is defined dh_md5sums -a dh_builddeb -a INFO: pkgstriptranslations version 143 INFO: pkgstriptranslations version 143 INFO: pkgstriptranslations version 143 INFO: pkgstriptranslations version 143 pkgstriptranslations: processing gir1.2-gtop-2.0 (in debian/gir1.2-gtop-2.0); do_strip: 1, oemstrip: pkgstriptranslations: processing libgtop-2.0-11-dbgsym (in debian/.debhelper/libgtop-2.0-11/dbgsym-root); 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: gir1.2-gtop-2.0 does not contain translations, skipping pkgstriptranslations: preparing translation tarball libgtop2_2.38.0-4_ppc64el_translations.tar.gz...done pkgmaintainermangler: Maintainer field overridden to "Ubuntu Developers " 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) ... INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... pkgstriptranslations: libgtop-2.0-11-dbgsym does not contain translations, skipping pkgstriptranslations: no translation files, not creating tarball pkgmaintainermangler: Maintainer field overridden to "Ubuntu Developers " 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 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-4_ppc64el.deb'. Renaming libgtop-2.0-11-dbgsym_2.38.0-4_ppc64el.deb to libgtop-2.0-11-dbgsym_2.38.0-4_ppc64el.ddeb INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... pkgstriptranslations: libgtop-2.0-11 does not contain translations, skipping pkgstriptranslations: no translation files, not creating tarball pkgmaintainermangler: Maintainer field overridden to "Ubuntu Developers " pkgstripfiles: processing control file: debian/libgtop-2.0-11/DEBIAN/control, package libgtop-2.0-11, directory debian/libgtop-2.0-11 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-4_ppc64el.deb'. INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... INFO: pkgstripfiles: waiting for lock (gir1.2-gtop-2.0) ... pkgstriptranslations: libgtop2-dev does not contain translations, skipping pkgstriptranslations: no translation files, not creating tarball pkgmaintainermangler: Maintainer field overridden to "Ubuntu Developers " 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-4_ppc64el.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-4_ppc64el.deb'. dpkg-genbuildinfo --build=any dpkg-genchanges --build=any -mLaunchpad Build Daemon >../libgtop2_2.38.0-4_ppc64el.changes dpkg-genchanges: info: binary-only arch-specific upload (source code and arch-indep packages not included) dpkg-source --after-build . dpkg-buildpackage: info: binary-only upload (no source included) -------------------------------------------------------------------------------- Build finished at 20181228-1315 Finished -------- I: Built successfully +------------------------------------------------------------------------------+ | Post Build Chroot | +------------------------------------------------------------------------------+ +------------------------------------------------------------------------------+ | Changes | +------------------------------------------------------------------------------+ libgtop2_2.38.0-4_ppc64el.changes: ---------------------------------- Format: 1.8 Date: Thu, 27 Dec 2018 22:58:54 -0500 Source: libgtop2 Binary: libgtop-2.0-11 libgtop2-dev libgtop2-common libgtop2-doc gir1.2-gtop-2.0 Architecture: ppc64el ppc64el_translations Version: 2.38.0-4 Distribution: disco-proposed Urgency: medium Maintainer: Launchpad Build Daemon Changed-By: Jeremy Bicha 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-4) unstable; urgency=medium . [ Andrea Azzarone ] * Add mountlist-ignore-snap-squashfs.patch: - Ignore snap mounts to keep them from showing in gnome-system-monitor (LP: #1749007) Checksums-Sha1: 213259cd6db5d4a39bf6f9ff825ba667c13c6355 12912 gir1.2-gtop-2.0_2.38.0-4_ppc64el.deb d12a2fbfa99bc9c9637d430d80f212746b342695 183652 libgtop-2.0-11-dbgsym_2.38.0-4_ppc64el.ddeb ae517add0feaf86e74dbb8603287aa521f49997e 39708 libgtop-2.0-11_2.38.0-4_ppc64el.deb 29ede9ee83d8f4a25a16d054b93b0523419024b5 63960 libgtop2-dev_2.38.0-4_ppc64el.deb 9fddb7d7e6b99d54c6d78b7bbd1af0ea56db6469 11014 libgtop2_2.38.0-4_ppc64el.buildinfo fdd8186c92c2ad22bc0f99e1aa689b22de836efa 96485 libgtop2_2.38.0-4_ppc64el_translations.tar.gz Checksums-Sha256: 4e34358e5b18609af5884a61b70fc4f5781a778484623d1dbae9afc66f743b09 12912 gir1.2-gtop-2.0_2.38.0-4_ppc64el.deb 4689b88c8b020ba2a22b990bf1fd51d88d56a96bc25f86e7d61eb35ed1c19209 183652 libgtop-2.0-11-dbgsym_2.38.0-4_ppc64el.ddeb 4a69076015fc5a0f75fd9201d0c213a939ab7a8ec8d8191f8356916ed81658b7 39708 libgtop-2.0-11_2.38.0-4_ppc64el.deb 138ae7574550de4df32d8947d393327b3aa993cf1f2b29da3dc85007563bf0b7 63960 libgtop2-dev_2.38.0-4_ppc64el.deb 6138e225a087cc93761ad9022248688f199c9dd6ebb4ad42d5c43fd10db033f9 11014 libgtop2_2.38.0-4_ppc64el.buildinfo 5cf93d3722928e8d86db25de9900bb5d7937eefc08415b3bc2cef7c79e9cb28d 96485 libgtop2_2.38.0-4_ppc64el_translations.tar.gz Files: fa2a4f394c63bb4b1df6db8ed55ae0c4 12912 introspection optional gir1.2-gtop-2.0_2.38.0-4_ppc64el.deb ce6b2a8f33a305f9b5417486e3a2e04c 183652 debug optional libgtop-2.0-11-dbgsym_2.38.0-4_ppc64el.ddeb 2c2e1e58b9f1a0eb6980e7cac2eb283b 39708 libs optional libgtop-2.0-11_2.38.0-4_ppc64el.deb f09c49017eaff0df312a7f1413e0d2a9 63960 libdevel optional libgtop2-dev_2.38.0-4_ppc64el.deb b8eebba4e20f1ee08dd5b312192ff8f6 11014 libs optional libgtop2_2.38.0-4_ppc64el.buildinfo 6776213e556bff1a8d9f8706aaba2fa4 96485 raw-translations - libgtop2_2.38.0-4_ppc64el_translations.tar.gz +------------------------------------------------------------------------------+ | Package contents | +------------------------------------------------------------------------------+ gir1.2-gtop-2.0_2.38.0-4_ppc64el.deb ------------------------------------ new debian package, version 2.0. size 12912 bytes: control archive=776 bytes. 655 bytes, 17 lines control 172 bytes, 2 lines md5sums Package: gir1.2-gtop-2.0 Source: libgtop2 Version: 2.38.0-4 Architecture: ppc64el Maintainer: Ubuntu Developers Original-Maintainer: Debian GNOME Maintainers 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. drwxr-xr-x root/root 0 2018-12-28 03:58 ./ drwxr-xr-x root/root 0 2018-12-28 03:58 ./usr/ drwxr-xr-x root/root 0 2018-12-28 03:58 ./usr/lib/ drwxr-xr-x root/root 0 2018-12-28 03:58 ./usr/lib/powerpc64le-linux-gnu/ drwxr-xr-x root/root 0 2018-12-28 03:58 ./usr/lib/powerpc64le-linux-gnu/girepository-1.0/ -rw-r--r-- root/root 47152 2018-12-28 03:58 ./usr/lib/powerpc64le-linux-gnu/girepository-1.0/GTop-2.0.typelib drwxr-xr-x root/root 0 2018-12-28 03:58 ./usr/share/ drwxr-xr-x root/root 0 2018-12-28 03:58 ./usr/share/doc/ drwxr-xr-x root/root 0 2018-12-28 03:58 ./usr/share/doc/gir1.2-gtop-2.0/ lrwxrwxrwx root/root 0 2018-12-28 03:58 ./usr/share/doc/gir1.2-gtop-2.0/changelog.Debian.gz -> ../libgtop-2.0-11/changelog.Debian.gz -rw-r--r-- root/root 3290 2018-12-28 03:58 ./usr/share/doc/gir1.2-gtop-2.0/copyright libgtop-2.0-11_2.38.0-4_ppc64el.deb ----------------------------------- new debian package, version 2.0. size 39708 bytes: control archive=1400 bytes. 632 bytes, 16 lines control 454 bytes, 6 lines md5sums 42 bytes, 1 lines shlibs 2857 bytes, 81 lines symbols 70 bytes, 2 lines triggers Package: libgtop-2.0-11 Source: libgtop2 Version: 2.38.0-4 Architecture: ppc64el Maintainer: Ubuntu Developers Original-Maintainer: Debian GNOME Maintainers Installed-Size: 164 Depends: libc6 (>= 2.17), libglib2.0-0 (>= 2.18.0), libxau6, libgtop2-common (>= 2.38.0-4) 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. drwxr-xr-x root/root 0 2018-12-28 03:58 ./ drwxr-xr-x root/root 0 2018-12-28 03:58 ./usr/ drwxr-xr-x root/root 0 2018-12-28 03:58 ./usr/lib/ drwxr-xr-x root/root 0 2018-12-28 03:58 ./usr/lib/powerpc64le-linux-gnu/ lrwxrwxrwx root/root 0 2018-12-28 03:58 ./usr/lib/powerpc64le-linux-gnu/libgtop-2.0.so.11 -> libgtop-2.0.so.11.0.0 -rw-r--r-- root/root 133072 2018-12-28 03:58 ./usr/lib/powerpc64le-linux-gnu/libgtop-2.0.so.11.0.0 drwxr-xr-x root/root 0 2018-12-28 03:58 ./usr/share/ drwxr-xr-x root/root 0 2018-12-28 03:58 ./usr/share/doc/ drwxr-xr-x root/root 0 2018-12-28 03:58 ./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 839 2018-12-28 03:58 ./usr/share/doc/libgtop-2.0-11/changelog.Debian.gz -rw-r--r-- root/root 3290 2018-12-28 03:58 ./usr/share/doc/libgtop-2.0-11/copyright libgtop2-dev_2.38.0-4_ppc64el.deb --------------------------------- new debian package, version 2.0. size 63960 bytes: control archive=1868 bytes. 649 bytes, 16 lines control 3420 bytes, 45 lines md5sums Package: libgtop2-dev Source: libgtop2 Version: 2.38.0-4 Architecture: ppc64el Maintainer: Ubuntu Developers Original-Maintainer: Debian GNOME Maintainers Installed-Size: 556 Depends: libgtop-2.0-11 (= 2.38.0-4), gir1.2-gtop-2.0 (= 2.38.0-4), 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. drwxr-xr-x root/root 0 2018-12-28 03:58 ./ drwxr-xr-x root/root 0 2018-12-28 03:58 ./usr/ drwxr-xr-x root/root 0 2018-12-28 03:58 ./usr/include/ drwxr-xr-x root/root 0 2018-12-28 03:58 ./usr/include/libgtop-2.0/ -rw-r--r-- root/root 3841 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop.h drwxr-xr-x root/root 0 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/ -rw-r--r-- root/root 1142 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/close.h -rw-r--r-- root/root 2917 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/command.h -rw-r--r-- root/root 3228 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/cpu.h -rw-r--r-- root/root 2079 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/fsusage.h -rw-r--r-- root/root 1659 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/global.h -rw-r--r-- root/root 4523 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/gnuserv.h -rw-r--r-- root/root 2039 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/loadavg.h -rw-r--r-- root/root 2155 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/mem.h -rw-r--r-- root/root 2478 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/mountlist.h -rw-r--r-- root/root 2258 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/msg_limits.h -rw-r--r-- root/root 2518 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/netlist.h -rw-r--r-- root/root 4086 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/netload.h -rw-r--r-- root/root 2102 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/open.h -rw-r--r-- root/root 1658 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/parameter.h -rw-r--r-- root/root 2017 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/ppp.h -rw-r--r-- root/root 1862 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/procaffinity.h -rw-r--r-- root/root 2314 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/procargs.h -rw-r--r-- root/root 2950 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/procio.h -rw-r--r-- root/root 2746 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/prockernel.h -rw-r--r-- root/root 5038 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/proclist.h -rw-r--r-- root/root 3804 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/procmap.h -rw-r--r-- root/root 2433 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/procmem.h -rw-r--r-- root/root 3982 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/procopenfiles.h -rw-r--r-- root/root 2634 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/procsegment.h -rw-r--r-- root/root 2207 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/procsignal.h -rw-r--r-- root/root 3043 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/procstate.h -rw-r--r-- root/root 3920 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/proctime.h -rw-r--r-- root/root 3160 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/procuid.h -rw-r--r-- root/root 1968 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/procwd.h -rw-r--r-- root/root 2472 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/sem_limits.h -rw-r--r-- root/root 2496 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/shm_limits.h -rw-r--r-- root/root 1231 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/signal.h -rw-r--r-- root/root 1978 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/swap.h -rw-r--r-- root/root 3836 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/sysdeps.h -rw-r--r-- root/root 1667 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/sysinfo.h -rw-r--r-- root/root 2626 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/union.h -rw-r--r-- root/root 1886 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop/uptime.h -rw-r--r-- root/root 1023 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop_machine.h -rw-r--r-- root/root 1813 2018-12-28 03:58 ./usr/include/libgtop-2.0/glibtop_server.h -rw-r--r-- root/root 176 2018-12-28 03:58 ./usr/include/libgtop-2.0/libgtopconfig.h drwxr-xr-x root/root 0 2018-12-28 03:58 ./usr/lib/ drwxr-xr-x root/root 0 2018-12-28 03:58 ./usr/lib/powerpc64le-linux-gnu/ -rw-r--r-- root/root 222686 2018-12-28 03:58 ./usr/lib/powerpc64le-linux-gnu/libgtop-2.0.a lrwxrwxrwx root/root 0 2018-12-28 03:58 ./usr/lib/powerpc64le-linux-gnu/libgtop-2.0.so -> libgtop-2.0.so.11.0.0 drwxr-xr-x root/root 0 2018-12-28 03:58 ./usr/lib/powerpc64le-linux-gnu/pkgconfig/ -rw-r--r-- root/root 272 2018-12-28 03:58 ./usr/lib/powerpc64le-linux-gnu/pkgconfig/libgtop-2.0.pc drwxr-xr-x root/root 0 2018-12-28 03:58 ./usr/share/ drwxr-xr-x root/root 0 2018-12-28 03:58 ./usr/share/doc/ drwxr-xr-x root/root 0 2018-12-28 03:58 ./usr/share/doc/libgtop2-dev/ lrwxrwxrwx root/root 0 2018-12-28 03:58 ./usr/share/doc/libgtop2-dev/changelog.Debian.gz -> ../libgtop-2.0-11/changelog.Debian.gz -rw-r--r-- root/root 3290 2018-12-28 03:58 ./usr/share/doc/libgtop2-dev/copyright drwxr-xr-x root/root 0 2018-12-28 03:58 ./usr/share/gir-1.0/ -rw-r--r-- root/root 195676 2018-12-28 03:58 ./usr/share/gir-1.0/GTop-2.0.gir +------------------------------------------------------------------------------+ | Post Build | +------------------------------------------------------------------------------+ +------------------------------------------------------------------------------+ | Cleanup | +------------------------------------------------------------------------------+ Purging /<> Not removing build depends: as requested +------------------------------------------------------------------------------+ | Summary | +------------------------------------------------------------------------------+ Build Architecture: ppc64el Build-Space: 26484 Build-Time: 71 Distribution: disco-proposed Host Architecture: ppc64el Install-Time: 31 Job: libgtop2_2.38.0-4.dsc Machine Architecture: ppc64el Package: libgtop2 Package-Time: 103 Source-Version: 2.38.0-4 Space: 26484 Status: successful Version: 2.38.0-4 -------------------------------------------------------------------------------- Finished at 20181228-1315 Build needed 00:01:43, 26484k disc space RUN: /usr/share/launchpad-buildd/slavebin/in-target scan-for-processes --backend=chroot --series=disco --arch=ppc64el PACKAGEBUILD-16210574 Scanning for processes to kill in build PACKAGEBUILD-16210574