Exposes the processor model

Accessing processor model becomes easier

Signed off: Dr. James Dominic P. Guana <jdpguana@histark.com>
This commit is contained in:
Dr. James Dominic P. Guana
2021-08-20 19:08:15 +08:00
committed by Robert Roth
parent 04bf093412
commit 629097436a
4 changed files with 12 additions and 5 deletions

View File

@@ -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);
}