Using standard C library sysconf is very simple.

See all about sysconf.

The source code is this:

I use stdio.h and unistd.h libs. Also, I have two vars tmp and tmp2.

This vars will take the result of _SC_NPROCESSORS_CONF and _SC_CLK_TCK using sysconf.

Use the gcc to make binary.

… run it and we see the output.

We can also use all of these available parameters.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.