I have an Athlon 64 X2 processor and i am curious on how i can write a simple Visual Basic program that reads the frequency of each core (similar to "amd clock" program).
I have some knowledge about programming but i can not figure out what
should i download in terms of libraries/drivers/SDK that are specific to the
Athlon 64 X2.
So, except Visual Studio what else (CPU SDK, libraries etc) must i download?
Originally posted by: avk You'll need to read some MSDN online articles about Win32 API functions: QueryPerformanceCounter, QueryPerformanceFrequency, SetThreadAffinityMask and so on. All of these are available at www.msdn.com. Maybe you'll need to download the Platform SDK from the mentioned site. Good luck .
Thank you!
I will try that
While up at MSDN you might also try the Visual Basic forum. This link is a discussion which mentions RDTSC. Its not exactly what you're looking for but these folks are pretty low level.
http://forums.msdn.microsoft.com/en-US/vblanguage/thread/e0eda611-35f1-4f46-a414-c7830ff1d6f0
You could also check Framewave. I don't think it has a processor frequency function, but it does provide access to RDTSC and CPUID. Look at the file system.cpp in ..\Framewave\domain\fwBase\src. Framewave is available here: http://sourceforge.net/projects/framewave/ It is not Visual Basic, so you would have to figure out how to call in to it.
Regards,
Randy [AMD]
Originally posted by: avk You'll need to read some MSDN online articles about Win32 API functions: QueryPerformanceCounter, QueryPerformanceFrequency, SetThreadAffinityMask and so on. All of these are available at www.msdn.com. Maybe you'll need to download the Platform SDK from the mentioned site. Good luck .
Do you know about linux same functions
especially the SetThreadAffinityMask?
Thanks for this Tips !!!!!!!!!!
I am trying to show you that how how to read CPU clock
I hope it will work for you.
You can use the managed WMI classes found in the System.Managment namespace to obtain the # of CPU, speed, stepping, etc...
System.Management.ManagementScope ms = new System.Management.ManagementScope("\\\\localhost\\root\\cimv2");
System.Management.ObjectQuery oq = new System.Management.ObjectQuery("SELECT * FROM Win32_Processor");
ManagementObjectSearcher query = new ManagementObjectSearcher(ms, oq);
ManagementObjectCollection queryCollection = query.Get();
foreach (ManagementObject mo in queryCollection)
{
if (3 == Convert.ToUInt16(mo["ProcessorType"], System.Globalization.CultureInfo.InvariantCulture))
{
foreach (PropertyData prop in mo.Properties)
{
switch (prop.Name)
{
case "CurrentClockSpeed":
clockSpeed = prop.Value;
break;
}
}
}
}
mk678 - good idea!
thanks you guys, I'm also looking for something like this but for Linux machines.
Edit: Removed Advertising from the post
I'm also looking for something similar on a linux machine. I'll let you know if I work it out.
mk678, I've tried and working!
Thank you.
There are some softwares to read CPU clock. I used it before but lost the file.
Edit:Removed Advertising from the post