Page 1 of 1

CPU speed - what is the running speed?

Posted: Thu Sep 14, 2017 8:45 pm
by fapplin
When I bring up the web page NanoPi-Monitor - it shows:

CPU total: undefined% (Sys: undefined%, User: undefined%, I/O wait: undefined%, Nice: undefined%)

CPU frequency: 120MHz

Governor: ondemand Active CPU cores: 4 Vcore: undefined

=======================================================================

If I do cpu_freqs at the prompt:

CPU0 online=1 temp=39005 governor=ondemand cur_freq=240000
CPU1 online=1 temp=39005 governor=ondemand cur_freq=240000
CPU2 online=1 temp=39005 governor=ondemand cur_freq=240000
CPU3 online=1 temp=39005 governor=ondemand cur_freq=240000

So, what speed is the CPU actually running at?

Frank

Re: CPU speed - what is the running speed?

Posted: Thu Sep 14, 2017 9:14 pm
by guidol
I think the easiest way to check the actual cpu speed is using
/usr/bin/armbianmonitor -m

root@NanoPiDuo:~# /usr/bin/armbianmonitor -m
Paketlisten werden gelesen... Fertig
Abhaengigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
fping is already the newest version (3.13-1).
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
Stop monitoring using [ctrl]-[c]
Time CPU load %cpu %sys %usr %nice %io %irq
00:10:46: 1008MHz 0.27 2% 0% 0% 0% 0% 0%
00:10:51: 120MHz 0.25 2% 0% 0% 0% 0% 0%
00:10:56: 120MHz 0.23 2% 0% 0% 0% 0% 0%
00:11:02: 240MHz 0.29 2% 0% 0% 0% 0% 0%
00:11:07: 120MHz 0.27 2% 0% 0% 0% 0% 0%
00:11:12: 240MHz 0.30 2% 0% 0% 0% 0% 0%
00:11:18: 120MHz 0.28 2% 0% 0% 0% 0% 0%
00:11:23: 240MHz 0.25 2% 0% 0% 0% 0% 0%^C
root@NanoPiDuo:~#

For the status-line on the rpimonitor webpage I did found that the rpimonitor-helper has problems to start.
The service is missing the file /boot/script.bin

Sep 15 01:11:29 NanoPiDuo systemd[1]: Starting LSB: RPi-Monitor sunxi-temp helper...
Sep 15 01:11:29 NanoPiDuo rpimonitor-helper[5548]: * Starting RPi-Monitor helper rpimonitor-helper
Sep 15 01:11:29 NanoPiDuo rpimonitor-helper[5548]: ...done.
Sep 15 01:11:29 NanoPiDuo systemd[1]: Started LSB: RPi-Monitor sunxi-temp helper.
Sep 15 01:11:29 NanoPiDuo rpimonitor-helper[5548]: Can not find script.bin. Ensure boot partition ...ted
Sep 15 01:27:31 NanoPiDuo systemd[1]: Started LSB: RPi-Monitor sunxi-temp helper.
Hint: Some lines were ellipsized, use -l to show in full.

The helper does only exit with error-code 0 (success....not really):
root@NanoPiDuo:/# /etc/init.d/rpimonitor-helper start
[ ok ] Starting rpimonitor-helper (via systemctl): rpimonitor-helper.service.
root@NanoPiDuo:/# /etc/init.d/rpimonitor-helper status
â rpimonitor-helper.service - LSB: RPi-Monitor sunxi-temp helper
Loaded: loaded (/etc/init.d/rpimonitor-helper; bad; vendor preset: enabled)
Active: active (exited) since Fr 2017-09-15 02:09:04 +03; 23s ago
Docs: man:systemd-sysv-generator(8)
Process: 6711 ExecStart=/etc/init.d/rpimonitor-helper start (code=exited, status=0/SUCCESS)



So the helper will not create the data for the webpage
( RPi-Monitor helper daemon for providing cpustats, Vcore and disk temperature )

Normally (here copied from my OrangePi Zero)the following files are in /tmp/
lrwxrwxrwx 1 root root 31 Sep 7 22:54 cpuminer -> /tmp/rpimonitor.XM1Qf7/cpuminer
lrwxrwxrwx 1 root root 30 Sep 7 22:54 cpustat -> /tmp/rpimonitor.XM1Qf7/cpustat
lrwxrwxrwx 1 root root 31 Sep 7 22:54 disktemp -> /tmp/rpimonitor.XM1Qf7/disktemp
lrwxrwxrwx 1 root root 33 Sep 7 22:54 dvfs-table -> /tmp/rpimonitor.XM1Qf7/dvfs-table
lrwxrwxrwx 1 root root 35 Sep 7 22:54 externaltemp -> /tmp/rpimonitor.XM1Qf7/externaltemp
lrwxrwxrwx 1 root root 28 Sep 7 22:54 khash -> /tmp/rpimonitor.XM1Qf7/khash
drwx--x--x 2 root root 180 Sep 7 22:54 rpimonitor.XM1Qf7
lrwxrwxrwx 1 root root 28 Sep 7 22:54 VCore -> /tmp/rpimonitor.XM1Qf7/VCore

But when the helper cant run there are no data which can be displayed :-(

Maybe FriendlyARM changed something while reconfiguring rpimonitor to NanoPi-Monitor

I did try to copy the script.bin from my OrangePi to the NanoPi Duo, but this didnt help.
The helper also didnt find this script.bin in /boot.... I dont know why....

Maybe we should deinstall the NanoPi version and install the real rpimonitor?
FriendlyARM whats your opinion about that?

Re: CPU speed - what is the running speed?

Posted: Thu Sep 14, 2017 10:45 pm
by elecdashtron
Typ ein
cpu_freq

om the terminal and you will get the actual freq. It should be 1.2Ghz on each core

Re: CPU speed - what is the running speed?

Posted: Fri Sep 15, 2017 12:11 am
by guidol
Hmm - after getting the script.bin from my Orange Pi PC and installing the needed things:
apt-get -f -qq -y install sunxi-tools (this for bin2fex)
apt-get install links hddtemp smartmontools

I could start the rpimonitor-helper manually:
/etc/init.d/rpimonitor-helper start

but get some error (but it do run and I got some files in /tmp/)

root@NanoPiDuo:~# /etc/init.d/rpimonitor-helper start
[ ok ] Starting rpimonitor-helper (via systemctl): rpimonitor-helper.service.
root@NanoPiDuo:~# /etc/init.d/rpimonitor-helper status
â rpimonitor-helper.service - LSB: RPi-Monitor sunxi-temp helper
Loaded: loaded (/etc/init.d/rpimonitor-helper; bad; vendor preset: enabled)
Active: active (running) since Fr 2017-09-15 02:52:35 +03; 13s ago
Docs: man:systemd-sysv-generator(8)
Process: 895 ExecStart=/etc/init.d/rpimonitor-helper start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/rpimonitor-helper.service
ââ901 /bin/bash /usr/local/sbin/rpimonitor-helper.sh /var/run/rpimonitor-helper.pid
ââ957 sleep 7.5

Sep 15 02:52:35 NanoPiDuo systemd[1]: Starting LSB: RPi-Monitor sunxi-temp helper...
Sep 15 02:52:35 NanoPiDuo rpimonitor-helper[895]: * Starting RPi-Monitor helper rpimonitor-helper
Sep 15 02:52:35 NanoPiDuo rpimonitor-helper[895]: ...done.
Sep 15 02:52:35 NanoPiDuo systemd[1]: Started LSB: RPi-Monitor sunxi-temp helper.
Sep 15 02:52:36 NanoPiDuo rpimonitor-helper[895]: /usr/local/sbin/rpimonitor-helper.sh: line 164...ory
Sep 15 02:52:36 NanoPiDuo rpimonitor-helper[895]: FATAL ERROR: Couldn't open "/boot/dtb/sun8i-h3...ory
Sep 15 02:52:36 NanoPiDuo rpimonitor-helper[895]: /tmp/dvfs-table: line 6: syntax error near une...fi'
Sep 15 02:52:36 NanoPiDuo rpimonitor-helper[895]: /tmp/dvfs-table: line 6: `fi'
Sep 15 02:52:36 NanoPiDuo rpimonitor-helper[895]: /usr/local/sbin/rpimonitor-helper.sh: line 73:...und
Sep 15 02:52:44 NanoPiDuo rpimonitor-helper[895]: /usr/local/sbin/rpimonitor-helper.sh: line 73:...und
Hint: Some lines were ellipsized, use -l to show in full.

Now I will go to sleep :) No Idea anymore....

Re: CPU speed - what is the running speed?

Posted: Fri Sep 15, 2017 4:39 pm
by fapplin
I used the cpu_freq command and got the following:

sudo cpu_freq
INFO: HARDWARE=sun8i
CPU0 online=1 temp=40822 governor=ondemand cur_freq=120000
CPU1 online=1 temp=41186 governor=ondemand cur_freq=240000
CPU2 online=1 temp=41186 governor=ondemand cur_freq=240000
CPU3 online=1 temp=41186 governor=ondemand cur_freq=240000

Re: CPU speed - what is the running speed?

Posted: Sun Sep 17, 2017 11:26 am
by guidol
fapplin wrote:
I used the cpu_freq command and got the following:

sudo cpu_freq
INFO: HARDWARE=sun8i
CPU0 online=1 temp=40822 governor=ondemand cur_freq=120000
CPU1 online=1 temp=41186 governor=ondemand cur_freq=240000
CPU2 online=1 temp=41186 governor=ondemand cur_freq=240000
CPU3 online=1 temp=41186 governor=ondemand cur_freq=240000

CPU0 online=1 temp=40822 governor=ondemand cur_freq=120000
means CPU0 online=1 temp=40.822 degree governor=ondemand cur_freq=120Mhz

CPU1 online=1 temp=41186 governor=ondemand cur_freq=240000
means CPU1 online=1 temp=41,186 degree governor=ondemand cur_freq=240Mhz

Because the cpu is in idle mode. If more calculating-power is needed the cpu would go up to 1.2Ghz (governor=ondemand) freq=120.000.000 on ervery core

https://www.kernel.org/doc/Documentatio ... ernors.txt
Ondemand
----------------
The CPUfreq governor "ondemand" sets the CPU frequency depending on the
current system load. Load estimation is triggered by the scheduler
through the update_util_data->func hook; when triggered, cpufreq checks
the CPU-usage statistics over the last period and the governor sets the
CPU accordingly. The CPU must have the capability to switch the
frequency very quickly.

Re: CPU speed - what is the running speed?

Posted: Thu Sep 21, 2017 4:11 pm
by fapplin
Thanks for the information!