diff options
author | James Dominic P. Guana <guana.histark@gmail.com> | 2021-08-21 16:20:52 +0000 |
---|---|---|
committer | Robert Roth <robert.roth.off@gmail.com> | 2022-03-28 12:32:26 +0000 |
commit | 3d7870c961e41f99ad31caf2c4bcbc875fce40a7 (patch) | |
tree | f12e1baf49e8f1ebd20fef928693ba00c31ff6fc | |
parent | f92f6ea029e62023aecb7a29d98f102e7e13f544 (diff) | |
download | libgtop-3d7870c961e41f99ad31caf2c4bcbc875fce40a7.tar.gz |
Add sysinfo example
Retrieve cpu model via hashtable & number of logical cpu via exposed variable
Signed off: Dr. James Dominic P. Guana <jdpguana@histark.com>
-rw-r--r-- | examples/sysinfo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/sysinfo.c b/examples/sysinfo.c index f1350cdd..3c570e9f 100644 --- a/examples/sysinfo.c +++ b/examples/sysinfo.c @@ -39,10 +39,10 @@ main (int argc, char *argv []) sysinfo = glibtop_get_sysinfo (); model = g_hash_table_lookup (sysinfo->cpuinfo [1].values, "model name"); - printf ("\nProcessor Model: %s\n", g_strdup (model)); - printf ("Number of Cores: %d\n\n", sysinfo->ncpu); + printf ("\nProcessor Model: %s\n", g_strdup (model)); + printf ("Number of Cores: %d\n\n", sysinfo->ncpu); glibtop_close (); - exit (0); + exit (0); } |