• Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Evok high CPU usage

    Official EVOK API
    2
    10
    3205
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tempurpri last edited by tempurpri

      Hello,
      i've tried using Evok on my Neuron but after each reboot the CPU usage for /usr/bin/python /opt/evok/evok.py keeps at or areound 100% (as shown by htop) at all times. I don't consider this normal ... or is it ?

      service evok status
      

      reports that evok is active.

      /var/log/evok is completely empty ... so; I guess the question is if CPU (one of the cores) usage of 100% is by design or is there something I can check to see what's happening ?

      T 1 Reply Last reply Reply Quote 0
      • T
        TomasKnot @tempurpri last edited by TomasKnot

        @tempurpri

        This does seem very odd. It's possible that EVOK would use up a single core entirely under heavy use - it has minor multithreading, but it's built on the Tornado webserver, which unlike django et al. is primarily single-threaded - but it shouldn't be at all times.

        Could you please describe which Neuron unit you have, in what way you are using EVOK and which (if any) changes you have made to the system? This is merely a precautionary measure, as we have had e.g. customers connecting foreign SPI devices to our bus, and then being surprised by the system malfunctioning due to conflicts.

        As for debugging info - if you can run EVOK manually (i.e. python /opt/evok/evok.py; needs root privileges) and paste the output here, that would be great help; normally only exceptions are logged (you can change this in the /etc/evok.conf file). Other things that could help us would be the output from
        a)

        lsmod
        

        b)

        i2cdetect 1
        

        c)

        ps -fax
        
        1 Reply Last reply Reply Quote 0
        • T
          tempurpri last edited by

          I'll have access to the device later in the day and I'll post the requested data at the time.

          For now I have the following information:
          -Neuron S103
          -nothing is explicitly connected to or using EVOK yet. The CPU usage occurs either immediately after power up if EVOK is enabled as a service, otherwise if I disable the service (systemctl disable evok) and start it manually (systemctl start evok), the same thing happens, so it is completely reprodcible on my system
          -nothing other that a power supply is connected to the Neuron
          -Open source OS was loaded from your repository
          -installed software (all in the initial post-install blank state, no running projects, CPU sits at ~0% idle when EVOK is disabled)
          Pixel desktop with LightDM login manager
          Codesys runtime (started but without any projet)
          node.js
          Node-red (not started, just installed)
          Leafpad text editor
          Geany programmer editor

          Neuron is connected to active Network, RealVNC is running and SSH is enabled.

          In short, I installed some basic software that I need (and know from using Raspbian), no projects yet. I planned on using EVOK to access Neuron's I/Os and other optional devices in the future.

          I do remember that there was an error reported during the installation of EVOK (in the python installation code), however I've re-downloaded it (the "master" branch, as instructed) and re-installed it three times with the same result - everything seems to have been installed nevertheless. I'll try to get the installation log if it's possibly relevant.

          I haven't tried running it with "python /opt/evok/evok.py" yet - will do (is it any different that systemctl start evok ?)

          1 Reply Last reply Reply Quote 0
          • T
            tempurpri last edited by

            a) lsmod

            Module                  Size  Used by
            fuse                   99603  3
            can_raw                 7426  0
            can                    31515  1 can_raw
            bluetooth             365780  0
            w1_therm                6401  0
            w1_gpio                 4818  0
            ds2482                  4427  0
            wire                   32619  3 ds2482,w1_gpio,w1_therm
            at24                    7587  0
            rtc_ds1307             13908  0
            cn                      5889  1 wire
            hwmon                  10552  1 rtc_ds1307
            nvmem_core             13774  1 at24
            spidev                  7373  0
            brcmfmac              292632  0
            brcmutil                9863  1 brcmfmac
            cfg80211              544545  1 brcmfmac
            rfkill                 20851  5 bluetooth,cfg80211
            i2c_bcm2835             7167  0
            bcm2835_gpiomem         3940  0
            spi_bcm2835             7596  0
            uio_pdrv_genirq         3923  0
            fixed                   3285  0
            uio                    10204  1 uio_pdrv_genirq
            i2c_bcm2708             5994  0
            i2c_dev                 6913  0
            ip_tables              13161  0
            x_tables               20578  1 ip_tables
            ipv6                  408900  26
            

            b) i2cdetect 1

            WARNING! This program can confuse your I2C bus, cause data loss and worse!
            I will probe file /dev/i2c-1.
            I will probe address range 0x03-0x77.
            Continue? [Y/n] y
                 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
            00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
            10: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 
            20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
            30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
            40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
            50: -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- -- 
            60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- UU 
            70: -- -- -- -- -- -- -- --                       
            

            c)ps -fax (evok running)

             PID TTY      STAT   TIME COMMAND
                2 ?        S      0:00 [kthreadd]
                3 ?        S      0:00  \_ [ksoftirqd/0]
                4 ?        S      0:00  \_ [kworker/0:0]
                5 ?        S<     0:00  \_ [kworker/0:0H]
                6 ?        S      0:00  \_ [kworker/u8:0]
                7 ?        S      0:00  \_ [rcu_sched]
                8 ?        S      0:00  \_ [rcu_bh]
                9 ?        S      0:00  \_ [migration/0]
               10 ?        S<     0:00  \_ [lru-add-drain]
               11 ?        S      0:00  \_ [cpuhp/0]
               12 ?        S      0:00  \_ [cpuhp/1]
               13 ?        S      0:00  \_ [migration/1]
               14 ?        S      0:00  \_ [ksoftirqd/1]
               15 ?        S      0:00  \_ [kworker/1:0]
               16 ?        S<     0:00  \_ [kworker/1:0H]
               17 ?        S      0:00  \_ [cpuhp/2]
               18 ?        S      0:00  \_ [migration/2]
               19 ?        S      0:00  \_ [ksoftirqd/2]
               20 ?        S      0:00  \_ [kworker/2:0]
               21 ?        S<     0:00  \_ [kworker/2:0H]
               22 ?        S      0:00  \_ [cpuhp/3]
               23 ?        S      0:00  \_ [migration/3]
               24 ?        S      0:00  \_ [ksoftirqd/3]
               25 ?        S      0:00  \_ [kworker/3:0]
               26 ?        S<     0:00  \_ [kworker/3:0H]
               27 ?        S      0:00  \_ [kdevtmpfs]
               28 ?        S<     0:00  \_ [netns]
               29 ?        S      0:00  \_ [khungtaskd]
               30 ?        S      0:00  \_ [oom_reaper]
               31 ?        S<     0:00  \_ [writeback]
               32 ?        S      0:00  \_ [kcompactd0]
               33 ?        S<     0:00  \_ [crypto]
               34 ?        S<     0:00  \_ [bioset]
               35 ?        S<     0:00  \_ [kblockd]
               36 ?        S<     0:00  \_ [watchdogd]
               37 ?        S      0:00  \_ [kworker/0:1]
               38 ?        S<     0:00  \_ [rpciod]
               39 ?        S<     0:00  \_ [xprtiod]
               40 ?        S      0:00  \_ [kswapd0]
               41 ?        S<     0:00  \_ [vmstat]
               42 ?        S<     0:00  \_ [nfsiod]
               52 ?        S<     0:00  \_ [kthrotld]
               53 ?        S<     0:00  \_ [bioset]
               54 ?        S<     0:00  \_ [bioset]
               55 ?        S<     0:00  \_ [bioset]
               56 ?        S<     0:00  \_ [bioset]
               57 ?        S<     0:00  \_ [bioset]
               58 ?        S<     0:00  \_ [bioset]
               59 ?        S<     0:00  \_ [bioset]
               60 ?        S<     0:00  \_ [bioset]
               61 ?        S<     0:00  \_ [bioset]
               62 ?        S<     0:00  \_ [bioset]
               63 ?        S<     0:00  \_ [bioset]
               64 ?        S<     0:00  \_ [bioset]
               65 ?        S<     0:00  \_ [bioset]
               66 ?        S<     0:00  \_ [bioset]
               67 ?        S<     0:00  \_ [bioset]
               68 ?        S<     0:00  \_ [bioset]
               69 ?        S<     0:00  \_ [bioset]
               70 ?        S<     0:00  \_ [bioset]
               71 ?        S<     0:00  \_ [bioset]
               72 ?        S<     0:00  \_ [bioset]
               73 ?        S<     0:00  \_ [bioset]
               74 ?        S<     0:00  \_ [bioset]
               75 ?        S<     0:00  \_ [bioset]
               76 ?        S<     0:00  \_ [bioset]
               77 ?        S<     0:00  \_ [iscsi_eh]
               78 ?        S<     0:00  \_ [dwc_otg]
               79 ?        S      0:00  \_ [kworker/2:1]
               80 ?        S<     0:00  \_ [DWC Notificatio]
               81 ?        S<     0:00  \_ [VCHIQ-0]
               82 ?        S<     0:00  \_ [VCHIQr-0]
               83 ?        S<     0:00  \_ [VCHIQs-0]
               84 ?        S      0:00  \_ [VCHIQka-0]
               85 ?        S<     0:00  \_ [SMIO]
               86 ?        S      0:00  \_ [kworker/2:2]
               87 ?        S      0:00  \_ [irq/92-mmc1]
               88 ?        S      0:00  \_ [kworker/2:3]
               89 ?        S      0:00  \_ [kworker/1:1]
               90 ?        S<     0:00  \_ [bioset]
               91 ?        S      0:01  \_ [mmcqd/0]
               92 ?        S      0:00  \_ [jbd2/mmcblk0p2-]
               93 ?        S<     0:00  \_ [ext4-rsv-conver]
               94 ?        S      0:00  \_ [kworker/3:1]
               95 ?        S<     0:00  \_ [ipv6_addrconf]
              112 ?        S      0:00  \_ [kworker/u8:1]
              126 ?        S      0:00  \_ [kworker/1:2]
              142 ?        S      0:00  \_ [kworker/3:2]
              163 ?        S      0:00  \_ [kworker/0:2]
              193 ?        S      0:00  \_ [spi0]
              228 ?        S<     0:00  \_ [cfg80211]
              232 ?        S<     0:00  \_ [brcmf_wq/mmc1:0]
              233 ?        S      0:00  \_ [brcmf_wdog/mmc1]
              246 ?        S      0:00  \_ [kworker/0:3]
              268 ?        S      0:00  \_ [kworker/u8:2]
              292 ?        S      0:00  \_ [w1_bus_master1]
              360 ?        S      0:00  \_ [kworker/1:3]
              427 ?        S<     0:00  \_ [kworker/3:1H]
              533 ?        S<     0:00  \_ [kworker/1:1H]
              534 ?        S<     0:00  \_ [kworker/0:1H]
                1 ?        Ss     0:02 /sbin/init splash
              118 ?        Ss     0:00 /lib/systemd/systemd-journald
              150 ?        Ss     0:00 /lib/systemd/systemd-udevd
              301 ?        Ssl    0:00 /lib/systemd/systemd-timesyncd
              335 ?        SNsl   0:16 node-red
              337 ?        Ss     0:00 /lib/systemd/systemd-logind
              339 ?        Ssl    0:00 /usr/sbin/rsyslogd -n
              342 ?        Ss     0:00 /usr/bin/dbus-daemon --system --address=systemd: --no
              375 ?        Ss     0:00 /usr/sbin/cupsd -l
              516 ?        S      0:00  \_ /usr/lib/cups/notifier/dbus dbus://
              762 ?        S      0:00  \_ /usr/lib/cups/notifier/dbus dbus://
              376 ?        Ss     0:00 /usr/sbin/thd --triggers /etc/triggerhappy/triggers.d
              378 ?        Ss     0:00 /opt/neuron-bin/neuron_tcp_server -p 502 --check-firm
              379 ?        Ss     0:00 avahi-daemon: running [S103-sn344.local]
              416 ?        S      0:00  \_ avahi-daemon: chroot helper
              387 ?        Ss     0:00 /usr/sbin/cron -f
              393 ?        Ss     0:00 /sbin/wpa_supplicant -s -B -P /run/wpa_supplicant.wla
              422 ?        Ssl    0:00 /usr/sbin/cups-browsed
              476 ?        S      0:01 /opt/codesys/bin/codesyscontrol.bin /etc/CODESYSContr
              521 ?        Sl     0:06  \_ /opt/codesys/bin/codesyscontrol.bin /etc/CODESYSC
              592 ?        Ss     0:00 /sbin/dhclient -4 -v -pf /run/dhclient.eth0.pid -lf /
              639 ?        Ss     0:00 /usr/bin/vncserver-x11-serviced -fg
              652 ?        S      0:01  \_ /usr/bin/vncserver-x11-core -service
              643 ?        Ss     0:00 /usr/sbin/sshd -D
              656 ?        Ssl    0:00 /usr/sbin/lightdm
              671 tty7     Ssl+   0:01  \_ /usr/lib/xorg/Xorg :0 -seat seat0 -auth /var/run/
              741 ?        Sl     0:00  \_ lightdm --session-child 14 17
              767 ?        Ssl    0:00      \_ /usr/bin/lxsession -s LXDE-pi -e LXDE
              821 ?        Ss     0:00          \_ /usr/bin/ssh-agent x-session-manager
              842 ?        S      0:00          \_ openbox --config-file /home/pi/.config/op
              853 ?        Sl     0:01          \_ lxpanel --profile LXDE-pi
             1022 ?        Sl     0:00          |   \_ termit
             1028 pts/0    Ss     0:00          |       \_ /bin/bash
             1042 pts/0    R+     0:00          |           \_ ps -fax
              855 ?        Sl     0:01          \_ pcmanfm --desktop --profile LXDE-pi
              856 ?        S      0:00          \_ xscreensaver -no-splash
              661 tty1     Ss     0:00 /bin/login -f
              725 tty1     S+     0:00  \_ -bash
              665 ?        Ss     0:00 /sbin/netplugd -p /var/run/netplugd.pid
              701 ?        Ss     0:00 /lib/systemd/systemd --user
              714 ?        S      0:00  \_ (sd-pam)
              777 ?        Ss     0:00  \_ /usr/bin/dbus-daemon --session --address=systemd:
              827 ?        Ssl    0:00  \_ /usr/lib/gvfs/gvfsd
              832 ?        Sl     0:00  \_ /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -
              900 ?        Sl     0:00  \_ /usr/lib/dconf/dconf-service
              940 ?        Ssl    0:00  \_ /usr/lib/gvfs/gvfs-udisks2-volume-monitor
              958 ?        Ssl    0:00  \_ /usr/lib/gvfs/gvfs-afc-volume-monitor
              963 ?        Ssl    0:00  \_ /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
              967 ?        Ssl    0:00  \_ /usr/lib/gvfs/gvfs-goa-volume-monitor
              971 ?        Ssl    0:00  \_ /usr/lib/gvfs/gvfs-mtp-volume-monitor
              980 ?        Sl     0:00  \_ /usr/lib/gvfs/gvfsd-trash --spawner :1.5 /org/gtk
              710 ?        S      0:00 /usr/bin/vncagent service 15
              770 ?        Ssl    0:00 /usr/lib/colord/colord
              861 ?        Ss     0:00 /usr/bin/ssh-agent -s
              863 ?        Sl     0:00 light-locker
              865 ?        Sl     0:00 /usr/lib/at-spi2-core/at-spi-bus-launcher --launch-im
              873 ?        S      0:00  \_ /usr/bin/dbus-daemon --config-file=/usr/share/def
              875 ?        S      0:00 /usr/bin/vncserverui service 17
              912 ?        S      0:00  \_ /usr/bin/vncserverui -statusicon 7
              919 ?        Sl     0:00 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-s
              933 ?        Ssl    0:00 /usr/lib/menu-cache/menu-cached /run/user/1000/menu-c
              943 ?        Ssl    0:00 /usr/lib/udisks2/udisksd --no-debug
              949 ?        Ssl    0:00 /usr/lib/policykit-1/polkitd --no-debug
             1041 ?        Rs     0:00 /usr/bin/python /opt/evok/evok.py
            

            ps -fax (evok not running)

              PID TTY      STAT   TIME COMMAND
                2 ?        S      0:00 [kthreadd]
                3 ?        S      0:00  \_ [ksoftirqd/0]
                4 ?        S      0:00  \_ [kworker/0:0]
                5 ?        S<     0:00  \_ [kworker/0:0H]
                6 ?        S      0:00  \_ [kworker/u8:0]
                7 ?        S      0:00  \_ [rcu_sched]
                8 ?        S      0:00  \_ [rcu_bh]
                9 ?        S      0:00  \_ [migration/0]
               10 ?        S<     0:00  \_ [lru-add-drain]
               11 ?        S      0:00  \_ [cpuhp/0]
               12 ?        S      0:00  \_ [cpuhp/1]
               13 ?        S      0:00  \_ [migration/1]
               14 ?        S      0:00  \_ [ksoftirqd/1]
               15 ?        S      0:00  \_ [kworker/1:0]
               16 ?        S<     0:00  \_ [kworker/1:0H]
               17 ?        S      0:00  \_ [cpuhp/2]
               18 ?        S      0:00  \_ [migration/2]
               19 ?        S      0:00  \_ [ksoftirqd/2]
               20 ?        S      0:00  \_ [kworker/2:0]
               21 ?        S<     0:00  \_ [kworker/2:0H]
               22 ?        S      0:00  \_ [cpuhp/3]
               23 ?        S      0:00  \_ [migration/3]
               24 ?        S      0:00  \_ [ksoftirqd/3]
               25 ?        S      0:00  \_ [kworker/3:0]
               26 ?        S<     0:00  \_ [kworker/3:0H]
               27 ?        S      0:00  \_ [kdevtmpfs]
               28 ?        S<     0:00  \_ [netns]
               29 ?        S      0:00  \_ [khungtaskd]
               30 ?        S      0:00  \_ [oom_reaper]
               31 ?        S<     0:00  \_ [writeback]
               32 ?        S      0:00  \_ [kcompactd0]
               33 ?        S<     0:00  \_ [crypto]
               34 ?        S<     0:00  \_ [bioset]
               35 ?        S<     0:00  \_ [kblockd]
               36 ?        S<     0:00  \_ [watchdogd]
               37 ?        S      0:00  \_ [kworker/0:1]
               38 ?        S<     0:00  \_ [rpciod]
               39 ?        S<     0:00  \_ [xprtiod]
               40 ?        S      0:00  \_ [kswapd0]
               41 ?        S<     0:00  \_ [vmstat]
               42 ?        S<     0:00  \_ [nfsiod]
               52 ?        S<     0:00  \_ [kthrotld]
               53 ?        S<     0:00  \_ [bioset]
               54 ?        S<     0:00  \_ [bioset]
               55 ?        S<     0:00  \_ [bioset]
               56 ?        S<     0:00  \_ [bioset]
               57 ?        S<     0:00  \_ [bioset]
               58 ?        S<     0:00  \_ [bioset]
               59 ?        S<     0:00  \_ [bioset]
               60 ?        S<     0:00  \_ [bioset]
               61 ?        S<     0:00  \_ [bioset]
               62 ?        S<     0:00  \_ [bioset]
               63 ?        S<     0:00  \_ [bioset]
               64 ?        S<     0:00  \_ [bioset]
               65 ?        S<     0:00  \_ [bioset]
               66 ?        S<     0:00  \_ [bioset]
               67 ?        S<     0:00  \_ [bioset]
               68 ?        S<     0:00  \_ [bioset]
               69 ?        S<     0:00  \_ [bioset]
               70 ?        S<     0:00  \_ [bioset]
               71 ?        S<     0:00  \_ [bioset]
               72 ?        S<     0:00  \_ [bioset]
               73 ?        S<     0:00  \_ [bioset]
               74 ?        S<     0:00  \_ [bioset]
               75 ?        S<     0:00  \_ [bioset]
               76 ?        S<     0:00  \_ [bioset]
               77 ?        S<     0:00  \_ [iscsi_eh]
               78 ?        S<     0:00  \_ [dwc_otg]
               79 ?        S      0:00  \_ [kworker/2:1]
               80 ?        S<     0:00  \_ [DWC Notificatio]
               81 ?        S<     0:00  \_ [VCHIQ-0]
               82 ?        S<     0:00  \_ [VCHIQr-0]
               83 ?        S<     0:00  \_ [VCHIQs-0]
               84 ?        S      0:00  \_ [VCHIQka-0]
               85 ?        S<     0:00  \_ [SMIO]
               86 ?        S      0:00  \_ [kworker/2:2]
               87 ?        S      0:00  \_ [irq/92-mmc1]
               88 ?        S      0:00  \_ [kworker/2:3]
               89 ?        S      0:00  \_ [kworker/1:1]
               90 ?        S<     0:00  \_ [bioset]
               91 ?        S      0:01  \_ [mmcqd/0]
               92 ?        S      0:00  \_ [jbd2/mmcblk0p2-]
               93 ?        S<     0:00  \_ [ext4-rsv-conver]
               94 ?        S      0:00  \_ [kworker/3:1]
               95 ?        S<     0:00  \_ [ipv6_addrconf]
              112 ?        S      0:00  \_ [kworker/u8:1]
              126 ?        S      0:00  \_ [kworker/1:2]
              142 ?        S      0:00  \_ [kworker/3:2]
              163 ?        S      0:00  \_ [kworker/0:2]
              193 ?        S      0:00  \_ [spi0]
              228 ?        S<     0:00  \_ [cfg80211]
              232 ?        S<     0:00  \_ [brcmf_wq/mmc1:0]
              233 ?        S      0:00  \_ [brcmf_wdog/mmc1]
              246 ?        S      0:00  \_ [kworker/0:3]
              268 ?        S      0:00  \_ [kworker/u8:2]
              292 ?        S      0:00  \_ [w1_bus_master1]
              360 ?        S      0:00  \_ [kworker/1:3]
              427 ?        S<     0:00  \_ [kworker/3:1H]
              533 ?        S<     0:00  \_ [kworker/1:1H]
              534 ?        S<     0:00  \_ [kworker/0:1H]
             1115 ?        S<     0:00  \_ [kworker/2:1H]
                1 ?        Ss     0:02 /sbin/init splash
              118 ?        Ss     0:01 /lib/systemd/systemd-journald
              150 ?        Ss     0:00 /lib/systemd/systemd-udevd
              301 ?        Ssl    0:00 /lib/systemd/systemd-timesyncd
              335 ?        SNsl   0:17 node-red
              337 ?        Ss     0:00 /lib/systemd/systemd-logind
              339 ?        Ssl    0:00 /usr/sbin/rsyslogd -n
              342 ?        Ss     0:00 /usr/bin/dbus-daemon --system --address=systemd: --no
              375 ?        Ss     0:00 /usr/sbin/cupsd -l
              516 ?        S      0:00  \_ /usr/lib/cups/notifier/dbus dbus://
              762 ?        S      0:00  \_ /usr/lib/cups/notifier/dbus dbus://
              376 ?        Ss     0:00 /usr/sbin/thd --triggers /etc/triggerhappy/triggers.d
              378 ?        Ss     0:00 /opt/neuron-bin/neuron_tcp_server -p 502 --check-firm
              379 ?        Ss     0:00 avahi-daemon: running [S103-sn344.local]
              416 ?        S      0:00  \_ avahi-daemon: chroot helper
              387 ?        Ss     0:00 /usr/sbin/cron -f
              393 ?        Ss     0:00 /sbin/wpa_supplicant -s -B -P /run/wpa_supplicant.wla
              422 ?        Ssl    0:00 /usr/sbin/cups-browsed
              476 ?        S      0:01 /opt/codesys/bin/codesyscontrol.bin /etc/CODESYSContr
              521 ?        Sl     0:16  \_ /opt/codesys/bin/codesyscontrol.bin /etc/CODESYSC
              592 ?        Ss     0:00 /sbin/dhclient -4 -v -pf /run/dhclient.eth0.pid -lf /
              639 ?        Ss     0:00 /usr/bin/vncserver-x11-serviced -fg
              652 ?        R      0:07  \_ /usr/bin/vncserver-x11-core -service
              643 ?        Ss     0:00 /usr/sbin/sshd -D
              656 ?        Ssl    0:00 /usr/sbin/lightdm
              671 tty7     Rsl+   0:08  \_ /usr/lib/xorg/Xorg :0 -seat seat0 -auth /var/run/
              741 ?        Sl     0:00  \_ lightdm --session-child 14 17
              767 ?        Ssl    0:00      \_ /usr/bin/lxsession -s LXDE-pi -e LXDE
              821 ?        Ss     0:00          \_ /usr/bin/ssh-agent x-session-manager
              842 ?        S      0:00          \_ openbox --config-file /home/pi/.config/op
              853 ?        Sl     0:02          \_ lxpanel --profile LXDE-pi
             1022 ?        Sl     0:04          |   \_ termit
             1028 pts/0    Ss     0:00          |   |   \_ /bin/bash
             1159 pts/0    R+     0:00          |   |       \_ ps -fax
             1126 ?        Sl     0:00          |   \_ termit
             1132 pts/1    Ss+    0:00          |       \_ /bin/bash
              855 ?        Sl     0:01          \_ pcmanfm --desktop --profile LXDE-pi
              856 ?        S      0:00          \_ xscreensaver -no-splash
              661 tty1     Ss     0:00 /bin/login -f
              725 tty1     S+     0:00  \_ -bash
              665 ?        Ss     0:00 /sbin/netplugd -p /var/run/netplugd.pid
              701 ?        Ss     0:00 /lib/systemd/systemd --user
              714 ?        S      0:00  \_ (sd-pam)
              777 ?        Ss     0:00  \_ /usr/bin/dbus-daemon --session --address=systemd:
              827 ?        Ssl    0:00  \_ /usr/lib/gvfs/gvfsd
              832 ?        Sl     0:00  \_ /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -
              900 ?        Sl     0:00  \_ /usr/lib/dconf/dconf-service
              940 ?        Ssl    0:00  \_ /usr/lib/gvfs/gvfs-udisks2-volume-monitor
              958 ?        Ssl    0:00  \_ /usr/lib/gvfs/gvfs-afc-volume-monitor
              963 ?        Ssl    0:00  \_ /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
              967 ?        Ssl    0:00  \_ /usr/lib/gvfs/gvfs-goa-volume-monitor
              971 ?        Ssl    0:00  \_ /usr/lib/gvfs/gvfs-mtp-volume-monitor
              980 ?        Sl     0:00  \_ /usr/lib/gvfs/gvfsd-trash --spawner :1.5 /org/gtk
              710 ?        S      0:01 /usr/bin/vncagent service 15
              770 ?        Ssl    0:00 /usr/lib/colord/colord
              861 ?        Ss     0:00 /usr/bin/ssh-agent -s
              863 ?        Sl     0:00 light-locker
              865 ?        Sl     0:00 /usr/lib/at-spi2-core/at-spi-bus-launcher --launch-im
              873 ?        S      0:00  \_ /usr/bin/dbus-daemon --config-file=/usr/share/def
              875 ?        S      0:00 /usr/bin/vncserverui service 17
              912 ?        S      0:00  \_ /usr/bin/vncserverui -statusicon 7
              919 ?        Sl     0:00 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-s
              933 ?        Ssl    0:00 /usr/lib/menu-cache/menu-cached /run/user/1000/menu-c
              943 ?        Ssl    0:00 /usr/lib/udisks2/udisksd --no-debug
              949 ?        Ssl    0:00 /usr/lib/policykit-1/polkitd --no-debug
            
            1 Reply Last reply Reply Quote 0
            • T
              tempurpri last edited by tempurpri

              I managed to get the CPU usage down...port 8080 which is used by default by EVOK is also used by default by Codesys WebVisu.

              I reinstalled Evok using ports 85 (instead of 80) and 8085 instead of 8080.

              Although the CPU usage went down immediately after this, evok still doesn't work.

              Further testing:

              ~ $ sudo grep S103 /sys/bus/i2c/devices/1-0057/eeprom
              Binary file /sys/bus/i2c/devices/1-0057/eeprom matches
              
              ~ $ sudo python /opt/evok/evok.py
              [I 171207 01:21:42 config:66] eprom: UniPi Neuron S103 version: 1.0 serial: 0x158
              [I 171207 01:21:42 evok:1640] Starting using config file /etc/evok.conf
              [I 171207 01:21:42 config:78] YAML Definition loaded: CUSTOM MODBUS DEVICE.yaml, type: 3, definition count 0
              [I 171207 01:21:42 config:78] YAML Definition loaded: L30x.yaml, type: 3, definition count 1
              [I 171207 01:21:42 config:78] YAML Definition loaded: M50x.yaml, type: 3, definition count 2
              [I 171207 01:21:42 config:78] YAML Definition loaded: L40x.yaml, type: 3, definition count 3
              [I 171207 01:21:42 config:78] YAML Definition loaded: xS40.yaml, type: 3, definition count 4
              [I 171207 01:21:43 config:78] YAML Definition loaded: M30x.yaml, type: 3, definition count 5
              [I 171207 01:21:43 config:78] YAML Definition loaded: M40x.yaml, type: 3, definition count 6
              [I 171207 01:21:43 config:78] YAML Definition loaded: xS50.yaml, type: 3, definition count 7
              [I 171207 01:21:43 config:78] YAML Definition loaded: L50x.yaml, type: 3, definition count 8
              [I 171207 01:21:44 config:78] YAML Definition loaded: L51x.yaml, type: 3, definition count 9
              [I 171207 01:21:44 config:78] YAML Definition loaded: M20x.yaml, type: 3, definition count 10
              [I 171207 01:21:44 config:78] YAML Definition loaded: DALI.yaml, type: 3, definition count 11
              [I 171207 01:21:44 config:78] YAML Definition loaded: S10x.yaml, type: 3, definition count 12
              [I 171207 01:21:44 config:78] YAML Definition loaded: L20x.yaml, type: 3, definition count 13
              [I 171207 01:21:44 config:78] YAML Definition loaded: xS10.yaml, type: 3, definition count 14
              [I 171207 01:21:45 config:78] YAML Definition loaded: M10x.yaml, type: 3, definition count 15
              [I 171207 01:21:45 config:78] YAML Definition loaded: xS30.yaml, type: 3, definition count 16
              [I 171207 01:21:45 config:78] YAML Definition loaded: evok-alias.yaml, type: 2, definition count 0
              [I 171207 01:21:45 evok:1704] HTTP server listening on port: 8085
              [I 171207 01:21:45 modbusclient_tornado:125] SPI client started
              [I 171207 01:21:45 neuron:173] Reading SPI boards
              [I 171207 01:21:45 neuron:188] No board on SPI 1
              Process OwBusDriver-1:
              Traceback (most recent call last):
                File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
                  self.run()
                File "/opt/evok/owclient.py", line 375, in run
              [I 171207 01:21:45 neuron:188] No board on SPI 2
                  ow.init(self.bus)
                File "/usr/lib/python2.7/dist-packages/ow/__init__.py", line 224, in init
                  raise exNoController
              exNoController
              [I 171207 01:21:45 neuron:188] No board on SPI 3
              [E 171207 01:21:45 config:358] Invalid device circuit number 1_01
                  Traceback (most recent call last):
                    File "/opt/evok/config.py", line 353, in add_aliases
                      dev_obj = Devices.by_int(dev_pointer["dev_type"], dev_pointer["circuit"])
                    File "/opt/evok/devices.py", line 67, in by_int
                      raise Exception('Invalid device circuit number %s' % str(circuit))
                  Exception: Invalid device circuit number 1_01
              [E 171207 01:21:45 config:358] Invalid device circuit number 1_02
                  Traceback (most recent call last):
                    File "/opt/evok/config.py", line 353, in add_aliases
                      dev_obj = Devices.by_int(dev_pointer["dev_type"], dev_pointer["circuit"])
                    File "/opt/evok/devices.py", line 67, in by_int
                      raise Exception('Invalid device circuit number %s' % str(circuit))
                  Exception: Invalid device circuit number 1_02
              [E 171207 01:21:45 neuron:227] 'NoneType' object has no attribute 'do_scan'
                  Traceback (most recent call last):
                    File "/opt/evok/neuron.py", line 225, in scan_boards
                      yield self.modbus_cache_map.do_scan()
                  AttributeError: 'NoneType' object has no attribute 'do_scan'
              [E 171207 01:21:46 neuron:227] 'NoneType' object has no attribute 'do_scan'
                  Traceback (most recent call last):
                    File "/opt/evok/neuron.py", line 225, in scan_boards
                      yield self.modbus_cache_map.do_scan()
                  AttributeError: 'NoneType' object has no attribute 'do_scan'
              [E 171207 01:21:46 neuron:227] 'NoneType' object has no attribute 'do_scan'
                  Traceback (most recent call last):
                    File "/opt/evok/neuron.py", line 225, in scan_boards
                      yield self.modbus_cache_map.do_scan()
                  AttributeError: 'NoneType' object has no attribute 'do_scan'
              [E 171207 01:21:47 neuron:227] 'NoneType' object has no attribute 'do_scan'
                  Traceback (most recent call last):
                    File "/opt/evok/neuron.py", line 225, in scan_boards
                      yield self.modbus_cache_map.do_scan()
                  AttributeError: 'NoneType' object has no attribute 'do_scan'
              [E 171207 01:21:47 neuron:227] 'NoneType' object has no attribute 'do_scan'
                  Traceback (most recent call last):
                    File "/opt/evok/neuron.py", line 225, in scan_boards
                      yield self.modbus_cache_map.do_scan()
                  AttributeError: 'NoneType' object has no attribute 'do_scan'
              [E 171207 01:21:48 neuron:227] 'NoneType' object has no attribute 'do_scan'
                  Traceback (most recent call last):
                    File "/opt/evok/neuron.py", line 225, in scan_boards
                      yield self.modbus_cache_map.do_scan()
                  AttributeError: 'NoneType' object has no attribute 'do_scan'
              [E 171207 01:21:48 neuron:227] 'NoneType' object has no attribute 'do_scan'
                  Traceback (most recent call last):
                    File "/opt/evok/neuron.py", line 225, in scan_boards
                      yield self.modbus_cache_map.do_scan()
                  AttributeError: 'NoneType' object has no attribute 'do_scan'
              [E 171207 01:21:49 neuron:227] 'NoneType' object has no attribute 'do_scan'
                  Traceback (most recent call last):
                    File "/opt/evok/neuron.py", line 225, in scan_boards
                      yield self.modbus_cache_map.do_scan()
                  AttributeError: 'NoneType' object has no attribute 'do_scan'
              [E 171207 01:21:49 neuron:227] 'NoneType' object has no attribute 'do_scan'
                  Traceback (most recent call last):
                    File "/opt/evok/neuron.py", line 225, in scan_boards
                      yield self.modbus_cache_map.do_scan()
                  AttributeError: 'NoneType' object has no attribute 'do_scan'
              

              The python script then never ends...looks like it's stuck in a loop.

              Looking at the evok log, now I also have the same error as displayed when running the script manually (as above).

              1 Reply Last reply Reply Quote 0
              • T
                TomasKnot last edited by TomasKnot

                @tempurpri

                The port issue is probably due to NGINX; the port conflict would cause EVOK to restart continually which causes the CPU spikes.

                As for the infinite loop - it looks like EVOK can't communicate with the hardware over SPI. Along with the port issues it's probably the most common problem encountered with EVOK, as the I2C/SPI driver setup is somewhat delicate in comparison with the software itself.

                Could you post your /boot/config.txt as well? It's likely that you have both dtoverlay=neuron-spi-new and dtoverlay=neuron-spi; if so please delete the former. This can be caused by reinstalling EVOK master on the open-source image, as the open source image already includes a customised version, which is not fully driver-compatible with the github one.

                1 Reply Last reply Reply Quote 0
                • T
                  tempurpri last edited by

                  I don't see a dtoverlay=neuron-spi line, there are however a couple of duplicate lines in /boot/config.txt

                  gpu_mem=32
                  dtparam=i2c_arm=on,watchdog=on
                  
                  dtoverlay=i2c-rtc,mcp7941x
                  
                  # disable it on Unipi 1.x (gpio24, 25!)
                  dtoverlay=neuron-spi-new
                  dtoverlay=neuronee
                  #dtoverlay=unipiee
                  
                  #Enable kernel driver for I2c OneWire Master
                  dtoverlay=ds2482
                  
                  #remove dependency of spi-clock on system freq
                  core_freq=250
                  
                  #BT enabled on RPi3 swaps UART (ttyAMA) and miniUART ttyS0.
                  dtoverlay=pi3-disable-bt
                  
                  #WIFI disabled
                  #dtoverlay=pi3-disable-wifi
                  
                  
                  # For more options and information see
                  # http://rpf.io/configtxt
                  # Some settings may impact device functionality. See link above for details
                  
                  # uncomment if you get no picture on HDMI for a default "safe" mode
                  #hdmi_safe=1
                  
                  # uncomment this if your display has a black border of unused pixels visible
                  # and your display can output without overscan
                  #disable_overscan=1
                  
                  # uncomment the following to adjust overscan. Use positive numbers if console
                  # goes off screen, and negative if there is too much border
                  #overscan_left=16
                  #overscan_right=16
                  #overscan_top=16
                  #overscan_bottom=16
                  
                  # uncomment to force a console size. By default it will be display's size minus
                  # overscan.
                  #framebuffer_width=1280
                  #framebuffer_height=720
                  
                  # uncomment if hdmi display is not detected and composite is being output
                  hdmi_force_hotplug=1
                  
                  # uncomment to force a specific HDMI mode (this will force VGA)
                  hdmi_group=2
                  hdmi_mode=18
                  
                  # uncomment to force a HDMI mode rather than DVI. This can make audio work in
                  # DMT (computer monitor) modes
                  #hdmi_drive=2
                  
                  # uncomment to increase signal to HDMI, if you have interference, blanking, or
                  # no display
                  #config_hdmi_boost=4
                  
                  # uncomment for composite PAL
                  #sdtv_mode=2
                  
                  #uncomment to overclock the arm. 700 MHz is the default.
                  #arm_freq=800
                  
                  # Uncomment some or all of these to enable the optional hardware interfaces
                  #dtparam=i2c_arm=on
                  #dtparam=i2s=on
                  #dtparam=spi=on
                  
                  # Uncomment this to enable the lirc-rpi module
                  #dtoverlay=lirc-rpi
                  
                  # Additional overlays and parameters are documented /boot/overlays/README
                  
                  # Enable audio (loads snd_bcm2835)
                  #dtparam=audio=off   
                  
                  #Enable i2c bus 1
                  device_tree_param=i2c1=on
                  dtoverlay=i2c-rtc,mcp7941x
                  dtoverlay=unipiee
                  dtoverlay=neuronee
                  

                  I do see a commented parameter about spi

                  #dtparam=spi=on
                  

                  Should this be enabled ?

                  FYI: I haven't touched this file manually.

                  T 1 Reply Last reply Reply Quote 0
                  • T
                    tempurpri @tempurpri last edited by

                    I apologize for pushing this issue again, but it's been a week since any updates and evok is still not working here. If there are any suggestions how to proceed (based on the data provided), pleas let me know.

                    I appreciate any help.

                    1 Reply Last reply Reply Quote 0
                    • T
                      TomasKnot last edited by TomasKnot

                      @tempurpri
                      Please try to delete the dtoverlay=neuron-spi-new line, this should hopefully fix your issue.

                      The GitHub master distribution has been updated to stop EVOK from restarting if it fails to start several times in the row. But the issue lies here in the fact that EVOK fails to start (which, as it is necessary for the device to function, it tries repeatedly), rather than the restarting itself.

                      As you correctly observed this was originally caused by the port conflict with your NodeJS installation (or perhaps some other server, as only a single server can ever be connected to a port on standard TCP/IP architecture).

                      If this does not help, you may have to install pigpio

                      sudo apt-get install pigpio
                      

                      as well. Or perhaps a better option might be to try and redo the installation process from scratch, using the EVOK version designed for the more comprehensive device drivers in the open-source image - not the version on GitHub.

                      1 Reply Last reply Reply Quote 0
                      • T
                        tempurpri last edited by

                        In the end, nothing else than starting from scratch with a fresh image of the open-source OS helped.
                        Then I was able to change the evok port to 8085 (instead of 8080) and nginx port to 85 (instead of 80) prior to installing codesys and it worked.
                        ..
                        ..
                        for a while. I started a new separate thread since the problems have a little bit different symptoms.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post