diff options
author | Benoît Dejean <bdejean@src.gnome.org> | 2004-09-21 09:41:34 +0000 |
---|---|---|
committer | Benoît Dejean <bdejean@src.gnome.org> | 2004-09-21 09:41:34 +0000 |
commit | 488240588536bdfd6908a4ac3505964e2b8ac149 (patch) | |
tree | d215d6c961707e23f3dab36da59961d852e0d968 | |
parent | 5b15a2d1a54cb1bf6ccad40edd8f1211e235be79 (diff) | |
download | libgtop-488240588536bdfd6908a4ac3505964e2b8ac149.tar.gz |
Updated.
* pprint.c: (pprint_get_swap), (main): Updated.
-rw-r--r-- | examples/ChangeLog | 4 | ||||
-rw-r--r-- | examples/pprint.c | 22 |
2 files changed, 25 insertions, 1 deletions
diff --git a/examples/ChangeLog b/examples/ChangeLog index 3c2c7eea..8f865934 100644 --- a/examples/ChangeLog +++ b/examples/ChangeLog @@ -1,5 +1,9 @@ 2004-09-21 Benoît Dejean <tazforever@dlfp.org> + * pprint.c: (pprint_get_swap), (main): Updated. + +2004-09-21 Benoît Dejean <tazforever@dlfp.org> + * procargs.c: (show_args), (main): Updated. 2004-09-21 Benoît Dejean <tazforever@dlfp.org> diff --git a/examples/pprint.c b/examples/pprint.c index 8b6fc815..96e67ee4 100644 --- a/examples/pprint.c +++ b/examples/pprint.c @@ -180,6 +180,24 @@ static void pprint_get_netload(const char *iface) +static void pprint_get_swap() +{ + 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() { glibtop_uptime buf; @@ -211,10 +229,12 @@ int main() pprint_get_msg_limits(); - pprint_get_netload("lo"); +/* pprint_get_netload("lo"); */ + pprint_get_swap(); +/* pprint_get_sysinfo(); */ pprint_get_uptime(); |