Code Monkey home page Code Monkey logo

i7z's Introduction

i7z's People

Contributors

ajaiantilal avatar raininja avatar rm-hull avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

i7z's Issues

New CPU data

I ran the cmdline version, and saw the output below.

i7z DEBUG: i7z version: svn-r77-(20-Nov-2011)
i7z DEBUG: Found Intel Processor
i7z DEBUG:    Stepping 3
i7z DEBUG:    Model c
i7z DEBUG:    Family 6
i7z DEBUG:    Processor Type 0
i7z DEBUG:    Extended Model 3
i7z DEBUG: msr = Model Specific Register
i7z DEBUG: detected a newer model of ivy bridge processor
i7z DEBUG: my coder doesn't know about it, can you send the following info to him?
i7z DEBUG: model c, extended model 3, proc_family 6
i7z DEBUG: msr device files exist /dev/cpu/*/msr
i7z DEBUG: You have write permissions to msr device files

------------------------------
--[core id]--- Other information
-------------------------------------
--[0] Processor number 0
--[0] Socket number/Hyperthreaded Sibling number  0,1
--[0] Core id number 0
--[0] Display core in i7z Tool: Yes

--[1] Processor number 1
--[1] Socket number/Hyperthreaded Sibling number  0,0
--[1] Core id number 0
--[1] Display core in i7z Tool: No

--[2] Processor number 2
--[2] Socket number/Hyperthreaded Sibling number  0,3
--[2] Core id number 1
--[2] Display core in i7z Tool: Yes

--[3] Processor number 3
--[3] Socket number/Hyperthreaded Sibling number  0,2
--[3] Core id number 1
--[3] Display core in i7z Tool: No

--[4] Processor number 4
--[4] Socket number/Hyperthreaded Sibling number  0,5
--[4] Core id number 2
--[4] Display core in i7z Tool: Yes

--[5] Processor number 5
--[5] Socket number/Hyperthreaded Sibling number  0,4
--[5] Core id number 2
--[5] Display core in i7z Tool: No

--[6] Processor number 6
--[6] Socket number/Hyperthreaded Sibling number  0,7
--[6] Core id number 3
--[6] Display core in i7z Tool: Yes

--[7] Processor number 7
--[7] Socket number/Hyperthreaded Sibling number  0,6
--[7] Core id number 3
--[7] Display core in i7z Tool: No

Socket-0 [num of cpus 4 physical 4 logical 8] 6,
Socket-1 [num of cpus 0 physical 0 logical 0]
GUI has been Turned ON
Logging is OFF
i7z DEBUG: Single Socket Detected
i7z DEBUG: In i7z Single_Socket()
i7z DEBUG: guessing Nehalem

accuracy of i7z using haswell i7-3790k

Can you comment on the accuracy of the temp readings for this i7-4790K running at stock settings on an MSI Z97 MPOWER MAX motherboard? Here I am running prime95 using small FFTs.

The temps are ~25C higher than windows tools report running the same prime95 small FFTs.

Small FFTs prime95 windows:

load

Small FFTs mprime linux:

% sudo i7z
i7z DEBUG: i7z version: svn-r93-(27-MAY-2013)
i7z DEBUG: Found Intel Processor
i7z DEBUG:    Stepping 3
i7z DEBUG:    Model c
i7z DEBUG:    Family 6
i7z DEBUG:    Processor Type 0
i7z DEBUG:    Extended Model 3
i7z DEBUG: msr = Model Specific Register
i7z DEBUG: Detected an i7 - 22nm (haswell)
i7z DEBUG: msr device files exist /dev/cpu/*/msr
i7z DEBUG: You have write permissions to msr device files

------------------------------
--[core id]--- Other information
-------------------------------------
--[0] Processor number 0
--[0] Socket number/Hyperthreaded Sibling number  0,4
--[0] Core id number 0
--[0] Display core in i7z Tool: Yes

--[1] Processor number 1
--[1] Socket number/Hyperthreaded Sibling number  0,5
--[1] Core id number 1
--[1] Display core in i7z Tool: Yes

--[2] Processor number 2
--[2] Socket number/Hyperthreaded Sibling number  0,6
--[2] Core id number 2
--[2] Display core in i7z Tool: Yes

--[3] Processor number 3
--[3] Socket number/Hyperthreaded Sibling number  0,7
--[3] Core id number 3
--[3] Display core in i7z Tool: Yes

--[4] Processor number 4
--[4] Socket number/Hyperthreaded Sibling number  0,0
--[4] Core id number 0
--[4] Display core in i7z Tool: No

--[5] Processor number 5
--[5] Socket number/Hyperthreaded Sibling number  0,1
--[5] Core id number 1
--[5] Display core in i7z Tool: No

--[6] Processor number 6
--[6] Socket number/Hyperthreaded Sibling number  0,2
--[6] Core id number 2
--[6] Display core in i7z Tool: No

--[7] Processor number 7
--[7] Socket number/Hyperthreaded Sibling number  0,3
--[7] Core id number 3
--[7] Display core in i7z Tool: No

Socket-0 [num of cpus 4 physical 4 logical 8] 3,
Socket-1 [num of cpus 0 physical 0 logical 0] 
GUI has been Turned ON

Cpu speed from cpuinfo 3999.00Mhz
cpuinfo might be wrong if cpufreq is enabled. To guess correctly try estimating via tsc
Linux's inbuilt cpu_khz code emulated now
True Frequency (without accounting Turbo) 3999 MHz
  CPU Multiplier 40x || Bus clock frequency (BCLK) 99.97 MHz

Socket [0] - [physical cores=4, logical cores=8, max online cores ever=4]
  TURBO ENABLED on 4 Cores, Hyper Threading ON
  Max Frequency without considering Turbo 4098.97 MHz (99.97 x [41])
  Max TURBO Multiplier (if Enabled) with 1/2/3/4 Cores is  44x/44x/44x/44x
  Real Current Frequency 4233.51 MHz [99.97 x 42.35] (Max of below)
        Core [core-id]  :Actual Freq (Mult.)      C0%   Halt(C1)%  C3 %   C6 %   C7 %  Temp      VCore
        Core 1 [0]:       4233.50 (42.35x)      99.8       0       0       0       0    95      1.2809
        Core 2 [1]:       4233.51 (42.35x)      99.8       0       0       0       0    99      1.2798
        Core 3 [2]:       4233.51 (42.35x)      99.8       0       0       0       0    98      1.2798
        Core 4 [3]:       4233.50 (42.35x)      99.8       0       0       0       0    89      1.2826

Sandy Bridge recognized as Haswell & C7 state not showing

Compiled last git, I am on Lenovo X220 with Sandy Bridge CPU : i7-2620M
cpuid here : http://pastebin.com/3tJPsHTr

i7z guesses Nehalem instead of SandyBridge and, in the ncurse gui C7 state is not shown, only C6 :

[sheepdestroyer@sheepora ~] $ sudo i7z
[sudo] password for sheepdestroyer: 
i7z DEBUG: i7z version: svn-r93-(27-MAY-2013)
i7z DEBUG: Found Intel Processor
i7z DEBUG:    Stepping 7
i7z DEBUG:    Model a
i7z DEBUG:    Family 6
i7z DEBUG:    Processor Type 0
i7z DEBUG:    Extended Model 2
i7z DEBUG: msr = Model Specific Register
i7z DEBUG: msr device files exist /dev/cpu/*/msr
i7z DEBUG: You have write permissions to msr device files

------------------------------
--[core id]--- Other information
-------------------------------------
--[0] Processor number 0
--[0] Socket number/Hyperthreaded Sibling number  0,1
--[0] Core id number 0
--[0] Display core in i7z Tool: Yes

--[1] Processor number 1
--[1] Socket number/Hyperthreaded Sibling number  0,0
--[1] Core id number 0
--[1] Display core in i7z Tool: No

--[2] Processor number 2
--[2] Socket number/Hyperthreaded Sibling number  0,3
--[2] Core id number 1
--[2] Display core in i7z Tool: Yes

--[3] Processor number 3
--[3] Socket number/Hyperthreaded Sibling number  0,2
--[3] Core id number 1
--[3] Display core in i7z Tool: No

Socket-0 [num of cpus 2 physical 2 logical 4] 0,2,
Socket-1 [num of cpus 0 physical 0 logical 0] 
GUI has been Turned ON
i7z DEBUG: Single Socket Detected
i7z DEBUG: In i7z Single_Socket()
i7z DEBUG: guessing Nehalem

i7z works incorrectly if UEFI Secure Boot enabled

My PC:HP notebook,Core i5-1035G1 CPU.
Ubuntu 19.10/Debian 10.0(UEFI Secure Boot enabled):Execute "sudo i7z",it prompt:
WAIT ...
True Frequency (without accounting Turbo) 1190 MHz
wrmsr:pwrite:Operation not permitted
Quitting i7z

Linux(UEFI Secure Boot disabled):i7z works correctly.

Sandy Bridge X2960 Processor C-States Inaccurate

Using the latest git version C7-States as reported by Powertop and release version of i7z are shown in C1. Clarification which of these is more accurate would be helpful. System is Archlinux on 3.18

ncurses display misalignment

During the second refresh sometimes the ncurses ui becomes offset by +1 row.

This causes the ui to become unreadable and i7z must be restarted to remedy it.

Adding a touchwin(stdscr) call every n refreshes should clear this up.

Gui is not runnning

I have a dual socket Xeon sandy-bridge. The i7z is work but not the GUI. Both compiled with no errors. I already installed msrtools and msr-tools in ubuntu 12.10. Could you give me some light on this issue?

i7z DEBUG: i7z version: svn-r77-(20-Nov-2011)
i7z DEBUG: Found Intel Processor
i7z DEBUG:    Stepping 7
i7z DEBUG:    Model d
i7z DEBUG:    Family 6
i7z DEBUG:    Processor Type 0
i7z DEBUG:    Extended Model 2
i7z DEBUG: msr = Model Specific Register
i7z DEBUG: Detected an i7 - 32nm (haven't seen this version around, do write to me with the model number)
i7z DEBUG: msr device files exist /dev/cpu/*/msr
i7z DEBUG: You have write permissions to msr device files

i7z DEBUG

i7z DEBUG: Detected an i7 - 32nm (haven't seen this version around, do write to me with the model number)

It's a Intel Core i7 3820 4x 3.60GHz So.2011

Segmentation fault on Clear Linux

Hi. I'll trying to run i7z, but I get this error:

botnet@nsa~/i7z $ make -j8
rm -f .o i7z
gcc -g -O3 -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -m64 -fasynchronous-unwind-tables -Wp,-D_REENTRANT -ftree-loop-distribute-patterns -Wl,-z -Wl,now -Wl,-z -Wl,relro -fno-semantic-interposition -ffat-lto-objects -fno-trapping-math -Wl,-sort-common -Wl,--enable-new-dtags -mtune=skylake -fno-schedule-insns2 -fno-schedule-insns -fno-inline-small-functions -fno-caller-saves -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DBUILD_MAIN -Wimplicit-function-declaration -Dx64_BIT -c -o i7z.o i7z.c
gcc -g -O3 -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -m64 -fasynchronous-unwind-tables -Wp,-D_REENTRANT -ftree-loop-distribute-patterns -Wl,-z -Wl,now -Wl,-z -Wl,relro -fno-semantic-interposition -ffat-lto-objects -fno-trapping-math -Wl,-sort-common -Wl,--enable-new-dtags -mtune=skylake -fno-schedule-insns2 -fno-schedule-insns -fno-inline-small-functions -fno-caller-saves -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DBUILD_MAIN -Wimplicit-function-declaration -Dx64_BIT -c -o helper_functions.o helper_functions.c
gcc -g -O3 -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -m64 -fasynchronous-unwind-tables -Wp,-D_REENTRANT -ftree-loop-distribute-patterns -Wl,-z -Wl,now -Wl,-z -Wl,relro -fno-semantic-interposition -ffat-lto-objects -fno-trapping-math -Wl,-sort-common -Wl,--enable-new-dtags -mtune=skylake -fno-schedule-insns2 -fno-schedule-insns -fno-inline-small-functions -fno-caller-saves -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DBUILD_MAIN -Wimplicit-function-declaration -Dx64_BIT -c -o i7z_Single_Socket.o i7z_Single_Socket.c
gcc -g -O3 -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -m64 -fasynchronous-unwind-tables -Wp,-D_REENTRANT -ftree-loop-distribute-patterns -Wl,-z -Wl,now -Wl,-z -Wl,relro -fno-semantic-interposition -ffat-lto-objects -fno-trapping-math -Wl,-sort-common -Wl,--enable-new-dtags -mtune=skylake -fno-schedule-insns2 -fno-schedule-insns -fno-inline-small-functions -fno-caller-saves -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DBUILD_MAIN -Wimplicit-function-declaration -Dx64_BIT -c -o i7z_Dual_Socket.o i7z_Dual_Socket.c
If the compilation complains about not finding ncurses.h, install ncurses (libncurses5-dev on ubuntu/debian)
i7z.c: In function ‘logCpuFreq_single_ts’:
i7z.c:187:36: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘__time_t’ {aka ‘long int’} [-Wformat=]
187 | fprintf(fp_log_file_freq,"%d.%.9d\n",value->tv_sec,value->tv_nsec); //newline, replace \n with \t to get everything separated with tabs
| ~^ ~~~~~~~~~~~~~
| | |
| int __time_t {aka long int}
| %ld
i7z.c:187:41: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘__syscall_slong_t’ {aka ‘long int’} [-Wformat=]
187 | fprintf(fp_log_file_freq,"%d.%.9d\n",value->tv_sec,value->tv_nsec); //newline, replace \n with \t to get everything separated with tabs
| ~~~^ ~~~~~~~~~~~~~~
| | |
| int __syscall_slong_t {aka long int}
| %.9ld
i7z.c:191:36: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘__time_t’ {aka ‘long int’} [-Wformat=]
191 | fprintf(fp_log_file_freq,"%d.%.9d\t",value->tv_sec,value->tv_nsec);
| ~^ ~~~~~~~~~~~~~
| | |
| int __time_t {aka long int}
| %ld
i7z.c:191:41: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘__syscall_slong_t’ {aka ‘long int’} [-Wformat=]
191 | fprintf(fp_log_file_freq,"%d.%.9d\t",value->tv_sec,value->tv_nsec);
| ~~~^ ~~~~~~~~~~~~~~
| | |
| int __syscall_slong_t {aka long int}
| %.9ld
i7z.c: In function ‘logCpuFreq_dual_ts’:
i7z.c:267:42: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘__time_t’ {aka ‘long int’} [-Wformat=]
267 | fprintf(fp_log_file_freq_1,"%d.%.9d\n",value->tv_sec,value->tv_nsec); //newline, replace \n with \t to get everything separated with tabs
| ~^ ~~~~~~~~~~~~~
| | |
| int __time_t {aka long int}
| %ld
i7z.c:267:47: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘__syscall_slong_t’ {aka ‘long int’} [-Wformat=]
267 | fprintf(fp_log_file_freq_1,"%d.%.9d\n",value->tv_sec,value->tv_nsec); //newline, replace \n with \t to get everything separated with tabs
| ~~~^ ~~~~~~~~~~~~~~
| | |
| int __syscall_slong_t {aka long int}
| %.9ld
i7z.c:271:43: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘__time_t’ {aka ‘long int’} [-Wformat=]
271 | fprintf(fp_log_file_freq_1,"%d.%.9d\t",value->tv_sec,value->tv_nsec);
| ~^ ~~~~~~~~~~~~~
| | |
| int __time_t {aka long int}
| %ld
i7z.c:271:48: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘__syscall_slong_t’ {aka ‘long int’} [-Wformat=]
271 | fprintf(fp_log_file_freq_1,"%d.%.9d\t",value->tv_sec,value->tv_nsec);
| ~~~^ ~~~~~~~~~~~~~~
| | |
| int __syscall_slong_t {aka long int}
| %.9ld
i7z.c:276:42: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘__time_t’ {aka ‘long int’} [-Wformat=]
276 | fprintf(fp_log_file_freq_2,"%d.%.9d\n",value->tv_sec,value->tv_nsec); //newline, replace \n with \t to get everything separated with tabs
| ~^ ~~~~~~~~~~~~~
| | |
| int __time_t {aka long int}
| %ld
i7z.c:276:47: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘__syscall_slong_t’ {aka ‘long int’} [-Wformat=]
276 | fprintf(fp_log_file_freq_2,"%d.%.9d\n",value->tv_sec,value->tv_nsec); //newline, replace \n with \t to get everything separated with tabs
| ~~~^ ~~~~~~~~~~~~~~
| | |
| int __syscall_slong_t {aka long int}
| %.9ld
i7z.c:280:43: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘__time_t’ {aka ‘long int’} [-Wformat=]
280 | fprintf(fp_log_file_freq_2,"%d.%.9d\t",value->tv_sec,value->tv_nsec);
| ~^ ~~~~~~~~~~~~~
| | |
| int __time_t {aka long int}
| %ld
i7z.c:280:48: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘__syscall_slong_t’ {aka ‘long int’} [-Wformat=]
280 | fprintf(fp_log_file_freq_2,"%d.%.9d\t",value->tv_sec,value->tv_nsec);
| ~~~^ ~~~~~~~~~~~~~~
| | |
| int __syscall_slong_t {aka long int}
| %.9ld
i7z.c: In function ‘logCpuCstates_single_ts’:
i7z.c:318:39: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘__time_t’ {aka ‘long int’} [-Wformat=]
318 | fprintf(fp_log_file_Cstates,"%d.%.9d",value->tv_sec,value->tv_nsec); //newline, replace \n with \t to get everything separated with tabs
| ~^ ~~~~~~~~~~~~~
| | |
| int __time_t {aka long int}
| %ld
i7z.c:318:44: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘__syscall_slong_t’ {aka ‘long int’} [-Wformat=]
318 | fprintf(fp_log_file_Cstates,"%d.%.9d",value->tv_sec,value->tv_nsec); //newline, replace \n with \t to get everything separated with tabs
| ~~~^ ~~~~~~~~~~~~~~
| | |
| int __syscall_slong_t {aka long int}
| %.9ld
i7z.c: In function ‘logCpuCstates_dual_ts’:
i7z.c:369:45: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘__time_t’ {aka ‘long int’} [-Wformat=]
369 | fprintf(fp_log_file_Cstates_1,"%d.%.9d",value->tv_sec,value->tv_nsec); //newline, replace \n with \t to get everything separated with tabs
| ~^ ~~~~~~~~~~~~~
| | |
| int __time_t {aka long int}
| %ld
i7z.c:369:50: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘__syscall_slong_t’ {aka ‘long int’} [-Wformat=]
369 | fprintf(fp_log_file_Cstates_1,"%d.%.9d",value->tv_sec,value->tv_nsec); //newline, replace \n with \t to get everything separated with tabs
| ~~~^ ~~~~~~~~~~~~~~
| | |
| int __syscall_slong_t {aka long int}
| %.9ld
i7z.c:374:45: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘__time_t’ {aka ‘long int’} [-Wformat=]
374 | fprintf(fp_log_file_Cstates_2,"%d.%.9d",value->tv_sec,value->tv_nsec); //newline, replace \n with \t to get everything separated with tabs
| ~^ ~~~~~~~~~~~~~
| | |
| int __time_t {aka long int}
| %ld
i7z.c:374:50: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘__syscall_slong_t’ {aka ‘long int’} [-Wformat=]
374 | fprintf(fp_log_file_Cstates_2,"%d.%.9d",value->tv_sec,value->tv_nsec); //newline, replace \n with \t to get everything separated with tabs
| ~~~^ ~~~~~~~~~~~~~~
| | |
| int __syscall_slong_t {aka long int}
| %.9ld
i7z.c: In function ‘atexit_runsttysane’:
i7z.c:384:5: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
384 | system("stty sane");
| ^~~~~~~~~~~~~~~~~~~
i7z.c: In function ‘modprobing_msr’:
i7z.c:389:5: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
389 | system("modprobe msr");
| ^~~~~~~~~~~~~~~~~~~~~~
i7z_Dual_Socket.c: In function ‘print_i7z_socket’:
i7z_Dual_Socket.c:189:13: warning: variable ‘IA32_FIXED_CTR_CTL_Value’ set but not used [-Wunused-but-set-variable]
189 | int IA32_FIXED_CTR_CTL_Value = get_msr_value (CPU_NUM, IA32_FIXED_CTR_CTL, 63, 0, &error_indx);
| ^~~~~~~~~~~~~~~~~~~~~~~~
i7z_Dual_Socket.c:184:13: warning: variable ‘IA32_PERF_GLOBAL_CTRL_Value’ set but not used [-Wunused-but-set-variable]
184 | int IA32_PERF_GLOBAL_CTRL_Value = get_msr_value (CPU_NUM, IA32_PERF_GLOBAL_CTRL, 63, 0, &error_indx);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
i7z_Dual_Socket.c: In function ‘print_i7z’:
i7z_Dual_Socket.c:708:9: warning: variable ‘HT_ON’ set but not used [-Wunused-but-set-variable]
708 | int HT_ON;
| ^~~~~
i7z_Dual_Socket.c:664:9: warning: unused variable ‘i’ [-Wunused-variable]
664 | int i;
| ^
i7z_Single_Socket.c: In function ‘print_i7z_socket_single’:
i7z_Single_Socket.c:213:13: warning: variable ‘IA32_FIXED_CTR_CTL_Value’ set but not used [-Wunused-but-set-variable]
213 | int IA32_FIXED_CTR_CTL_Value;
| ^~~~~~~~~~~~~~~~~~~~~~~~
i7z_Single_Socket.c:207:13: warning: variable ‘IA32_PERF_GLOBAL_CTRL_Value’ set but not used [-Wunused-but-set-variable]
207 | int IA32_PERF_GLOBAL_CTRL_Value;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
i7z_Single_Socket.c: In function ‘print_i7z_single’:
i7z_Single_Socket.c:716:9: warning: variable ‘HT_ON’ set but not used [-Wunused-but-set-variable]
716 | int HT_ON;
| ^~~~~
i7z_Single_Socket.c:665:9: warning: unused variable ‘i’ [-Wunused-variable]
665 | int i;
| ^
helper_functions.c: In function ‘print_socket_information’:
helper_functions.c:683:21: warning: passing argument 1 to restrict-qualified parameter aliases with argument 3 [-Wrestrict]
683 | sprintf(socket_list,"%s%d,",socket_list,socket->processor_num[i]);
| ^~~~~~~~~~~ ~~~~~~~~~~~
helper_functions.c: In function ‘Test_Or_Make_MSR_DEVICE_FILES’:
helper_functions.c:527:13: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
527 | system ("msr_major=202;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
528 | cpuid_major=203;
| ~~~~~~~~~~~~~~~~~~
529 | n=0;
| ~~~~~~
530 | while [ $n -lt 16 ]; do
| ~~~~~~~~~~~~~~~~~~~~~~~~~
531 | mkdir -m 0755 -p /dev/cpu/$n;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
532 | mknod /dev/cpu/$n/msr -m 0600 c $msr_major $n;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
533 | mknod /dev/cpu/$n/cpuid -m 0444 c $cpuid_major $n;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
534 | n=expr $n + 1;
| ~~~~~~~~~~~~~~~~~~
535 | done;
| ~~~~~~~
536 | ");
| ~~
helper_functions.c:538:13: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
538 | system ("modprobe msr");
| ^~~~~~~~~~~~~~~~~~~~~~~
helper_functions.c: In function ‘cpufreq_info’:
helper_functions.c:551:5: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
551 | system
| ^~~~~~
552 | ("cat /proc/cpuinfo |grep MHz|sed 's/cpu\sMHz\s
:\s//'|tail -n 1 > /tmp/cpufreq.txt");
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
helper_functions.c:559:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
559 | fgets (tmp_str, 30, tmp_file);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
helper_functions.c: In function ‘print_socket_information’:
helper_functions.c:683:38: warning: ‘,’ directive writing 1 byte into a region of size between 0 and 199 [-Wformat-overflow=]
683 | sprintf(socket_list,"%s%d,",socket_list,socket->processor_num[i]);
| ^
In file included from /usr/include/stdio.h:867,
from helper_functions.c:25:
/usr/include/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 3 and 212 bytes into a destination of size 200
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -g -O3 -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -m64 -fasynchronous-unwind-tables -Wp,-D_REENTRANT -ftree-loop-distribute-patterns -Wl,-z -Wl,now -Wl,-z -Wl,relro -fno-semantic-interposition -ffat-lto-objects -fno-trapping-math -Wl,-sort-common -Wl,--enable-new-dtags -mtune=skylake -fno-schedule-insns2 -fno-schedule-insns -fno-inline-small-functions -fno-caller-saves -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DBUILD_MAIN -Wimplicit-function-declaration -Dx64_BIT -o i7z i7z.o helper_functions.o i7z_Single_Socket.o i7z_Dual_Socket.o -lncurses -lpthread -lrt -lm
Succeeded, now run sudo ./i7z
botnet@nsa~/i7z $ sudo ./i7z
i7z DEBUG: i7z version: svn-r93-(27-MAY-2013)
i7z DEBUG: Found Intel Processor
i7z DEBUG: Stepping 3
i7z DEBUG: Model c
i7z DEBUG: Family 6
i7z DEBUG: Processor Type 0
i7z DEBUG: Extended Model 3
i7z DEBUG: msr = Model Specific Register
i7z DEBUG: Detected an i7 - 22nm (haswell)
Segmentation fault

Any ideas? Thanks in advance!

Misidentification of Intel Xeon(R) CPU E5-2698 v3 (Haswell)

Output of /proc/cpuinfo

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 63
model name : Intel(R) Xeon(R) CPU E5-2698 v3 @ 2.30GHz
stepping : 2
microcode : 37
cpu MHz : 2300.034
cache size : 40960 KB
physical id : 0
siblings : 16
core id : 0
cpu cores : 16
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 15
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid fsgsbase bmi1 avx2 smep bmi2 erms invpcid
bogomips : 4600.06
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:

Output of i7z

i7z DEBUG: detected a newer model of ivy bridge processor
i7z DEBUG: my coder doesn't know about it, can you send the following info to him?
i7z DEBUG: model f, extended model 3, proc_family 6

Crash when passed an unrecognized long option

I see a crash, both with 0.27.2 and the git version, when passing unrecognized long options, apparently due to the long_options struct in i7z.c not being properly terminated.

$ i7z --version
zsh: segmentation fault (core dumped) i7z --version

Backtrace:
Thread 1 (Thread 0x7ffff7fbf700 (LWP 5425)):
#0 0x00007ffff743110c in __strncmp_sse2 () from /usr/lib/libc.so.6

No symbol table info available.
#1 0x00007ffff747f4b7 in _getopt_internal_r () from /usr/lib/libc.so.6

No symbol table info available.
#2 0x00007ffff7480201 in _getopt_internal () from /usr/lib/libc.so.6

No symbol table info available.
#3 0x00007ffff748027e in getopt_long () from /usr/lib/libc.so.6

No symbol table info available.
#4 0x0000000000401629 in main (argc=2, argv=0x7fffffffe638) at i7z.c:441

    option_index = 0
    log_file_name = "\000\000\000\000\000\000\000\000\257\067\336\367\377\177\000\000\000\000\000\000\000\000\000\000,6\336\367\000\000\000\000\001\000\000\000\000\000\000\000\001\335\377\377\377\17
    log_file_name2 = "\264\341\377\377\377\177\000\000\200B\336\367\377\177\000\000\000\000\000\000\000\000\000\000\\\270\335\367\377\177\000\000H\265\335\367\377\177\000\000\270\341\377\377\377\177
    chi = {max_online_cpu = 0, num_sockets = 0, sibling_num = {0 <repeats 128 times>},
      processor_num = {0 <repeats 128 times>}, package_num = {0 <repeats 128 times>},
      coreid_num = {0 <repeats 48 times>, -136439751, 32767, 0, 0, 1675264, 0, 1675216, 0,
        1675216, 0, 0, 0, 5, 0, 3772416, 0, 3796992, 0, 3795200, 0, 3813200, 0, 1675264, 0, 3,
        32767, 0, 0, 28672, 0, 26668, 0, 26668, 0, 0, 0, 5, 32767, 2121728, 0, -136400236,
        32767, 2126444, 0, -147040927, 32767, 0, 0, -136432483, 32767, 2187264, 0, -136400236,
        0, 1, 0, -141172204, 32767, 0, 0, -136432483, 32767, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
        -136439830, 32767, 0, 0, -136444392, 32767, 390676, 0}, display_cores = {390676, 0,
        -9312, 32767, 0, 0, 2486272, 0, -136373794, 32767, 4, 0, 47, 0, 0, 0, -136420871,
        32767, -8928, 32767, -134467976, 32767, 19, 0, 4196875, 0, 1836017711, 1, 10, 0,
        1768697698, 1932419938, 1, 0, -8928, 32767, -136421849, 32767, 2147479968, 3, -8928,
        32767, -134475776, 32767, -136438680, 32767, -8880, 32767, -136400236, 32767, 0, 3,
        -138952089, 32767, 0, 0, -136432483, 32767, -1279, 4095, -9232, 0, 1, 0, -134467976,
        32767, 4196875, 0, -134225664, 32767, 6, 0, -143335424, 32767, 65037, 0, 529053, 0, 1,
        0, 33261, 0, 0, 0, 0, 0, 1984416, 0, 4096, 0, 3880, 0, 1429418557, 0, 597366993, 0,
        1410679597, 0, 0, 0, 1412366343, 0, 928956310, 0, 0, 0, 0, 0, 0, 0, -134271763, 32767,
        4196875, 0, -134225616, 32767, 0, 0, -134230016, 32767, -134271763, 32767, 0, 0,
        -136432084, 32767, 0, 0}, HT = 176}
    socket_0 = {max_cpu = 0, socket_num = 0, processor_num = {-1, -1, -1, -1, -1, -1, -1, -1,
        0 <repeats 24 times>}, num_physical_cores = 0, num_logical_cores = 0}
    socket_1 = {max_cpu = 0, socket_num = 1, processor_num = {-1, -1, -1, -1, -1, -1, -1, -1,
        0 <repeats 24 times>}, num_physical_cores = 0, num_logical_cores = 0}
    c = <optimized out>
    presupplied_socket_info = false
    long_options = {{name = 0x4096dc "write", has_arg = 1, flag = 0x0, val = 119}, {
        name = 0x40916c "socket0", has_arg = 1, flag = 0x0, val = 122}, {
        name = 0x409174 "socket1", has_arg = 1, flag = 0x0, val = 121}, {
        name = 0x40917c "logfile", has_arg = 1, flag = 0x0, val = 108}, {
        name = 0x409184 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x409189 "nogui",
        has_arg = 0, flag = 0x0, val = 110}}

OSX

This looks awesome. Bit of a longshot, but does an OSX port exist?

GUI doesn't install on Gallium

i7z seems to work in terminal for the Brasswell (Celeron N3060).
However, GUI doesn't install at all.
Lots of errors.
Tried compiling, still errors.
I think it best to show the Synaptic Package manager's error code:
`Selecting previously unselected package i7z-gui.
(Reading database ... 230913 files and directories currently installed.)
Preparing to unpack .../i7z-gui_0.27.2+git2013.10.12-g5023138-3_amd64.deb ...
Unpacking i7z-gui (0.27.2+git2013.10.12-g5023138-3) ...
Setting up fahclient (7.5.1) ...
update-rc.d: error: no runlevel symlinks to modify, aborting!
dpkg: error processing package fahclient (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up i7z-gui (0.27.2+git2013.10.12-g5023138-3) ...
Errors were encountered while processing:
fahclient
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up fahclient (7.5.1) ...
update-rc.d: error: no runlevel symlinks to modify, aborting!
dpkg: error processing package fahclient (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
fahclient

`

i7z should show clock modulation value

Some Intel systems can throttle the CPU by employing a mechanism called clock modulation. What this does is disable the clock for a given percentage of a timeslice, slowing the core down. This is often used when the CPU is overheating or consuming too much power.

It is not easy to spot however. It is observable when C0% shrinks despite a core being fully loaded, but that is hard to track down.

Clock modulation can be observed in MSR 0x19A.
bit[4] is a binary value that shows whether clockmod is enabled.
bit[3:1] is a number that describes how many 12.5% steps of original CPU power remains.
(I count from 0)

e.g. 0b10100 -> clockmod enabled, 2 steps (25%) power remain -> The core will be switched off for 75% of its operation, and C0% will likely read close to 25 if the core is fully loaded.

Clockmod is present on Core2 and Nehalems, I don't know if it still applies to newer Core-i.

As it's hard to tell if clock modulation is in use, showing it in i7z would be very useful. Thanks!

i7-920 incorrectly recognized as Haswell

Title says it all: I have a machine with an i7-920 (Bloomfield line / Nehalem microarchitecture), which i7z "guesses" is the Haswell architecture:

$ sudo i7z
i7z DEBUG: i7z version: svn-r93-(27-MAY-2013)
i7z DEBUG: Found Intel Processor
i7z DEBUG:    Stepping 4
i7z DEBUG:    Model a
i7z DEBUG:    Family 6
i7z DEBUG:    Processor Type 0
i7z DEBUG:    Extended Model 1
i7z DEBUG: msr = Model Specific Register
i7z DEBUG: Detected a nehalem (i7) - 45nm
i7z DEBUG: msr device files exist /dev/cpu/*/msr
i7z DEBUG: You have write permissions to msr device files

------------------------------
--[core id]--- Other information
-------------------------------------
--[0] Processor number 0
--[0] Socket number/Hyperthreaded Sibling number  0,4
--[0] Core id number 0
--[0] Display core in i7z Tool: Yes

--[1] Processor number 1
--[1] Socket number/Hyperthreaded Sibling number  0,5
--[1] Core id number 1
--[1] Display core in i7z Tool: Yes

--[2] Processor number 2
--[2] Socket number/Hyperthreaded Sibling number  0,6
--[2] Core id number 2
--[2] Display core in i7z Tool: Yes

--[3] Processor number 3
--[3] Socket number/Hyperthreaded Sibling number  0,7
--[3] Core id number 3
--[3] Display core in i7z Tool: Yes

--[4] Processor number 4
--[4] Socket number/Hyperthreaded Sibling number  0,0
--[4] Core id number 0
--[4] Display core in i7z Tool: No

--[5] Processor number 5
--[5] Socket number/Hyperthreaded Sibling number  0,1
--[5] Core id number 1
--[5] Display core in i7z Tool: No

--[6] Processor number 6
--[6] Socket number/Hyperthreaded Sibling number  0,2
--[6] Core id number 2
--[6] Display core in i7z Tool: No

--[7] Processor number 7
--[7] Socket number/Hyperthreaded Sibling number  0,3
--[7] Core id number 3
--[7] Display core in i7z Tool: No

Socket-0 [num of cpus 4 physical 4 logical 8] 0,1,2,3,
Socket-1 [num of cpus 0 physical 0 logical 0] 
GUI has been Turned ON
i7z DEBUG: Single Socket Detected
i7z DEBUG: In i7z Single_Socket()
i7z DEBUG: guessing Haswell
$ 

Where does i7z get the value for vcore?

Is there a file I can simply cat to show me the same voltage as i7z displays?

Socket [0] - [physical cores=4, logical cores=8, max online cores ever=4]
  TURBO ENABLED on 4 Cores, Hyper Threading ON
  Max Frequency without considering Turbo 4095.90 MHz (99.90 x [41])
  Max TURBO Multiplier (if Enabled) with 1/2/3/4 Cores is  44x/44x/44x/44x
  Real Current Frequency 4397.72 MHz [99.90 x 44.02] (Max of below)
        Core [core-id]  :Actual Freq (Mult.)      C0%   Halt(C1)%  C3 %   C6 %   C7 %  Temp      VCore
        Core 1 [0]:       4393.43 (43.98x)      21.7    5.31    23.2    8.33    39.3    38      1.2523
        Core 2 [1]:       4390.40 (43.95x)      11.4    13.7    22.2    3.21    48.4    31      1.2505
        Core 3 [2]:       4397.72 (44.02x)      6.35    0.302   20.8    1.12    70.8    30      1.2511
        Core 4 [3]:       4396.66 (44.01x)      9.12    7.72    14.2    2.59    65.5    33      1.2487

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.