I am trying to read some basic information about the device (in Solaris machine) like no. of CPUs, no. of HDDs, no. of Network adapters etc ...
From what I understand, we cannot get these information directly from Java. (Correct me if I am wrong).
So, the workaround is by calling JNI calls.
Now, how do I code this in C/C++ ? Is there any existing system call/ method in C to get these information ?
I am trying to avoid using system() method in C because I want to store the information as a string.
I am aware that there are shell commands like iostat, kstat, ifconfig etc ... But how do I simulate them in my C/C++ program ?
Thanks,