1 2 Previous Next 18 Replies Latest reply on Sep 8, 2016 2:46 PM by Intel Corporation

    measure power consumption on Edison board

    IoT_srinivas

      Hi ,

       

      I want to measure power consumption on Edison board and other devices/interface(Wi-Fi ,BT and connected Sensors) .

      Is there any way to measure the power on Edison.

      I am using meta-intel-edison - Layer for the Intel Edison Development Platform this build.

       

      I want use similar to powertop in ubuntu.(reference GitHub - fenrus75/powertop: The Linux PowerTOP tool -- please post patches to the mailing list instead of using github …

       

      I download  powertop2.8  cd powertop2.8

      here is the process for power top setup/installation.

         ./configure                                                 

              ./make                                                      

              ./make install

       

      powertop depends on below modules.

      pciutils-devel (is only required if you have PCI)                          

      ncurses-devel  (required)                                                     

      libnl-devel    (required)          

       

      power top ./configure LOG

       

      checking pkg-config is at least version 0.9.0... yes

      checking for NCURSES... yes

      checking for PCIUTILS... no

      checking for library containing pci_get_dev... no

      checking for LIBNL... no

      checking for LIBNL... no

      checking for LIBNL... no

      configure: error: libnl and libnl-genl are required but were not found.

       

      I was unable install PCIUTILS and libnl( debends on other modules like libm  )

       

      libnl-1.1 LOG

      Included in Compilation:

        libnl:   Yes  -lm

       

       

      Dependencies:

        libm             Yes       (required)

       

      Please do need full.

       

       

       

        • 1. Re: measure power consumption on Edison board
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Hi IoT_srinivas,

          I found another thread related with measuring power consumption of Edison, you can check the answer in the next link: https://communities.intel.com/thread/56767, as you can see in the correct answer, the user recommends to do it manually in the hardware.

          About PowerTOP and the problem with PCIUTILS and libnl packages, you can find them in the AlexT’s repo so I recommend you to try to install those packages from the following repo: http://alextgalileo.altervista.org/edison-package-repo-configuration-instructions.html

          I hope you find this information useful,

          Regards,
          -Leonardo

          • 2. Re: measure power consumption on Edison board
            Intel Corporation
            This message was posted on behalf of Intel Corporation

            Hi IoT_srinivas,

            Was the information helpful? Did you install the packages PCIUTILS and libnl

            If you need something else don't doubt to ask us.

            Regards,
            -Leonardo

            • 3. Re: measure power consumption on Edison board
              IoT_srinivas

              Hi Leonardo ,

               

              I try to install  the packages PCIUTILS and libnl .I given the steps on above but unable install the package.

              Please provide the necessary steps and source code to compile and install.

               

              Regards,

              Srinivas

              • 4. Re: measure power consumption on Edison board
                Radhika.k

                Hi Leonardo,

                 

                                  Yes,Even I'm getting the same error if I'm trying to get the power details through powertop,Cannot able to install pciutils and libnl on the intel edison arduino expansion board. I have tried the IMAGE_INSTALL += "pciutils" and IMAGE_INSTALL += "libnl" in both latest yocto image and meta intel edison image provided in bsp guide ,and flashing on the board,but couldn't download the respective packages on my edison board.I have already followed the steps of Alex's repository too i.e, from Edison Package Repo Configuration Instructions  but couldn't find the source code and the steps to get the power.Could you please provide the detailed steps of the above repository and source code ?

                                    Could you please provide the necessary steps to find the power for each process that is goingon on the intel edison board in one way or the other.???Any and every help is appreciated.I'm pinning the screenshot of my error message.


                pci_utils.png

                 

                Thanks and Regards,

                Radhika

                • 5. Re: measure power consumption on Edison board
                  Intel Corporation
                  This message was posted on behalf of Intel Corporation

                  Hi guys,

                  In the link that I provided you on the first reply there are the steps to download the packages in the repository but I'll try my best to explain this better.

                  Once you log in on your Edison, you have to edit the base-feeds.conf file so you can do it with the command cat >> /etc/opkg/base-feeds.conf and add the lines of the repo. Next you download the packages with the command opkg update.

                  Then you have to install the packages that you need with the command opkg install <packagename>, so in this case you have to run the following commands:

                  opkg install pciutils
                  opkg install libnl


                  You can check the list of the packages installed with the command: opkg list |grep libnl and opkg list |grep pciutils to see that the packages are installed.

                  I hope this works for you guys.

                  Regards,
                  -Leonardo

                  • 6. Re: measure power consumption on Edison board
                    IoT_srinivas

                    Hi Leonardo ,

                     

                    Step1  :

                    root@xxxx:~# opkg install libnl

                    Package libnl-3-200 (1:3.2.25-r0) installed in root is up to date.

                     

                    Step2:

                    opkg list |grep libnl

                    libnl-3-200 - 1:3.2.25-r0 - A library for applications dealing with netlink sockets  A library for

                    libnl-3-cli - 1:3.2.25-r0 - A library for applications dealing with netlink sockets  A library for

                    libnl-3-dbg - 1:3.2.25-r0 - A library for applications dealing with netlink sockets - Debugging files

                    libnl-3-dev - 1:3.2.25-r0 - A library for applications dealing with netlink sockets - Development

                    libnl-3-doc - 1:3.2.25-r0 - A library for applications dealing with netlink sockets - Documentation

                    libnl-3-genl - 1:3.2.25-r0 - A library for applications dealing with netlink sockets  A library for

                    libnl-3-staticdev - 1:3.2.25-r0 - A library for applications dealing with netlink sockets - Development

                    libnl-idiag-3-200 - 1:3.2.25-r0 - A library for applications dealing with netlink sockets  A library for

                    libnl-nf-3-200 - 1:3.2.25-r0 - A library for applications dealing with netlink sockets  A library for

                    libnl-route-3-200 - 1:3.2.25-r0 - A library for applications dealing with netlink sockets  A library for

                     

                    Step 3:

                    opkg install pciutils

                    Package pciutils (3.2.1-r0) installed in root is up to date.

                     

                    Step4:

                    opkg install pciutils

                    Package pciutils (3.2.1-r0) installed in root is up to date.

                     

                    Step5:

                    powertop-2.8/

                    root@xxxx:~/powertop-2.8# ./configure

                    checking for a BSD-compatible install... /usr/bin/install -c

                    checking whether build environment is sane... yes

                    checking for a thread-safe mkdir -p... /usr/bin/mkdir -p

                    checking for gawk... gawk

                    checking whether make sets $(MAKE)... yes

                    checking whether make supports nested variables... yes

                    checking for style of include used by make... GNU

                    checking for g++... g++

                    checking whether the C++ compiler works... yes

                    checking for C++ compiler default output file name... a.out

                    checking for suffix of executables...

                    checking whether we are cross compiling... no

                    checking for suffix of object files... o

                    checking whether we are using the GNU C++ compiler... yes

                    checking whether g++ accepts -g... yes

                    checking dependency style of g++... gcc3

                    checking how to run the C++ preprocessor... g++ -E

                    checking for grep that handles long lines and -e... /usr/bin/grep

                    checking for egrep... /usr/bin/grep -E

                    checking for ANSI C header files... yes

                    checking for sys/types.h... yes

                    checking for sys/stat.h... yes

                    checking for stdlib.h... yes

                    checking for string.h... yes

                    checking for memory.h... yes

                    checking for strings.h... yes

                    checking for inttypes.h... yes

                    checking for stdint.h... yes

                    checking for unistd.h... yes

                    checking minix/config.h usability... no

                    checking minix/config.h presence... no

                    checking for minix/config.h... no

                    checking whether it is safe to define __EXTENSIONS__... yes

                    checking whether make supports nested variables... (cached) yes

                    checking whether NLS is requested... yes

                    checking for msgfmt... /usr/bin/msgfmt

                    checking for gmsgfmt... /usr/bin/msgfmt

                    checking for xgettext... /usr/bin/xgettext

                    checking for msgmerge... /usr/bin/msgmerge

                    checking for gcc... gcc

                    checking whether we are using the GNU C compiler... yes

                    checking whether gcc accepts -g... yes

                    checking for gcc option to accept ISO C89... none needed

                    checking whether gcc understands -c and -o together... yes

                    checking dependency style of gcc... gcc3

                    checking build system type... i686-pc-linux-gnu

                    checking host system type... i686-pc-linux-gnu

                    checking for ld used by GCC... /usr/i586-poky-linux/bin/ld

                    checking if the linker (/usr/i586-poky-linux/bin/ld) is GNU ld... yes

                    checking for shared library run path origin... done

                    checking for CFPreferencesCopyAppValue... no

                    checking for CFLocaleCopyCurrent... no

                    checking for GNU gettext in libc... yes

                    checking whether to use NLS... yes

                    checking where the gettext function comes from... libc

                    checking for ar... ar

                    checking the archiver (ar) interface... ar

                    checking how to run the C preprocessor... gcc -E

                    checking whether we are using the GNU C++ compiler... (cached) yes

                    checking whether g++ accepts -g... (cached) yes

                    checking dependency style of g++... (cached) gcc3

                    checking how to print strings... printf

                    checking for a sed that does not truncate output... /usr/bin/sed

                    checking for fgrep... /usr/bin/grep -F

                    checking for ld used by gcc... /usr/i586-poky-linux/bin/ld

                    checking if the linker (/usr/i586-poky-linux/bin/ld) is GNU ld... yes

                    checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B

                    checking the name lister (/usr/bin/nm -B) interface... BSD nm

                    checking whether ln -s works... yes

                    checking the maximum length of command line arguments... 32768

                    checking whether the shell understands some XSI constructs... yes

                    checking whether the shell understands "+="... yes

                    checking how to convert i686-pc-linux-gnu file names to i686-pc-linux-gnu format... func_convert_file_noop

                    checking how to convert i686-pc-linux-gnu file names to toolchain format... func_convert_file_noop

                    checking for /usr/i586-poky-linux/bin/ld option to reload object files... -r

                    checking for objdump... objdump

                    checking how to recognize dependent libraries... pass_all

                    checking for dlltool... no

                    checking how to associate runtime and link libraries... printf %s\n

                    checking for archiver @FILE support... @

                    checking for strip... strip

                    checking for ranlib... ranlib

                    checking command to parse /usr/bin/nm -B output from gcc object... ok

                    checking for sysroot... no

                    checking for mt... no

                    checking if : is a manifest tool... no

                    checking for dlfcn.h... yes

                    checking for objdir... .libs

                    checking if gcc supports -fno-rtti -fno-exceptions... no

                    checking for gcc option to produce PIC... -fPIC -DPIC

                    checking if gcc PIC flag -fPIC -DPIC works... yes

                    checking if gcc static flag -static works... no

                    checking if gcc supports -c -o file.o... yes

                    checking if gcc supports -c -o file.o... (cached) yes

                    checking whether the gcc linker (/usr/i586-poky-linux/bin/ld) supports shared libraries... yes

                    checking whether -lc should be explicitly linked in... no

                    checking dynamic linker characteristics... GNU/Linux ld.so

                    checking how to hardcode library paths into programs... immediate

                    checking whether stripping libraries is possible... yes

                    checking if libtool supports shared libraries... yes

                    checking whether to build shared libraries... yes

                    checking whether to build static libraries... yes

                    checking how to run the C++ preprocessor... g++ -E

                    checking for ld used by g++... /usr/i586-poky-linux/bin/ld

                    checking if the linker (/usr/i586-poky-linux/bin/ld) is GNU ld... yes

                    checking whether the g++ linker (/usr/i586-poky-linux/bin/ld) supports shared libraries... yes

                    checking for g++ option to produce PIC... -fPIC -DPIC

                    checking if g++ PIC flag -fPIC -DPIC works... yes

                    checking if g++ static flag -static works... no

                    checking if g++ supports -c -o file.o... yes

                    checking if g++ supports -c -o file.o... (cached) yes

                    checking whether the g++ linker (/usr/i586-poky-linux/bin/ld) supports shared libraries... yes

                    checking dynamic linker characteristics... (cached) GNU/Linux ld.so

                    checking how to hardcode library paths into programs... immediate

                    checking for gcc... (cached) gcc

                    checking whether we are using the GNU C compiler... (cached) yes

                    checking whether gcc accepts -g... (cached) yes

                    checking for gcc option to accept ISO C89... (cached) none needed

                    checking whether gcc understands -c and -o together... (cached) yes

                    checking dependency style of gcc... (cached) gcc3

                    checking for FORTIFY_SOURCE support... checking whether g++ supports C++11 features by default... no

                    checking whether g++ supports C++11 features with -std=c++11... yes

                    checking if compiler needs -Werror to reject unknown flags... no

                    checking for the pthreads library -lpthreads... no

                    checking whether pthreads work without any flags... no

                    checking whether pthreads work with -Kthread... no

                    checking whether pthreads work with -kthread... no

                    checking for the pthreads library -llthread... no

                    checking whether pthreads work with -pthread... yes

                    checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE

                    checking if more special flags are required for pthreads... no

                    checking for PTHREAD_PRIO_INHERIT... yes

                    checking fcntl.h usability... yes

                    checking fcntl.h presence... yes

                    checking for fcntl.h... yes

                    checking libintl.h usability... yes

                    checking libintl.h presence... yes

                    checking for libintl.h... yes

                    checking limits.h usability... yes

                    checking limits.h presence... yes

                    checking for limits.h... yes

                    checking locale.h usability... yes

                    checking locale.h presence... yes

                    checking for locale.h... yes

                    checking malloc.h usability... yes

                    checking malloc.h presence... yes

                    checking for malloc.h... yes

                    checking ncurses.h usability... yes

                    checking ncurses.h presence... yes

                    checking for ncurses.h... yes

                    checking for stdint.h... (cached) yes

                    checking for stdlib.h... (cached) yes

                    checking for string.h... (cached) yes

                    checking sys/ioctl.h usability... yes

                    checking sys/ioctl.h presence... yes

                    checking for sys/ioctl.h... yes

                    checking sys/socket.h usability... yes

                    checking sys/socket.h presence... yes

                    checking for sys/socket.h... yes

                    checking sys/statfs.h usability... yes

                    checking sys/statfs.h presence... yes

                    checking for sys/statfs.h... yes

                    checking sys/time.h usability... yes

                    checking sys/time.h presence... yes

                    checking for sys/time.h... yes

                    checking termios.h usability... yes

                    checking termios.h presence... yes

                    checking for termios.h... yes

                    checking for unistd.h... (cached) yes

                    checking for stdbool.h that conforms to C99... yes

                    checking for _Bool... no

                    checking for inline... inline

                    checking for int64_t... yes

                    checking for pid_t... yes

                    checking for size_t... yes

                    checking for ssize_t... yes

                    checking for uint16_t... yes

                    checking for uint32_t... yes

                    checking for uint64_t... yes

                    checking for stdlib.h... (cached) yes

                    checking for GNU libc compatible malloc... yes

                    checking for stdlib.h... (cached) yes

                    checking for unistd.h... (cached) yes

                    checking for sys/param.h... yes

                    checking for getpagesize... yes

                    checking for working mmap... yes

                    checking for stdlib.h... (cached) yes

                    checking for GNU libc compatible realloc... yes

                    checking for working strtod... yes

                    checking for fdatasync... yes

                    checking for getpagesize... (cached) yes

                    checking for gettimeofday... yes

                    checking for memmove... yes

                    checking for memset... yes

                    checking for mkdir... yes

                    checking for munmap... yes

                    checking for pow... yes

                    checking for realpath... yes

                    checking for regcomp... yes

                    checking for select... yes

                    checking for setlocale... yes

                    checking for socket... yes

                    checking for sqrt... yes

                    checking for strcasecmp... yes

                    checking for strchr... yes

                    checking for strdup... yes

                    checking for strerror... yes

                    checking for strncasecmp... yes

                    checking for strstr... yes

                    checking for strtoul... yes

                    checking for strtoull... yes

                    checking for pkg-config... /usr/bin/pkg-config

                    checking pkg-config is at least version 0.9.0... yes

                    checking for NCURSES... yes

                    checking for PCIUTILS... no

                    checking for library containing pci_get_dev... no

                    checking for LIBNL... no

                    checking for LIBNL... no

                    checking for LIBNL... no

                    configure: error: libnl and libnl-genl are required but were not found

                     

                    please do need full.

                    • 7. Re: measure power consumption on Edison board
                      Intel Corporation
                      This message was posted on behalf of Intel Corporation

                      Hi guys,

                      I found how to install the right packages of PCIUTILS and libnl. The commands to install the packages are the following:

                       

                      opkg install pciutils-dev
                      opkg install libnl-dev

                       

                      And try the ./configure command in the Powertop directory, it should run without problems and the system should found the packages.

                       

                      Configure.PNG


                      The next step is to run the make command, but it apparently shows the following error:

                       

                      Makeerror.PNG


                      I think that you're going to get the same error, so I'm investigating to try to fix it, I'll let you know if I find something else. Could you please try to follow my suggestion above to see if your results are the same.

                       

                      Regards,
                      -Leonardo

                      • 8. Re: measure power consumption on Edison board
                        IoT_srinivas

                        Hi Leonardo ,

                         

                        I was also facing same error.

                        please do need full.

                        • 9. Re: measure power consumption on Edison board
                          Intel Corporation
                          This message was posted on behalf of Intel Corporation

                          Hi IoT_srinivas,

                          Yes, just like I supossed. Right now I'm working on it.

                           

                          I'll let you know when I find something else, thank you for your patience.

                           

                          Regards,
                          -Leonardo

                          • 10. Re: measure power consumption on Edison board
                            Radhika.k

                            Hi Everyone,

                             

                                                I have installed the packages  of  PCIUTILS and LIBNL  and checked the packages by using the commands

                            opkg list | grep pciutils and opkg list | grep libnl ,I'm getting the version after ./configure from source code of powertop ,I'm facing the same issue of

                             

                            Checking for PCIUTILS....No

                            Checking for LIBNL.........No

                             

                                           I'm not knowing why this issue is coming,Please do needful.Any help and Every help is appreciated.

                             

                            Thanks and Regards,

                            Radhika

                            • 11. Re: measure power consumption on Edison board
                              Intel Corporation
                              This message was posted on behalf of Intel Corporation

                              Hi Radhika.k,

                              The way to install the right packages of PCIUTILS and libnl is in the last reply of my part, please check it and let us know if you later have the other problem that we are currently investigating.

                              We appreciate your patience.

                              Regards,
                              -Leonardo

                              • 12. Re: measure power consumption on Edison board
                                Intel Corporation
                                This message was posted on behalf of Intel Corporation

                                Hi guys,

                                We found the way to install PowerTOP in the Edison Board. The package is provided in the IOTDK repository (http://iotdk.intel.com/repos/3.5/iotdk/edison/core2-32), so please try to follow the next steps:

                                1. Add on the /etc/opkg/iotkit.conf file the following repos: 
                                src iotkit http://iotdk.intel.com/repos/3.5/intelgalactic/opkg/i586/ 
                                src iotdk-all http://iotdk.intel.com/repos/3.5/iotdk/edison/all 
                                src iotdk-core2-32 http://iotdk.intel.com/repos/3.5/iotdk/edison/core2-32 
                                src iotdk-edison http://iotdk.intel.com/repos/3.5/iotdk/edison/edison 


                                2. Run opkg update command.

                                3. Install PowerTOP with the command: opkg install powertop.

                                4. If you still have problems with libnl and pciutils, force reinstall on those packages: 
                                opkg install libnl --force-reinstall 
                                opkg install pciutils --force-reinstall 


                                I successfully installed PowerTOP with the steps that I gave you, so please try it and let me know if it works for you.

                                Thank you for remaining so positive.

                                Regards,
                                -Leonardo

                                • 13. Re: measure power consumption on Edison board
                                  Radhika.k

                                  Thank you very much Leonardo,Its working.

                                   

                                  Regards,

                                  Radhika

                                  • 14. Re: measure power consumption on Edison board
                                    Intel Corporation
                                    This message was posted on behalf of Intel Corporation

                                    Hi Radhika,

                                    That’s awesome, it was a pleasure to help you.

                                    Regards,
                                    -Leonardo

                                    1 2 Previous Next