Is there any C API for knowing the Hardware Configuration like CPU Number , CPU clock Speed , Total Memory , Size of Swap partion , Disk Size etc . If so please do help . It would be a great help, really stuggling to find it out .
Is there any C API for knowing the Hardware Configuration like CPU Number , CPU clock Speed , Total Memory , Size of Swap partion , Disk Size etc . If so please do help . It would be a great help, really stuggling to find it out .
Yeah Like the Win API , does WIN API supports such functionality
you could try researching snmp.
it can give you all this info and you can access it remotely.
you have to install server and clients, and there's a c library. probably more than what you want.
www.net-snmp.com
I'm guessing that this is a Linux/Unix OS. You might want to look up the code for the free and df commands for figuring out the total mem and partition information. Usually you can find the source code somewhere on the system if you do a find, and if not I'm sure you can find it on the web. I don't know of an API per say, but you can most likely find this code somewhere on your system.
I'm sorry to say the only way I know of of getting CPU information is to write assembly macros. Then again, I've been known to be wrong before.
starX
www.axisoftime.com
skumar I take it you are running some version of windows. Yes the api can do all of this. However, some of the stuff you want isn't well documented and does require a bit of looking around.