
{"id":15497,"date":"2014-03-04T21:02:40","date_gmt":"2014-03-04T21:02:40","guid":{"rendered":"http:\/\/www.beautifulwork.org\/?p=15497"},"modified":"2014-03-04T21:02:40","modified_gmt":"2014-03-04T21:02:40","slug":"wsu-ptop-is-a-simple-and-effcient-process-level-power-profiling-tool","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2014\/03\/04\/wsu-ptop-is-a-simple-and-effcient-process-level-power-profiling-tool\/","title":{"rendered":"WSU pTop is a simple and effcient process-level power profiling tool"},"content":{"rendered":"<pre>\n$ls\nconf  doc  makefile  objects.mk  sources.mk  src\n$make all\ncc    -c -o src\/avltree.o src\/avltree.c\nIn file included from src\/avltree.c:12:0:\nsrc\/eperf.h: In function \u2018sys_perf_event_open\u2019:\nsrc\/eperf.h:32:17: error: \u2018__NR_perf_counter_open\u2019 undeclared (first use in this function)\n  return syscall(__NR_perf_counter_open, attr, pid, cpu, group_fd, flags);\n                 ^\nsrc\/eperf.h:32:17: note: each undeclared identifier is reported only once for each function it appears in\nmake: *** [src\/avltree.o] Error 1\n$\n\n$ mkdir gitpower\n$ cd gitpower\/\n$ ls\n$ git clone https:\/\/github.com\/hch-im\/ptop.git\nCloning into 'ptop'...\nremote: Reusing existing pack: 38, done.\nremote: Total 38 (delta 0), reused 0 (delta 0)\nUnpacking objects: 100% (38\/38), done.\nChecking connectivity... done\n$ ls\nptop\n$ cd ptop\/\n$ ls\nconf  makefile  objects.mk  README.md  sources.mk  src\n$ make all\ncc    -c -o src\/avltree.o src\/avltree.c\ncc    -c -o src\/common.o src\/common.c\nIn file included from src\/cpu_stats.h:30:0,\n                 from src\/common.c:38:\nsrc\/database.h:30:25: fatal error: mysql\/mysql.h: No such file or directory\n #include \n                         ^\ncompilation terminated.\nmake: *** [src\/common.o] Error 1\n$ \n\n$ make all\ncc    -c -o src\/common.o src\/common.c\ncc    -c -o src\/cpu_stats.o src\/cpu_stats.c\ncc    -c -o src\/database.o src\/database.c\ncc    -c -o src\/display.o src\/display.c\nsrc\/display.c:30:21: fatal error: ncurses.h: No such file or directory\n #include \n                     ^\ncompilation terminated.\nmake: *** [src\/display.o] Error 1\n$ \n\n\n$ make all\ncc    -c -o src\/display.o src\/display.c\ncc    -c -o src\/energy.o src\/energy.c\ncc    -c -o src\/eperf.o src\/eperf.c\ncc    -c -o src\/m_stats.o src\/m_stats.c\ncc    -c -o src\/pid_stats.o src\/pid_stats.c\ncc    -c -o src\/ptop.o src\/ptop.c\nBuilding target: pTop\nInvoking: GCC C Linker\ngcc  -o\"pTop\"  .\/src\/avltree.o .\/src\/common.o .\/src\/cpu_stats.o .\/src\/database.o .\/src\/display.o .\/src\/energy.o .\/src\/eperf.o .\/src\/m_stats.o .\/src\/pid_stats.o .\/src\/ptop.o   -lmysqlclient -lncurses\nFinished building target: pTop\nrm -rf  .\/src\/avltree.o .\/src\/common.o .\/src\/cpu_stats.o .\/src\/database.o .\/src\/display.o .\/src\/energy.o .\/src\/eperf.o .\/src\/m_stats.o .\/src\/pid_stats.o .\/src\/ptop.o  .\/src\/avltree.d .\/src\/common.d .\/src\/cpu_stats.d .\/src\/database.d .\/src\/display.d .\/src\/energy.d .\/src\/eperf.d .\/src\/m_stats.d .\/src\/pid_stats.d .\/src\/ptop.d \nFinished clean: pTop\n$ \n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>$ls conf doc makefile objects.mk sources.mk src $make all cc -c -o src\/avltree.o src\/avltree.c In file included from src\/avltree.c:12:0: src\/eperf.h: In function \u2018sys_perf_event_open\u2019: src\/eperf.h:32:17: error: \u2018__NR_perf_counter_open\u2019 undeclared (first use in this function) return syscall(__NR_perf_counter_open, attr, pid, cpu, group_fd, flags); ^ src\/eperf.h:32:17: note: each undeclared identifier is reported only once for each function it appears in &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2014\/03\/04\/wsu-ptop-is-a-simple-and-effcient-process-level-power-profiling-tool\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;WSU pTop is a simple and effcient process-level power profiling tool&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[83],"tags":[],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/15497"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=15497"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/15497\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=15497"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=15497"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=15497"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}