[libgtop] Add sysinfo example
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgtop] Add sysinfo example
- Date: Mon, 28 Mar 2022 12:45:36 +0000 (UTC)
commit 3d7870c961e41f99ad31caf2c4bcbc875fce40a7
Author: James Dominic P. Guana <guana histark gmail com>
Date: Sat Aug 21 16:20:52 2021 +0000
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>
examples/sysinfo.c | 6 +++---
1 file 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]