PDA

View Full Version : kernel msr module



seeker010
10th February 2007, 10:16 AM
how do you read information from /dev/cpu/0/msr or /dev/cpu/0/cpuid?
(after modprobe cpuid and modprobe msr)

I tried


fseek(fmsr,index,SEEK_SET)
read(fmsr,buf,bufsize);
where fmsr is the file pointer to /dev/cpu/0/msr, index is the offset, buf is the buffer, and buffsize is the size of it

but it doesn't read anything; if I add
perror(NULL); I get
Invalid argument

any ideas?