Linux/Ubuntu2018. 5. 4. 18:09

PMIC가 있으면 소비전류를 모니터링 할 수 있을거 같은데



$ sudo apt-get install powertop

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following extra packages will be installed:

  libpci3

Suggested packages:

  cpufrequtils laptop-mode-tools

The following NEW packages will be installed:

  libpci3 powertop

0 upgraded, 2 newly installed, 0 to remove and 10 not upgraded.

Need to get 202 kB of archives.

After this operation, 538 kB of additional disk space will be used.

Do you want to continue? [Y/n]

Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main libpci3 armhf 1:3.2.1-3 [48.2 kB]

Get:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main powertop armhf 2.6.1-1 [154 kB]

Fetched 202 kB in 1s (113 kB/s)

Selecting previously unselected package libpci3:armhf.

(Reading database ... 155355 files and directories currently installed.)

Preparing to unpack .../libpci3_1%3a3.2.1-3_armhf.deb ...

Unpacking libpci3:armhf (1:3.2.1-3) ...

Selecting previously unselected package powertop.

Preparing to unpack .../powertop_2.6.1-1_armhf.deb ...

Unpacking powertop (2.6.1-1) ...

Processing triggers for man-db (2.7.5-1~bpo8+1) ...

Setting up libpci3:armhf (1:3.2.1-3) ...

Setting up powertop (2.6.1-1) ...

Processing triggers for libc-bin (2.19-18+deb8u10) ...

$ powertop

PowerTOP v2.6.1 must be run with root privileges.

exiting...

$ sudo powertop

Cannot load from file /var/cache/powertop/saved_results.powertop

Cannot load from file /var/cache/powertop/saved_parameters.powertop

RAPL device for cpu 0

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

RAPL device for cpu 0

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

Cannot load from file /var/cache/powertop/saved_parameters.powertop

Leaving PowerTOP


라즈베리 파이 2B에서 하니 ACPI가 없어서 인지

BMS가 없어서 인지 모르겠지만 아래 링크에서 처럼 배터리 관련 W 정보가 나오지 않는다.

PowerTOP 2.6.1    Overview   Idle stats   Frequency stats   Device stats   Tunables


Summary: 0.0 wakeups/second,  0.0 GPU ops/seconds, 0.0 VFS ops/sec and 7.2% CPU use


                Usage       Events/s    Category       Description

             51.1 ms/s      0.00        Process        powertop

              3.3 ms/s      0.00        Interrupt      [62] dwc_otg_hcd:usb1

              2.0 ms/s      0.00        Process        /usr/bin/python /usr/bin/fail2ban-server -b -s /va

              1.6 ms/s      0.00        Interrupt      [62] dwc_otg

              1.6 ms/s      0.00        Process        /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib

              1.5 ms/s      0.00        Process        [kworker/3:2]

              1.1 ms/s      0.00        Interrupt      [17] arch_timer

              1.0 ms/s      0.00        Interrupt      [62] dwc_otg_pcd

              0.8 ms/s      0.00        Process        [migration/0]

              0.7 ms/s      0.00        Process        [migration/1]

              0.7 ms/s      0.00        Process        [migration/2]

            685.3 µs/s      0.00        Interrupt      [7] sched(softirq)

            628.8 µs/s      0.00        Timer          hrtimer_wakeup

            514.7 µs/s      0.00        Process        sshd: pi@pts/0

            509.5 µs/s      0.00        Timer          tick_sched_timer

            426.9 µs/s      0.00        Process        [migration/3]

            380.7 µs/s      0.00        Interrupt      [9] RCU(softirq) 


odroid U3 에는 그래도 PMIC가 있어서 기대를 했는데 똑같이 BMS가 없어서 그런지 안나오는건 여전하다.

PowerTOP 2.8      Overview   Idle stats   Frequency stats   Device stats   Tunables


Summary: nan wakeups/second,  nan GPU ops/seconds, nan VFS ops/sec and -0.0% CPU use


                Usage       Events/s    Category       Description

            100.0%                      Device         USB device: S5P EHCI Host Controller

            100.0%                      Device         USB device: usb-device-0424-9730

              7.6 pkts/s                Device         Network interface: eth0 (smsc95xx)

              0.0%                      Device         USB device: EXYNOS OHCI Host Controller

              0.0%                      Device         runtime-reg-fixed-voltage.0

             10.8%                      Device         USB device: usb-device-0424-3503

              0.0%                      Device         I2C Device (8-0038): s5p_hdmiphy

              0.0%                      Device         I2C Adapter (i2c-1): s3c2410-i2c

              0.0%                      Device         I2C Adapter (i2c-2): i2c-gpio2

              0.0%                      Device         I2C Adapter (i2c-3): s3c2410-i2c

              0.0%                      Device         I2C Adapter (i2c-0): s3c2410-i2c

              0.0%                      Device         I2C Adapter (i2c-7): s3c2410-i2c

              0.0%                      Device         I2C Adapter (i2c-8): s3c2410-i2c

              0.0%                      Device         I2C Device (0-0006): dummy

              0.0%                      Device         I2C Device (0-0008): usb3503

              0.0%                      Device         I2C Device (0-0009): max77686

              0.0%                      Device         I2C Device (1-0010): max98090

              0.0%                      Device         I2C Device (2-0050): s5p_ddc 


[링크 : https://askubuntu.com/questions/73904/how-do-i-monitor-power-consumption]

Posted by 구차니