diff options
author | Dr. James Dominic P. Guana <jdpguana@histark.com> | 2021-08-20 19:08:15 +0800 |
---|---|---|
committer | Robert Roth <robert.roth.off@gmail.com> | 2022-03-28 12:32:26 +0000 |
commit | 629097436a2c654402e2a5210a2a0b4ca217b42c (patch) | |
tree | 86af25d46026ac741821f123fc75ee215f42ff54 /examples/sysinfo.c | |
parent | 04bf09341203173bc2ee6ff1cd990cc78c2c38c0 (diff) | |
download | libgtop-629097436a2c654402e2a5210a2a0b4ca217b42c.tar.gz |
Exposes the processor model
Accessing processor model becomes easier
Signed off: Dr. James Dominic P. Guana <jdpguana@histark.com>
Diffstat (limited to 'examples/sysinfo.c')
-rw-r--r-- | examples/sysinfo.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/sysinfo.c b/examples/sysinfo.c index ed6fb162..40eed37a 100644 --- a/examples/sysinfo.c +++ b/examples/sysinfo.c @@ -32,10 +32,16 @@ int main (int argc, char *argv []) { - const glibtop_sysinfo * sysinfo = glibtop_get_sysinfo (); + const glibtop_sysinfo * sysinfo; + + glibtop_init(); + + sysinfo = glibtop_get_sysinfo (); printf ("\nProcessor Model: %s\n", sysinfo->model); printf ("Number of Cores: %d\n\n", sysinfo->ncpu); + glibtop_close (); + exit (0); } |