build oddity with gcc 4.7
by Dave Hansen
gcc 4.4 and 4.6 will compile numatop for me, but 4.7 fails at link time.
good versions: gcc version 4.4.7 (Ubuntu/Linaro 4.4.7-2ubuntu1)
gcc version 4.6.3 20120918 (prerelease) (Ubuntu/Linaro
4.6.3-10ubuntu1)
bad version: gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1)
I'm not quite sure who to blame it on, but anyone who tries to compile
it on Ubuntu will probably run in to this. To work around it, just do:
make CC=gcc-4.6
> gcc -g -Wall -O2 -o cmd.o -c common/cmd.c
> gcc -g -Wall -O2 -o disp.o -c common/disp.c
> common/disp.c: In function ‘disp_on_resize’:
> common/disp.c:233:2: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
> common/disp.c: In function ‘disp_consthr_quit’:
> common/disp.c:161:2: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
> common/disp.c: In function ‘cons_handler’:
> common/disp.c:619:5: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
> gcc -g -Wall -O2 -o lwp.o -c common/lwp.c
> gcc -g -Wall -O2 -o node.o -c common/node.c
> gcc -g -Wall -O2 -o numatop.o -c common/numatop.c
> gcc -g -Wall -O2 -o page.o -c common/page.c
> gcc -g -Wall -O2 -o perf.o -c common/perf.c
> gcc -g -Wall -O2 -o plat.o -c common/plat.c
> gcc -g -Wall -O2 -o proc.o -c common/proc.c
> gcc -g -Wall -O2 -o reg.o -c common/reg.c
> gcc -g -Wall -O2 -o util.o -c common/util.c
> gcc -g -Wall -O2 -o win.o -c common/win.c
> gcc -g -Wall -O2 -o pfwrapper.o -c common/pfwrapper.c
> gcc -g -Wall -O2 -o sym.o -c common/sym.c
> gcc -g -Wall -O2 -o map.o -c common/map.c
> gcc -g -Wall -O2 -o wsm.o -c intel/wsm.c
> gcc -g -Wall -O2 -o snb.o -c intel/snb.c
> gcc -g -Wall -O2 -o nhm.o -c intel/nhm.c
> gcc -lncurses -lpthread -lnuma -o numatop cmd.o disp.o lwp.o node.o numatop.o page.o perf.o plat.o proc.o reg.o util.o win.o pfwrapper.o sym.o map.o wsm.o snb.o nhm.o
> disp.o: In function `cons_handler':
> /home/dave/src/numatop/common/disp.c:653: undefined reference to `stdscr'
> /home/dave/src/numatop/common/disp.c:653: undefined reference to `wgetch'
> disp.o: In function `disp_consthr_quit':
> /home/dave/src/numatop/common/disp.c:162: undefined reference to `pthread_join'
> disp.o: In function `disp_start':
> /home/dave/src/numatop/common/disp.c:249: undefined reference to `pthread_create'
> /home/dave/src/numatop/common/disp.c:254: undefined reference to `pthread_create'
> disp.o: In function `disp_dispthr_quit_wait':
> /home/dave/src/numatop/common/disp.c:710: undefined reference to `pthread_join'
> perf.o: In function `perfthr_quit_wait':
> /home/dave/src/numatop/common/perf.c:925: undefined reference to `pthread_join'
> perf.o: In function `perf_init':
> /home/dave/src/numatop/common/perf.c:859: undefined reference to `pthread_create'
> reg.o: In function `reg_win_create':
> /home/dave/src/numatop/common/reg.c:118: undefined reference to `stdscr'
> /home/dave/src/numatop/common/reg.c:118: undefined reference to `subwin'
> reg.o: In function `reg_win_destroy':
> /home/dave/src/numatop/common/reg.c:216: undefined reference to `delwin'
> reg.o: In function `reg_line_write':
> /home/dave/src/numatop/common/reg.c:243: undefined reference to `mvwprintw'
> /home/dave/src/numatop/common/reg.c:234: undefined reference to `wattr_on'
> reg.o: In function `reg_highlight_write':
> /home/dave/src/numatop/common/reg.c:263: undefined reference to `wattr_on'
> /home/dave/src/numatop/common/reg.c:271: undefined reference to `mvwprintw'
> reg.o: In function `reg_curses_fini':
> /home/dave/src/numatop/common/reg.c:385: undefined reference to `stdscr'
> /home/dave/src/numatop/common/reg.c:385: undefined reference to `wclear'
> /home/dave/src/numatop/common/reg.c:386: undefined reference to `stdscr'
> /home/dave/src/numatop/common/reg.c:386: undefined reference to `wrefresh'
> /home/dave/src/numatop/common/reg.c:387: undefined reference to `endwin'
> reg.o: In function `reg_curses_init':
> /home/dave/src/numatop/common/reg.c:400: undefined reference to `initscr'
> /home/dave/src/numatop/common/reg.c:401: undefined reference to `stdscr'
> /home/dave/src/numatop/common/reg.c:401: undefined reference to `wrefresh'
> /home/dave/src/numatop/common/reg.c:402: undefined reference to `start_color'
> /home/dave/src/numatop/common/reg.c:403: undefined reference to `stdscr'
> /home/dave/src/numatop/common/reg.c:403: undefined reference to `keypad'
> /home/dave/src/numatop/common/reg.c:404: undefined reference to `nonl'
> /home/dave/src/numatop/common/reg.c:405: undefined reference to `cbreak'
> /home/dave/src/numatop/common/reg.c:406: undefined reference to `noecho'
> /home/dave/src/numatop/common/reg.c:407: undefined reference to `curs_set'
> /home/dave/src/numatop/common/reg.c:408: undefined reference to `use_default_colors'
> /home/dave/src/numatop/common/reg.c:410: undefined reference to `stdscr'
> /home/dave/src/numatop/common/reg.c:420: undefined reference to `stdscr'
> /home/dave/src/numatop/common/reg.c:420: undefined reference to `mvwprintw'
> /home/dave/src/numatop/common/reg.c:422: undefined reference to `stdscr'
> /home/dave/src/numatop/common/reg.c:422: undefined reference to `mvwprintw'
> /home/dave/src/numatop/common/reg.c:424: undefined reference to `stdscr'
> /home/dave/src/numatop/common/reg.c:424: undefined reference to `wrefresh'
> reg.o: In function `reg_win_clear':
> /home/dave/src/numatop/common/reg.c:443: undefined reference to `stdscr'
> /home/dave/src/numatop/common/reg.c:443: undefined reference to `wclear'
> /home/dave/src/numatop/common/reg.c:444: undefined reference to `stdscr'
> reg.o: In function `reg_erase':
> /home/dave/src/numatop/common/reg.c:173: undefined reference to `werase'
> reg.o: In function `reg_refresh':
> /home/dave/src/numatop/common/reg.c:184: undefined reference to `wrefresh'
> reg.o: In function `reg_refresh_nout':
> /home/dave/src/numatop/common/reg.c:196: undefined reference to `wnoutrefresh'
> reg.o: In function `reg_update_all':
> /home/dave/src/numatop/common/reg.c:206: undefined reference to `doupdate'
> reg.o: In function `reg_line_write':
> /home/dave/src/numatop/common/reg.c:247: undefined reference to `wattr_off'
> reg.o: In function `reg_highlight_write':
> /home/dave/src/numatop/common/reg.c:274: undefined reference to `wattr_off'
> reg.o: In function `reg_win_clear':
> /home/dave/src/numatop/common/reg.c:444: undefined reference to `wrefresh'
> map.o: In function `map_map2numa':
> /home/dave/src/numatop/common/map.c:347: undefined reference to `numa_move_pages'
> map.o: In function `map_addr2nodedst':
> /home/dave/src/numatop/common/map.c:373: undefined reference to `numa_move_pages'
> collect2: error: ld returned 1 exit status
> make: *** [numatop] Error 1
9 years, 3 months
CPU utilization display
by Dave Hansen
I also noticed that the CPU utlization doesn't seem quite right. While
numatop claims my kernel compile is taking very little CPU:
> PID PROC RMA(K) LMA(K) RMA/LMA CPI *CPU%
> 44242 ld 0.9 18331.3 0.0 0.71 0.6
which doesn't seem to fit well with what 'top' is saying:
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
> 44242 root 20 0 1111m 849m 1408 D 99 0.1 0:08.85 ld
I'm not quite sure how numatop is scaling its numbers, but this doesn't
look quite right. Here's vmstat at the same time:
> procs -------------memory------------ ---swap-- -----io---- --system-- ----cpu----
> r b swpd free buff cache si so bi bo in cs us sy id wa
> 16 0 0 981299520 63212 6170816 0 0 0 80 11785 3314 83 17 0 0
> 17 0 0 981292160 63220 6197068 0 0 0 128 11812 4636 83 17 0 0
> 16 0 0 981394816 63228 6214652 0 0 0 108 11776 4691 82 18 0 0
> 17 0 0 981148608 63236 6237372 0 0 0 108 11778 3748 83 17 0 0
> 17 0 0 981373248 63244 6272952 0 0 0 162 11867 5275 81 19 0 0
The only oddity in this system is that there are a lot of _possible_
cpus (160), but many fewer online (only 8 or so at the time I did this).
9 years, 3 months
Feature request - numatop-tui
by Staffan Tjernstrom
First of all thanks for a really cool and useful tool.
I'd like to throw in a request for a non-X based version (along the
lines of latencytop-tui) as our main usecase would be on systems that
we want to keep X away from if at all possible.
9 years, 3 months