SDM120 - licznik energii elektrycznej

Dział poświęcony czujnikom/urządzeniom które obsługuje nettemp
Awatar użytkownika
hryst
Betatester
Posty: 672
Rejestracja: wt mar 25, 2014 8:52 am
Kontaktowanie:

Re: SDM120 - licznik energii elektrycznej

Post autor: hryst » pt maja 27, 2016 1:02 pm

ręcznie/cron jak najbardziej ale jest jeszcze www-data
--- działam na orange pi plus H3 ---

jot
Posty: 926
Rejestracja: śr lut 03, 2016 8:50 pm

Re: SDM120 - licznik energii elektrycznej

Post autor: jot » pt maja 27, 2016 2:17 pm

O ile kojarzę w kontekście www-data nie są wykonywane skrypty, a te, które mają być wykonane z uprawnieniami roota i tak mają ustawiony albo suid albo sgid bit ;-)

Awatar użytkownika
slawko
Posty: 260
Rejestracja: czw lis 26, 2015 10:59 pm
Lokalizacja: Bełchatów

Re: SDM120 - licznik energii elektrycznej

Post autor: slawko » pt maja 27, 2016 2:50 pm

Oto wynik:

Kod: Zaznacz cały

[email protected]:/home/pi# sdm120c -a1 -b 2400 /dev/ttyUSB0 && ps -axuw
Voltage: 226.60 V
Current: 2.34 A
Power: 520.60 W
Active Apparent Power: 520.65 VA
Reactive Apparent Power: -4.00 VAR
Power Factor: 1.00
Phase Angle: 0.00 Degree
Frequency: 50.04 Hz
Import Active Energy: 17860 Wh
Export Active Energy: 0 Wh
Total Active Energy: 17861 Wh
Import Reactive Energy: 955 VARh
Export Reactive Energy: 3029 VARh
Total Reactive Energy: 3984 VARh
OK
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  2.3  0.4  22972  4168 ?        Ss   14:42   0:06 /sbin/init
root         2  0.0  0.0      0     0 ?        S    14:42   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    14:42   0:00 [ksoftirqd/0]
root         4  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/0:0]
root         5  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/0:0H]
root         6  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/u8:0]
root         7  0.0  0.0      0     0 ?        S    14:42   0:00 [rcu_sched]
root         8  0.0  0.0      0     0 ?        S    14:42   0:00 [rcu_bh]
root         9  0.0  0.0      0     0 ?        S    14:42   0:00 [migration/0]
root        10  0.0  0.0      0     0 ?        S    14:42   0:00 [migration/1]
root        11  0.0  0.0      0     0 ?        S    14:42   0:00 [ksoftirqd/1]
root        12  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/1:0]
root        13  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/1:0H]
root        14  0.0  0.0      0     0 ?        S    14:42   0:00 [migration/2]
root        15  0.0  0.0      0     0 ?        S    14:42   0:00 [ksoftirqd/2]
root        16  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/2:0]
root        17  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/2:0H]
root        18  0.0  0.0      0     0 ?        S    14:42   0:00 [migration/3]
root        19  0.0  0.0      0     0 ?        S    14:42   0:00 [ksoftirqd/3]
root        20  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/3:0]
root        21  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/3:0H]
root        22  0.0  0.0      0     0 ?        S    14:42   0:00 [kdevtmpfs]
root        23  0.0  0.0      0     0 ?        S<   14:42   0:00 [netns]
root        24  0.0  0.0      0     0 ?        S<   14:42   0:00 [perf]
root        25  0.0  0.0      0     0 ?        S    14:42   0:00 [khungtaskd]
root        26  0.0  0.0      0     0 ?        S<   14:42   0:00 [writeback]
root        27  0.0  0.0      0     0 ?        S<   14:42   0:00 [crypto]
root        28  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        29  0.0  0.0      0     0 ?        S<   14:42   0:00 [kblockd]
root        30  0.2  0.0      0     0 ?        S    14:42   0:00 [kworker/0:1]
root        31  0.0  0.0      0     0 ?        S<   14:42   0:00 [rpciod]
root        32  0.0  0.0      0     0 ?        S    14:42   0:00 [kswapd0]
root        33  0.0  0.0      0     0 ?        S<   14:42   0:00 [vmstat]
root        34  0.0  0.0      0     0 ?        S    14:42   0:00 [fsnotify_mark]
root        35  0.0  0.0      0     0 ?        S<   14:42   0:00 [nfsiod]
root        44  0.0  0.0      0     0 ?        S<   14:42   0:00 [kthrotld]
root        45  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/3:1]
root        46  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        47  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        48  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        49  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        50  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        51  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        52  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        53  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        54  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        55  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        56  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        57  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        58  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        59  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        60  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        61  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        62  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        63  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        64  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        65  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        66  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        67  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        68  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        69  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        70  0.0  0.0      0     0 ?        S<   14:42   0:00 [VCHIQ-0]
root        71  0.0  0.0      0     0 ?        S<   14:42   0:00 [VCHIQr-0]
root        72  0.0  0.0      0     0 ?        S<   14:42   0:00 [VCHIQs-0]
root        73  0.0  0.0      0     0 ?        S<   14:42   0:00 [iscsi_eh]
root        74  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/2:1]
root        75  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/1:1]
root        76  0.0  0.0      0     0 ?        S<   14:42   0:00 [dwc_otg]
root        77  0.0  0.0      0     0 ?        S<   14:42   0:00 [DWC Notificatio]
root        78  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/u8:1]
root        79  0.0  0.0      0     0 ?        S    14:42   0:00 [VCHIQka-0]
root        80  0.0  0.0      0     0 ?        S<   14:42   0:00 [SMIO]
root        81  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        82  0.2  0.0      0     0 ?        S    14:42   0:00 [mmcqd/0]
root        83  0.0  0.0      0     0 ?        S<   14:42   0:00 [deferwq]
root        84  0.0  0.0      0     0 ?        S    14:42   0:00 [jbd2/mmcblk0p2-]
root        85  0.0  0.0      0     0 ?        S<   14:42   0:00 [ext4-rsv-conver]
root        86  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/0:2]
root        87  0.0  0.0      0     0 ?        S<   14:42   0:00 [ipv6_addrconf]
root       105  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/2:1H]
root       129  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/1:2]
root       136  0.3  0.3   9944  2936 ?        Ss   14:42   0:01 /lib/systemd/systemd-journald
root       139  0.1  0.3  11880  3044 ?        Ss   14:42   0:00 /lib/systemd/systemd-udevd
root       194  0.0  0.0      0     0 ?        S    14:42   0:00 [w1_bus_master1]
root       247  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/3:2]
root       297  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/2:2]
root       311  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/0:3]
root       378  0.0  0.0      0     0 ?        S<   14:42   0:00 [cfg80211]
root       437  0.0  0.0      0     0 ?        S    14:42   0:00 [RTW_CMD_THREAD]
root       454  0.0  0.2   6800  2456 ?        Ss   14:42   0:00 /usr/sbin/cron -f
root       456  0.0  0.2   3852  2444 ?        Ss   14:42   0:00 /lib/systemd/systemd-logind
avahi      468  0.0  0.2   3876  2492 ?        Ss   14:42   0:00 avahi-daemon: running [raspberrypi.local]
message+   469  0.1  0.3   5692  3164 ?        Ss   14:42   0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfi
root       484  0.0  0.1   2564  1888 ?        Ss   14:42   0:00 /sbin/dhcpcd -q -b
root       494  0.0  0.1  20072  1544 ?        Ssl  14:42   0:00 /sbin/apcupsd
nobody     497  0.0  0.1   2292  1468 ?        Ss   14:42   0:00 /usr/sbin/thd --daemon --triggers /etc/triggerhappy/triggers.d/ --s
root       510  0.0  0.1   5500  1768 ?        S    14:42   0:00 /usr/sbin/openvpn --daemon ovpn-openvpn --status /run/openvpn/openv
root       518  0.0  0.0      0     0 ?        S    14:42   0:00 [w1_bus_master2]
avahi      526  0.0  0.0   3876   240 ?        S    14:42   0:00 avahi-daemon: chroot helper
root       544  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/u8:2]
root       553  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/u8:3]
root       571  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/1:1H]
smsd       574  0.0  0.5   5828  4756 ?        Ss   14:42   0:00 /usr/sbin/smsd -p/var/run/smstools/smsd.pid -i/var/run/smstools/sms
smsd       577  0.0  0.0      0     0 ?        Z    14:42   0:00 [smsd] <defunct>
root       581  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/0:1H]
root       594  0.0  0.2   5616  2840 ?        Ss   14:42   0:00 /usr/sbin/openvpn --daemon ovpn-openvpn --status /run/openvpn/openv
root       606  0.0  0.2   7148  2764 ?        Ss   14:42   0:00 /sbin/wpa_supplicant -s -B -P /run/wpa_supplicant.wlan0.pid -i wlan
root       609  0.0  0.2  32144  2816 ?        Ssl  14:42   0:00 /usr/sbin/rsyslogd -n
root       680  0.0  0.4   7860  4404 ?        Ss   14:42   0:00 /usr/sbin/sshd -D
root       700  0.0  0.7  40536  6968 ?        Ssl  14:42   0:00 /usr/sbin/lightdm
ntp        750  0.0  0.3   5684  3676 ?        Ss   14:42   0:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 106:111
root       757  0.0  0.2   5668  2800 tty1     Ss   14:42   0:00 /bin/login -f
root       759  0.0  0.1   5572  1864 ttyAMA0  Ss+  14:42   0:00 /sbin/agetty --keep-baud 115200 38400 9600 ttyAMA0 vt102
snmp       792  0.2  0.5  14752  5088 ?        S    14:42   0:00 /usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -g snmp -I -smux mteTrig
www-data   810  0.0  0.6  11876  6048 ?        Ss   14:42   0:00 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
root       838  0.2  2.7 101608 25652 tty7     Ssl+ 14:42   0:00 /usr/bin/X :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten
root       852  0.0  2.0 107712 19124 ?        Ss   14:42   0:00 php-fpm: master process (/etc/php5/fpm/php-fpm.conf)
www-data   857  0.0  1.2 108680 12188 ?        S    14:42   0:00 php-fpm: pool www
www-data   858  0.0  1.2 108580 11540 ?        S    14:42   0:00 php-fpm: pool www
pi         876  0.0  0.3   4976  3344 ?        Ss   14:42   0:00 /lib/systemd/systemd --user
pi         880  0.0  0.1   6948  1392 ?        S    14:42   0:00 (sd-pam)
pi         885  0.1  0.4   8356  4460 tty1     S+   14:42   0:00 -bash
root       903  0.0  0.7  32876  7264 ?        Sl   14:42   0:00 lightdm --session-child 13 16
pi         912  0.0  1.2  54056 12252 ?        Ssl  14:42   0:00 /usr/bin/lxsession -s LXDE-pi -e LXDE
pi         936  0.0  0.0   3696   220 ?        Ss   14:42   0:00 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session x-sessi
pi         939  0.0  0.1   3692  1636 ?        S    14:42   0:00 /usr/bin/dbus-launch --exit-with-session x-session-manager
pi         940  0.0  0.2   5608  2204 ?        Ss   14:42   0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --sessi
pi         946  0.0  0.5  32572  5640 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfsd
root       949  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/3:1H]
pi         951  0.0  0.5  48520  5404 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes
pi         962  0.1  1.1  21776 11316 ?        S    14:42   0:00 openbox --config-file /home/pi/.config/openbox/lxde-pi-rc.xml
pi         964  0.0  0.9  32184  9020 ?        Sl   14:42   0:00 lxpolkit
pi         967  0.4  2.6  96260 24752 ?        Sl   14:42   0:01 lxpanel --profile LXDE-pi
pi         968  0.1  1.9  80404 18296 ?        Sl   14:42   0:00 pcmanfm --desktop --profile LXDE-pi
pi         973  0.0  0.0   3696   220 ?        Ss   14:42   0:00 /usr/bin/ssh-agent -s
root       978  0.0  0.7  40944  7372 ?        Ssl  14:42   0:00 /usr/lib/policykit-1/polkitd --no-debug
pi         986  0.0  0.8  44844  8128 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
root       990  0.1  0.8  59068  7816 ?        Ssl  14:42   0:00 /usr/lib/udisks2/udisksd --no-debug
rtkit      998  0.0  0.2  21376  2024 ?        SNsl 14:42   0:00 /usr/lib/rtkit/rtkit-daemon
root      1089  0.0  0.3   5008  3352 ?        Ss   14:42   0:00 /usr/lib/bluetooth/bluetoothd
pi        1096  0.0  0.6  44132  6504 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfs-afc-volume-monitor
pi        1101  0.0  0.0   1912    92 ?        S    14:42   0:00 /bin/sh /usr/bin/start-pulseaudio-x11
pi        1103  0.0  0.2   7496  2112 ?        S    14:42   0:00 /usr/bin/xprop -root -spy
pi        1107  0.0  0.5  31648  5228 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfs-mtp-volume-monitor
pi        1116  0.0  0.5  32668  5320 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
pi        1124  0.0  0.5  31752  5332 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfs-goa-volume-monitor
pi        1134  0.0  0.7  62236  7424 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.1 /org/gtk/gvfs/exec_spaw/0
pi        1138  0.0  0.6  29692  6004 ?        Ssl  14:42   0:00 /usr/lib/menu-cache/menu-cached /tmp/.menu-cached-:0-pi
pi        1150  0.0  0.0      0     0 ?        Z    14:42   0:00 [sh] <defunct>
pi        1154  0.0  0.0      0     0 ?        Z    14:42   0:00 [sh] <defunct>
pi        1159  0.0  0.0      0     0 ?        Z    14:43   0:00 [sh] <defunct>
root      1320  0.1  0.5  12072  5028 ?        Ss   14:43   0:00 sshd: pi [priv]
pi        1334  0.0  0.3  12208  3348 ?        S    14:43   0:00 sshd: [email protected]/0
pi        1336  0.1  0.4   8356  4512 pts/0    Ss   14:43   0:00 -bash
root      1347  0.0  0.3   8288  2964 pts/0    S    14:43   0:00 su
root      1360  0.0  0.3   6904  3164 pts/0    S    14:43   0:00 bash
root      1551  0.0  0.0      0     0 ?        Z    14:43   0:00 [apccontrol] <defunct>
www-data  1567  0.0  0.0   1912   372 ?        S    14:43   0:00 sh -c /bin/bash modules/sensors/scan > tmp/scan
www-data  1568  0.0  0.2   3472  2548 ?        S    14:43   0:00 /bin/bash modules/sensors/scan
www-data  2605  0.0  0.2   3500  2576 ?        S    14:45   0:00 /bin/bash /var/www/nettemp/modules/sensors/wireless/esp8266_scan
www-data  2663  0.0  0.1   3500  1392 ?        S    14:45   0:00 /bin/bash /var/www/nettemp/modules/sensors/wireless/esp8266_scan
www-data  2664  0.0  0.5  10992  5360 ?        S    14:45   0:00 curl --connect-timeout 3 192.168.100.124
www-data  2665  0.0  0.1   2764  1276 ?        S    14:45   0:00 sed -e s/<[^>]*>/\n/g
www-data  2666  0.0  0.0   2676   520 ?        S    14:45   0:00 grep nettemp
www-data  2667  0.0  0.0   2396   444 ?        S    14:45   0:00 awk { print $2}
root      3349  0.0  0.2   6440  2116 pts/0    R+   14:47   0:00 ps -axuw
[email protected]:/home/pi# sdm120c -a1 -b 2400 /dev/ttyUSB0
20160527-14:48:06: sdm120c: Problem locking serial device /dev/ttyUSB0, couldn't get the lock for 3479, locked by 3475.
20160527-14:48:06: Try a greater -w value (eg -w 5).
[email protected]:/home/pi# sdm120c -a1 -b 2400 /dev/ttyUSB0
20160527-14:48:09: sdm120c: Problem locking serial device /dev/ttyUSB0, couldn't get the lock for 3487, locked by 3483.
20160527-14:48:09: Try a greater -w value (eg -w 5).
[email protected]:/home/pi# sdm120c -a1 -b 2400 /dev/ttyUSB0
20160527-14:48:12: sdm120c: Problem locking serial device /dev/ttyUSB0, couldn't get the lock for 3495, locked by 3491.
20160527-14:48:12: Try a greater -w value (eg -w 5).
[email protected]:/home/pi# sdm120c -a1 -b 2400 /dev/ttyUSB0
20160527-14:48:14: sdm120c: Problem locking serial device /dev/ttyUSB0, couldn't get the lock for 3496, locked by 3491.
20160527-14:48:14: Try a greater -w value (eg -w 5).
[email protected]:/home/pi# sdm120c -a1 -b 2400 /dev/ttyUSB0
20160527-14:48:16: sdm120c: Problem locking serial device /dev/ttyUSB0, couldn't get the lock for 3511, locked by 3508.
20160527-14:48:16: Try a greater -w value (eg -w 5).
[email protected]:/home/pi# sdm120c -a1 -b 2400 /dev/ttyUSB0
20160527-14:48:18: sdm120c: Problem locking serial device /dev/ttyUSB0, couldn't get the lock for 3537, locked by 3508.
20160527-14:48:18: Try a greater -w value (eg -w 5).
[email protected]:/home/pi# sdm120c -a1 -b 2400 /dev/ttyUSB3 && ps -axuw
NOK
[email protected]:/home/pi# sdm120c -a1 -b 2400 /dev/ttyUSB0 && ps -axuw
Voltage: 227.20 V
Current: 2.42 A
Power: 531.90 W
Active Apparent Power: 531.99 VA
Reactive Apparent Power: -4.70 VAR
Power Factor: 1.00
Phase Angle: 0.00 Degree
Frequency: 50.04 Hz
Import Active Energy: 17872 Wh
Export Active Energy: 0 Wh
Total Active Energy: 17872 Wh
Import Reactive Energy: 955 VARh
Export Reactive Energy: 3029 VARh
Total Reactive Energy: 3984 VARh
OK
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  1.8  0.4  22972  4168 ?        Ss   14:42   0:06 /sbin/init
root         2  0.0  0.0      0     0 ?        S    14:42   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    14:42   0:00 [ksoftirqd/0]
root         5  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/0:0H]
root         6  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/u8:0]
root         7  0.0  0.0      0     0 ?        S    14:42   0:00 [rcu_sched]
root         8  0.0  0.0      0     0 ?        S    14:42   0:00 [rcu_bh]
root         9  0.0  0.0      0     0 ?        S    14:42   0:00 [migration/0]
root        10  0.0  0.0      0     0 ?        S    14:42   0:00 [migration/1]
root        11  0.0  0.0      0     0 ?        S    14:42   0:00 [ksoftirqd/1]
root        13  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/1:0H]
root        14  0.0  0.0      0     0 ?        S    14:42   0:00 [migration/2]
root        15  0.0  0.0      0     0 ?        S    14:42   0:00 [ksoftirqd/2]
root        17  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/2:0H]
root        18  0.0  0.0      0     0 ?        S    14:42   0:00 [migration/3]
root        19  0.0  0.0      0     0 ?        S    14:42   0:00 [ksoftirqd/3]
root        21  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/3:0H]
root        22  0.0  0.0      0     0 ?        S    14:42   0:00 [kdevtmpfs]
root        23  0.0  0.0      0     0 ?        S<   14:42   0:00 [netns]
root        24  0.0  0.0      0     0 ?        S<   14:42   0:00 [perf]
root        25  0.0  0.0      0     0 ?        S    14:42   0:00 [khungtaskd]
root        26  0.0  0.0      0     0 ?        S<   14:42   0:00 [writeback]
root        27  0.0  0.0      0     0 ?        S<   14:42   0:00 [crypto]
root        28  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        29  0.0  0.0      0     0 ?        S<   14:42   0:00 [kblockd]
root        30  0.2  0.0      0     0 ?        S    14:42   0:00 [kworker/0:1]
root        31  0.0  0.0      0     0 ?        S<   14:42   0:00 [rpciod]
root        32  0.0  0.0      0     0 ?        S    14:42   0:00 [kswapd0]
root        33  0.0  0.0      0     0 ?        S<   14:42   0:00 [vmstat]
root        34  0.0  0.0      0     0 ?        S    14:42   0:00 [fsnotify_mark]
root        35  0.0  0.0      0     0 ?        S<   14:42   0:00 [nfsiod]
root        44  0.0  0.0      0     0 ?        S<   14:42   0:00 [kthrotld]
root        45  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/3:1]
root        46  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        47  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        48  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        49  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        50  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        51  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        52  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        53  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        54  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        55  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        56  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        57  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        58  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        59  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        60  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        61  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        62  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        63  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        64  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        65  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        66  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        67  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        68  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        69  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        70  0.0  0.0      0     0 ?        S<   14:42   0:00 [VCHIQ-0]
root        71  0.0  0.0      0     0 ?        S<   14:42   0:00 [VCHIQr-0]
root        72  0.0  0.0      0     0 ?        S<   14:42   0:00 [VCHIQs-0]
root        73  0.0  0.0      0     0 ?        S<   14:42   0:00 [iscsi_eh]
root        74  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/2:1]
root        75  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/1:1]
root        76  0.0  0.0      0     0 ?        S<   14:42   0:00 [dwc_otg]
root        77  0.0  0.0      0     0 ?        S<   14:42   0:00 [DWC Notificatio]
root        78  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/u8:1]
root        79  0.0  0.0      0     0 ?        S    14:42   0:00 [VCHIQka-0]
root        80  0.0  0.0      0     0 ?        S<   14:42   0:00 [SMIO]
root        81  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        82  0.1  0.0      0     0 ?        S    14:42   0:00 [mmcqd/0]
root        83  0.0  0.0      0     0 ?        S<   14:42   0:00 [deferwq]
root        84  0.0  0.0      0     0 ?        S    14:42   0:00 [jbd2/mmcblk0p2-]
root        85  0.0  0.0      0     0 ?        S<   14:42   0:00 [ext4-rsv-conver]
root        86  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/0:2]
root        87  0.0  0.0      0     0 ?        S<   14:42   0:00 [ipv6_addrconf]
root       105  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/2:1H]
root       129  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/1:2]
root       136  0.2  0.3   9944  2948 ?        Ss   14:42   0:01 /lib/systemd/systemd-journald
root       139  0.1  0.3  11880  3044 ?        Ss   14:42   0:00 /lib/systemd/systemd-udevd
root       194  0.0  0.0      0     0 ?        S    14:42   0:00 [w1_bus_master1]
root       247  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/3:2]
root       297  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/2:2]
root       311  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/0:3]
root       378  0.0  0.0      0     0 ?        S<   14:42   0:00 [cfg80211]
root       437  0.0  0.0      0     0 ?        S    14:42   0:00 [RTW_CMD_THREAD]
root       454  0.0  0.2   6800  2456 ?        Ss   14:42   0:00 /usr/sbin/cron -f
root       456  0.0  0.2   3852  2444 ?        Ss   14:42   0:00 /lib/systemd/systemd-logind
avahi      468  0.0  0.2   3876  2492 ?        Ss   14:42   0:00 avahi-daemon: running [raspberrypi.local]
message+   469  0.0  0.3   5692  3164 ?        Ss   14:42   0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
root       484  0.0  0.1   2564  1888 ?        Ss   14:42   0:00 /sbin/dhcpcd -q -b
root       494  0.0  0.1  20072  1544 ?        Ssl  14:42   0:00 /sbin/apcupsd
nobody     497  0.0  0.1   2292  1468 ?        Ss   14:42   0:00 /usr/sbin/thd --daemon --triggers /etc/triggerhappy/triggers.d/ --socket /var/run/thd.socket --pidfile /var/run/thd.pid --user nobody /dev/input/event*
root       510  0.0  0.1   5500  1768 ?        S    14:42   0:00 /usr/sbin/openvpn --daemon ovpn-openvpn --status /run/openvpn/openvpn.status 10 --cd /etc/openvpn --config /etc/openvpn/openvpn.conf
root       518  0.0  0.0      0     0 ?        S    14:42   0:00 [w1_bus_master2]
avahi      526  0.0  0.0   3876   240 ?        S    14:42   0:00 avahi-daemon: chroot helper
root       553  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/u8:3]
root       571  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/1:1H]
smsd       574  0.0  0.5   5828  4756 ?        Ss   14:42   0:00 /usr/sbin/smsd -p/var/run/smstools/smsd.pid -i/var/run/smstools/smsd.working -usmsd -gdialout
smsd       577  0.0  0.0      0     0 ?        Z    14:42   0:00 [smsd] <defunct>
root       581  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/0:1H]
root       594  0.0  0.2   5616  2840 ?        Ss   14:42   0:00 /usr/sbin/openvpn --daemon ovpn-openvpn --status /run/openvpn/openvpn.status 10 --cd /etc/openvpn --config /etc/openvpn/openvpn.conf
root       606  0.0  0.2   7148  2764 ?        Ss   14:42   0:00 /sbin/wpa_supplicant -s -B -P /run/wpa_supplicant.wlan0.pid -i wlan0 -D nl80211,wext -c /etc/wpa_supplicant/wpa_supplicant.conf
root       609  0.0  0.2  32144  2816 ?        Ssl  14:42   0:00 /usr/sbin/rsyslogd -n
root       680  0.0  0.4   7860  4404 ?        Ss   14:42   0:00 /usr/sbin/sshd -D
root       700  0.0  0.7  40536  6968 ?        Ssl  14:42   0:00 /usr/sbin/lightdm
ntp        750  0.0  0.3   5684  3676 ?        Ss   14:42   0:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 106:111
root       757  0.0  0.2   5668  2800 tty1     Ss   14:42   0:00 /bin/login -f
root       759  0.0  0.1   5572  1864 ttyAMA0  Ss+  14:42   0:00 /sbin/agetty --keep-baud 115200 38400 9600 ttyAMA0 vt102
snmp       792  0.2  0.5  14752  5088 ?        S    14:42   0:00 /usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -g snmp -I -smux mteTrigger mteTriggerConf -p /run/snmpd.pid
www-data   810  0.0  0.6  11876  6048 ?        Ss   14:42   0:00 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
root       838  0.1  2.7 101608 25652 tty7     Ssl+ 14:42   0:00 /usr/bin/X :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
root       852  0.0  2.0 107712 19124 ?        Ss   14:42   0:00 php-fpm: master process (/etc/php5/fpm/php-fpm.conf)
www-data   857  0.0  1.2 108680 12188 ?        S    14:42   0:00 php-fpm: pool www
www-data   858  0.0  1.2 108544 11516 ?        S    14:42   0:00 php-fpm: pool www
pi         876  0.0  0.3   4976  3344 ?        Ss   14:42   0:00 /lib/systemd/systemd --user
pi         880  0.0  0.1   6948  1392 ?        S    14:42   0:00 (sd-pam)
pi         885  0.1  0.4   8356  4460 tty1     S+   14:42   0:00 -bash
root       903  0.0  0.7  32876  7264 ?        Sl   14:42   0:00 lightdm --session-child 13 16
pi         912  0.0  1.2  54056 12252 ?        Ssl  14:42   0:00 /usr/bin/lxsession -s LXDE-pi -e LXDE
pi         936  0.0  0.0   3696   220 ?        Ss   14:42   0:00 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session x-session-manager
pi         939  0.0  0.1   3692  1636 ?        S    14:42   0:00 /usr/bin/dbus-launch --exit-with-session x-session-manager
pi         940  0.0  0.2   5608  2204 ?        Ss   14:42   0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
pi         946  0.0  0.5  32572  5640 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfsd
root       949  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/3:1H]
pi         951  0.0  0.5  48520  5404 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes
pi         962  0.1  1.1  21776 11316 ?        S    14:42   0:00 openbox --config-file /home/pi/.config/openbox/lxde-pi-rc.xml
pi         964  0.0  0.9  32184  9020 ?        Sl   14:42   0:00 lxpolkit
pi         967  0.4  2.6  96260 24752 ?        Sl   14:42   0:01 lxpanel --profile LXDE-pi
pi         968  0.1  1.9  80404 18296 ?        Sl   14:42   0:00 pcmanfm --desktop --profile LXDE-pi
pi         973  0.0  0.0   3696   220 ?        Ss   14:42   0:00 /usr/bin/ssh-agent -s
root       978  0.0  0.7  40944  7372 ?        Ssl  14:42   0:00 /usr/lib/policykit-1/polkitd --no-debug
pi         986  0.0  0.8  44844  8128 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
root       990  0.0  0.8  59068  7816 ?        Ssl  14:42   0:00 /usr/lib/udisks2/udisksd --no-debug
rtkit      998  0.0  0.2  21376  2024 ?        SNsl 14:42   0:00 /usr/lib/rtkit/rtkit-daemon
root      1089  0.0  0.3   5008  3352 ?        Ss   14:42   0:00 /usr/lib/bluetooth/bluetoothd
pi        1096  0.0  0.6  44132  6504 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfs-afc-volume-monitor
pi        1101  0.0  0.0   1912    92 ?        S    14:42   0:00 /bin/sh /usr/bin/start-pulseaudio-x11
pi        1103  0.0  0.2   7496  2112 ?        S    14:42   0:00 /usr/bin/xprop -root -spy
pi        1107  0.0  0.5  31648  5228 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfs-mtp-volume-monitor
pi        1116  0.0  0.5  32668  5320 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
pi        1124  0.0  0.5  31752  5332 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfs-goa-volume-monitor
pi        1134  0.0  0.7  62236  7424 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.1 /org/gtk/gvfs/exec_spaw/0
pi        1138  0.0  0.6  29692  6004 ?        Ssl  14:42   0:00 /usr/lib/menu-cache/menu-cached /tmp/.menu-cached-:0-pi
pi        1150  0.0  0.0      0     0 ?        Z    14:42   0:00 [sh] <defunct>
pi        1154  0.0  0.0      0     0 ?        Z    14:42   0:00 [sh] <defunct>
pi        1159  0.0  0.0      0     0 ?        Z    14:43   0:00 [sh] <defunct>
root      1320  0.0  0.5  12072  5028 ?        Ss   14:43   0:00 sshd: pi [priv]
pi        1334  0.0  0.3  12208  3348 ?        R    14:43   0:00 sshd: [email protected]/0
pi        1336  0.1  0.4   8356  4512 pts/0    Ss   14:43   0:00 -bash
root      1347  0.0  0.3   8288  2964 pts/0    S    14:43   0:00 su
root      1360  0.0  0.3   6904  3164 pts/0    S    14:43   0:00 bash
root      1551  0.0  0.0      0     0 ?        Z    14:43   0:00 [apccontrol] <defunct>
root      3478  0.0  0.0      0     0 ?        S    14:48   0:00 [kworker/1:0]
root      3738  0.0  0.2   6440  2120 pts/0    R+   14:48   0:00 ps -axuw
[email protected]:/home/pi#

jot
Posty: 926
Rejestracja: śr lut 03, 2016 8:50 pm

Re: SDM120 - licznik energii elektrycznej

Post autor: jot » pt maja 27, 2016 3:06 pm

slawko pisze:Oto wynik:
A widzisz podałem Ci zły kawałek kodu, spróbuj ten:

Kod: Zaznacz cały

sdm120c -a1 -b 2400 /dev/ttyUSB0 || ps -axuw

Awatar użytkownika
slawko
Posty: 260
Rejestracja: czw lis 26, 2015 10:59 pm
Lokalizacja: Bełchatów

Re: SDM120 - licznik energii elektrycznej

Post autor: slawko » pt maja 27, 2016 3:14 pm

jot pisze:
slawko pisze:Oto wynik:
A widzisz podałem Ci zły kawałek kodu, spróbuj ten:

Kod: Zaznacz cały

sdm120c -a1 -b 2400 /dev/ttyUSB0 || ps -axuw
Wynik:

Kod: Zaznacz cały

[email protected]:/home/pi# sdm120c -a1 -b 2400 /dev/ttyUSB0 || ps -axuw
20160527-15:13:04: sdm120c: Problem locking serial device /dev/ttyUSB0, couldn't get the lock for 12804, locked by 12801.
20160527-15:13:04: Try a greater -w value (eg -w 5).
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.4  0.4  22972  4168 ?        Ss   14:42   0:07 /sbin/init
root         2  0.0  0.0      0     0 ?        S    14:42   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    14:42   0:00 [ksoftirqd/0]
root         5  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/0:0H]
root         7  0.0  0.0      0     0 ?        S    14:42   0:01 [rcu_sched]
root         8  0.0  0.0      0     0 ?        S    14:42   0:00 [rcu_bh]
root         9  0.0  0.0      0     0 ?        S    14:42   0:00 [migration/0]
root        10  0.0  0.0      0     0 ?        S    14:42   0:00 [migration/1]
root        11  0.0  0.0      0     0 ?        S    14:42   0:00 [ksoftirqd/1]
root        13  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/1:0H]
root        14  0.0  0.0      0     0 ?        S    14:42   0:00 [migration/2]
root        15  0.0  0.0      0     0 ?        S    14:42   0:00 [ksoftirqd/2]
root        17  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/2:0H]
root        18  0.0  0.0      0     0 ?        S    14:42   0:00 [migration/3]
root        19  0.0  0.0      0     0 ?        S    14:42   0:00 [ksoftirqd/3]
root        21  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/3:0H]
root        22  0.0  0.0      0     0 ?        S    14:42   0:00 [kdevtmpfs]
root        23  0.0  0.0      0     0 ?        S<   14:42   0:00 [netns]
root        24  0.0  0.0      0     0 ?        S<   14:42   0:00 [perf]
root        25  0.0  0.0      0     0 ?        S    14:42   0:00 [khungtaskd]
root        26  0.0  0.0      0     0 ?        S<   14:42   0:00 [writeback]
root        27  0.0  0.0      0     0 ?        S<   14:42   0:00 [crypto]
root        28  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        29  0.0  0.0      0     0 ?        S<   14:42   0:00 [kblockd]
root        30  0.1  0.0      0     0 ?        S    14:42   0:02 [kworker/0:1]
root        31  0.0  0.0      0     0 ?        S<   14:42   0:00 [rpciod]
root        32  0.0  0.0      0     0 ?        S    14:42   0:00 [kswapd0]
root        33  0.0  0.0      0     0 ?        S<   14:42   0:00 [vmstat]
root        34  0.0  0.0      0     0 ?        S    14:42   0:00 [fsnotify_mark]
root        35  0.0  0.0      0     0 ?        S<   14:42   0:00 [nfsiod]
root        44  0.0  0.0      0     0 ?        S<   14:42   0:00 [kthrotld]
root        45  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/3:1]
root        46  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        47  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        48  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        49  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        50  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        51  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        52  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        53  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        54  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        55  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        56  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        57  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        58  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        59  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        60  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        61  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        62  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        63  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        64  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        65  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        66  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        67  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        68  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        69  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        70  0.0  0.0      0     0 ?        S<   14:42   0:00 [VCHIQ-0]
root        71  0.0  0.0      0     0 ?        S<   14:42   0:00 [VCHIQr-0]
root        72  0.0  0.0      0     0 ?        S<   14:42   0:00 [VCHIQs-0]
root        73  0.0  0.0      0     0 ?        S<   14:42   0:00 [iscsi_eh]
root        74  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/2:1]
root        76  0.0  0.0      0     0 ?        S<   14:42   0:00 [dwc_otg]
root        77  0.0  0.0      0     0 ?        S<   14:42   0:00 [DWC Notificatio]
root        79  0.0  0.0      0     0 ?        S    14:42   0:00 [VCHIQka-0]
root        80  0.0  0.0      0     0 ?        S<   14:42   0:00 [SMIO]
root        81  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        82  0.0  0.0      0     0 ?        S    14:42   0:01 [mmcqd/0]
root        83  0.0  0.0      0     0 ?        S<   14:42   0:00 [deferwq]
root        84  0.0  0.0      0     0 ?        S    14:42   0:00 [jbd2/mmcblk0p2-]
root        85  0.0  0.0      0     0 ?        S<   14:42   0:00 [ext4-rsv-conver]
root        87  0.0  0.0      0     0 ?        S<   14:42   0:00 [ipv6_addrconf]
root       105  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/2:1H]
root       136  0.0  0.3   9944  3120 ?        Ss   14:42   0:01 /lib/systemd/systemd-journald
root       139  0.0  0.3  11880  3044 ?        Ss   14:42   0:00 /lib/systemd/systemd-udevd
root       194  0.0  0.0      0     0 ?        S    14:42   0:00 [w1_bus_master1]
root       378  0.0  0.0      0     0 ?        S<   14:42   0:00 [cfg80211]
root       437  0.0  0.0      0     0 ?        S    14:42   0:01 [RTW_CMD_THREAD]
root       454  0.0  0.2   6800  2456 ?        Ss   14:42   0:00 /usr/sbin/cron -f
root       456  0.0  0.2   3852  2444 ?        Ss   14:42   0:00 /lib/systemd/systemd-logind
avahi      468  0.0  0.2   3876  2492 ?        Ss   14:42   0:00 avahi-daemon: running [raspberrypi.local]
message+   469  0.0  0.3   5692  3164 ?        Ss   14:42   0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
root       484  0.0  0.1   2564  1888 ?        Ss   14:42   0:00 /sbin/dhcpcd -q -b
root       494  0.0  0.1  20072  1544 ?        Ssl  14:42   0:01 /sbin/apcupsd
nobody     497  0.0  0.1   2292  1468 ?        Ss   14:42   0:00 /usr/sbin/thd --daemon --triggers /etc/triggerhappy/triggers.d/ --socket /var/run/thd.socket --pidfile /var/run/thd.pid --user nobody /dev/input/event*
root       510  0.0  0.1   5500  1768 ?        S    14:42   0:00 /usr/sbin/openvpn --daemon ovpn-openvpn --status /run/openvpn/openvpn.status 10 --cd /etc/openvpn --config /etc/openvpn/openvpn.conf
root       518  0.0  0.0      0     0 ?        S    14:42   0:00 [w1_bus_master2]
avahi      526  0.0  0.0   3876   240 ?        S    14:42   0:00 avahi-daemon: chroot helper
root       553  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/u8:3]
root       571  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/1:1H]
root       581  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/0:1H]
root       594  0.0  0.2   5616  2840 ?        Ss   14:42   0:00 /usr/sbin/openvpn --daemon ovpn-openvpn --status /run/openvpn/openvpn.status 10 --cd /etc/openvpn --config /etc/openvpn/openvpn.conf
root       606  0.0  0.2   7148  2764 ?        Ss   14:42   0:00 /sbin/wpa_supplicant -s -B -P /run/wpa_supplicant.wlan0.pid -i wlan0 -D nl80211,wext -c /etc/wpa_supplicant/wpa_supplicant.conf
root       609  0.0  0.2  32144  2816 ?        Ssl  14:42   0:00 /usr/sbin/rsyslogd -n
root       680  0.0  0.4   7860  4404 ?        Ss   14:42   0:00 /usr/sbin/sshd -D
root       700  0.0  0.7  40536  6968 ?        Ssl  14:42   0:00 /usr/sbin/lightdm
ntp        750  0.0  0.3   5684  3676 ?        Ss   14:42   0:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 106:111
root       757  0.0  0.2   5668  2800 tty1     Ss   14:42   0:00 /bin/login -f
root       759  0.0  0.1   5572  1864 ttyAMA0  Ss+  14:42   0:00 /sbin/agetty --keep-baud 115200 38400 9600 ttyAMA0 vt102
snmp       792  0.2  0.5  14752  5088 ?        S    14:42   0:04 /usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -g snmp -I -smux mteTrigger mteTriggerConf -p /run/snmpd.pid
www-data   810  0.0  0.6  12412  6392 ?        Ss   14:42   0:00 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
root       838  0.0  2.7 101608 25652 tty7     Ssl+ 14:42   0:01 /usr/bin/X :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
root       852  0.0  2.0 107712 19124 ?        Ss   14:42   0:00 php-fpm: master process (/etc/php5/fpm/php-fpm.conf)
www-data   857  0.1  1.3 108812 12640 ?        S    14:42   0:01 php-fpm: pool www
www-data   858  0.1  1.3 108712 12608 ?        S    14:42   0:02 php-fpm: pool www
pi         876  0.0  0.3   4976  3344 ?        Ss   14:42   0:00 /lib/systemd/systemd --user
pi         880  0.0  0.1   6948  1392 ?        S    14:42   0:00 (sd-pam)
pi         885  0.0  0.4   8356  4460 tty1     S+   14:42   0:00 -bash
root       903  0.0  0.7  32876  7264 ?        Sl   14:42   0:00 lightdm --session-child 13 16
pi         912  0.0  1.2  54056 12252 ?        Ssl  14:42   0:00 /usr/bin/lxsession -s LXDE-pi -e LXDE
pi         936  0.0  0.0   3696   220 ?        Ss   14:42   0:00 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session x-session-manager
pi         939  0.0  0.1   3692  1636 ?        S    14:42   0:00 /usr/bin/dbus-launch --exit-with-session x-session-manager
pi         940  0.0  0.2   5608  2204 ?        Ss   14:42   0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
pi         946  0.0  0.5  32572  5640 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfsd
root       949  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/3:1H]
pi         951  0.0  0.5  48520  5404 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes
pi         962  0.0  1.1  21776 11316 ?        S    14:42   0:00 openbox --config-file /home/pi/.config/openbox/lxde-pi-rc.xml
pi         964  0.0  0.9  32184  9020 ?        Sl   14:42   0:00 lxpolkit
pi         967  0.2  2.6  96260 24752 ?        Sl   14:42   0:04 lxpanel --profile LXDE-pi
pi         968  0.0  1.9  80404 18296 ?        Sl   14:42   0:00 pcmanfm --desktop --profile LXDE-pi
pi         973  0.0  0.0   3696   220 ?        Ss   14:42   0:00 /usr/bin/ssh-agent -s
root       978  0.0  0.7  40944  7372 ?        Ssl  14:42   0:00 /usr/lib/policykit-1/polkitd --no-debug
pi         986  0.0  0.8  44844  8128 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
root       990  0.0  0.8  59068  7816 ?        Ssl  14:42   0:00 /usr/lib/udisks2/udisksd --no-debug
rtkit      998  0.0  0.2  21376  2024 ?        SNsl 14:42   0:00 /usr/lib/rtkit/rtkit-daemon
root      1089  0.0  0.3   5008  3352 ?        Ss   14:42   0:00 /usr/lib/bluetooth/bluetoothd
pi        1096  0.0  0.6  44132  6504 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfs-afc-volume-monitor
pi        1101  0.0  0.0   1912    92 ?        S    14:42   0:00 /bin/sh /usr/bin/start-pulseaudio-x11
pi        1103  0.0  0.2   7496  2112 ?        S    14:42   0:00 /usr/bin/xprop -root -spy
pi        1107  0.0  0.5  31648  5228 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfs-mtp-volume-monitor
pi        1116  0.0  0.5  32668  5320 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
pi        1124  0.0  0.5  31752  5332 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfs-goa-volume-monitor
pi        1134  0.0  0.7  62236  7424 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.1 /org/gtk/gvfs/exec_spaw/0
pi        1138  0.0  0.6  29692  6004 ?        Ssl  14:42   0:00 /usr/lib/menu-cache/menu-cached /tmp/.menu-cached-:0-pi
pi        1150  0.0  0.0      0     0 ?        Z    14:42   0:00 [sh] <defunct>
pi        1154  0.0  0.0      0     0 ?        Z    14:42   0:00 [sh] <defunct>
pi        1159  0.0  0.0      0     0 ?        Z    14:43   0:00 [sh] <defunct>
root      1320  0.0  0.5  12072  5028 ?        Ss   14:43   0:00 sshd: pi [priv]
pi        1334  0.1  0.4  12208  3936 ?        S    14:43   0:01 sshd: [email protected]/0
pi        1336  0.0  0.4   8356  4512 pts/0    Ss   14:43   0:00 -bash
root      1347  0.0  0.3   8288  2964 pts/0    S    14:43   0:00 su
root      1360  0.3  0.3   7188  3384 pts/0    S    14:43   0:06 bash
root      1551  0.0  0.0      0     0 ?        Z    14:43   0:00 [apccontrol] <defunct>
root      4081  0.0  0.0      0     0 ?        S    14:49   0:00 [kworker/u8:2]
smsd      4385  0.0  0.5   5828  4856 ?        Ss   14:49   0:00 smsd 574 0.0 0.5 5828 4756 ? Ss 14:42 0:00 /usr/sbin/smsd -p/var/run/smstools/smsd.pid -i/var/run/smstools/smsd.working -usmsd -gdialout
smsd      4386  0.0  0.0      0     0 ?        Z    14:49   0:00 [smsd] <defunct>
root      6551  0.0  0.0      0     0 ?        S    14:55   0:00 [kworker/1:1]
root      9106  0.0  0.0      0     0 ?        S    15:02   0:00 [kworker/0:0]
root      9268  0.0  0.0      0     0 ?        S    15:03   0:00 [kworker/2:2]
root     10037  0.0  0.0      0     0 ?        S    15:05   0:00 [kworker/3:0]
root     10881  0.0  0.0      0     0 ?        S    15:07   0:00 [kworker/1:2]
root     11787  0.0  0.0      0     0 ?        S    15:10   0:00 [kworker/2:0]
root     11996  0.1  0.0      0     0 ?        S    15:10   0:00 [kworker/0:2]
root     12133  0.0  0.0      0     0 ?        S    15:11   0:00 [kworker/3:2]
root     12672  0.0  0.0      0     0 ?        S    15:12   0:00 [kworker/0:3]
root     12673  0.0  0.0      0     0 ?        S    15:12   0:00 [kworker/1:0]
root     12676  0.3  0.2   8196  2464 ?        S    15:13   0:00 /usr/sbin/CRON -f
root     12680  0.0  0.0   1912   364 ?        Ss   15:13   0:00 /bin/sh -c /var/www/nettemp/modules/cron/1
root     12681  0.3  0.2   6312  2424 ?        S    15:13   0:00 /bin/bash /var/www/nettemp/modules/cron/1
root     12686  0.0  0.1   6312  1568 ?        S    15:13   0:00 /bin/bash /var/www/nettemp/modules/cron/1
root     12687  0.6  0.2   6312  2564 ?        S    15:13   0:00 /bin/bash /var/www/nettemp/modules/sensors/read
root     12790  0.5  0.2   6324  2728 ?        S    15:13   0:00 /bin/bash /var/www/nettemp/modules/sensors/rs485/sdm120
root     12800  0.0  0.1   6324  1336 ?        S    15:13   0:00 /bin/bash /var/www/nettemp/modules/sensors/rs485/sdm120
root     12801  0.0  0.1   1924  1332 ?        S    15:13   0:00 /usr/local/bin/sdm120c /dev/ttyUSB0 -a 188 -p
root     12802  0.0  0.1   5492  1420 ?        S    15:13   0:00 head -1
root     12803  0.0  0.0   2396   448 ?        S    15:13   0:00 awk {print $2}
root     12805  0.0  0.2   6440  2120 pts/0    R+   15:13   0:00 ps -axuw
[email protected]:/home/pi# sdm120c -a1 -b 2400 /dev/ttyUSB0 || ps -axuw
20160527-15:13:14: sdm120c: Problem locking serial device /dev/ttyUSB0, couldn't get the lock for 12820, locked by 12816.
20160527-15:13:14: Try a greater -w value (eg -w 5).
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.3  0.4  22972  4168 ?        Ss   14:42   0:07 /sbin/init
root         2  0.0  0.0      0     0 ?        S    14:42   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    14:42   0:00 [ksoftirqd/0]
root         5  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/0:0H]
root         7  0.0  0.0      0     0 ?        S    14:42   0:01 [rcu_sched]
root         8  0.0  0.0      0     0 ?        S    14:42   0:00 [rcu_bh]
root         9  0.0  0.0      0     0 ?        S    14:42   0:00 [migration/0]
root        10  0.0  0.0      0     0 ?        S    14:42   0:00 [migration/1]
root        11  0.0  0.0      0     0 ?        S    14:42   0:00 [ksoftirqd/1]
root        13  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/1:0H]
root        14  0.0  0.0      0     0 ?        S    14:42   0:00 [migration/2]
root        15  0.0  0.0      0     0 ?        S    14:42   0:00 [ksoftirqd/2]
root        17  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/2:0H]
root        18  0.0  0.0      0     0 ?        S    14:42   0:00 [migration/3]
root        19  0.0  0.0      0     0 ?        S    14:42   0:00 [ksoftirqd/3]
root        21  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/3:0H]
root        22  0.0  0.0      0     0 ?        S    14:42   0:00 [kdevtmpfs]
root        23  0.0  0.0      0     0 ?        S<   14:42   0:00 [netns]
root        24  0.0  0.0      0     0 ?        S<   14:42   0:00 [perf]
root        25  0.0  0.0      0     0 ?        S    14:42   0:00 [khungtaskd]
root        26  0.0  0.0      0     0 ?        S<   14:42   0:00 [writeback]
root        27  0.0  0.0      0     0 ?        S<   14:42   0:00 [crypto]
root        28  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        29  0.0  0.0      0     0 ?        S<   14:42   0:00 [kblockd]
root        30  0.1  0.0      0     0 ?        S    14:42   0:02 [kworker/0:1]
root        31  0.0  0.0      0     0 ?        S<   14:42   0:00 [rpciod]
root        32  0.0  0.0      0     0 ?        S    14:42   0:00 [kswapd0]
root        33  0.0  0.0      0     0 ?        S<   14:42   0:00 [vmstat]
root        34  0.0  0.0      0     0 ?        S    14:42   0:00 [fsnotify_mark]
root        35  0.0  0.0      0     0 ?        S<   14:42   0:00 [nfsiod]
root        44  0.0  0.0      0     0 ?        S<   14:42   0:00 [kthrotld]
root        45  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/3:1]
root        46  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        47  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        48  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        49  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        50  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        51  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        52  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        53  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        54  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        55  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        56  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        57  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        58  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        59  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        60  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        61  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        62  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        63  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        64  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        65  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        66  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        67  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        68  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        69  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        70  0.0  0.0      0     0 ?        S<   14:42   0:00 [VCHIQ-0]
root        71  0.0  0.0      0     0 ?        S<   14:42   0:00 [VCHIQr-0]
root        72  0.0  0.0      0     0 ?        S<   14:42   0:00 [VCHIQs-0]
root        73  0.0  0.0      0     0 ?        S<   14:42   0:00 [iscsi_eh]
root        74  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/2:1]
root        76  0.0  0.0      0     0 ?        S<   14:42   0:00 [dwc_otg]
root        77  0.0  0.0      0     0 ?        S<   14:42   0:00 [DWC Notificatio]
root        79  0.0  0.0      0     0 ?        S    14:42   0:00 [VCHIQka-0]
root        80  0.0  0.0      0     0 ?        S<   14:42   0:00 [SMIO]
root        81  0.0  0.0      0     0 ?        S<   14:42   0:00 [bioset]
root        82  0.0  0.0      0     0 ?        S    14:42   0:01 [mmcqd/0]
root        83  0.0  0.0      0     0 ?        S<   14:42   0:00 [deferwq]
root        84  0.0  0.0      0     0 ?        S    14:42   0:00 [jbd2/mmcblk0p2-]
root        85  0.0  0.0      0     0 ?        S<   14:42   0:00 [ext4-rsv-conver]
root        87  0.0  0.0      0     0 ?        S<   14:42   0:00 [ipv6_addrconf]
root       105  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/2:1H]
root       136  0.0  0.3   9944  3120 ?        Ss   14:42   0:01 /lib/systemd/systemd-journald
root       139  0.0  0.3  11880  3044 ?        Ss   14:42   0:00 /lib/systemd/systemd-udevd
root       194  0.0  0.0      0     0 ?        S    14:42   0:00 [w1_bus_master1]
root       378  0.0  0.0      0     0 ?        S<   14:42   0:00 [cfg80211]
root       437  0.0  0.0      0     0 ?        S    14:42   0:01 [RTW_CMD_THREAD]
root       454  0.0  0.2   6800  2456 ?        Ss   14:42   0:00 /usr/sbin/cron -f
root       456  0.0  0.2   3852  2444 ?        Ss   14:42   0:00 /lib/systemd/systemd-logind
avahi      468  0.0  0.2   3876  2492 ?        Ss   14:42   0:00 avahi-daemon: running [raspberrypi.local]
message+   469  0.0  0.3   5692  3164 ?        Ss   14:42   0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
root       484  0.0  0.1   2564  1888 ?        Ss   14:42   0:00 /sbin/dhcpcd -q -b
root       494  0.0  0.1  20072  1544 ?        Ssl  14:42   0:01 /sbin/apcupsd
nobody     497  0.0  0.1   2292  1468 ?        Ss   14:42   0:00 /usr/sbin/thd --daemon --triggers /etc/triggerhappy/triggers.d/ --socket /var/run/thd.socket --pidfile /var/run/thd.pid --user nobody /dev/input/event*
root       510  0.0  0.1   5500  1768 ?        S    14:42   0:00 /usr/sbin/openvpn --daemon ovpn-openvpn --status /run/openvpn/openvpn.status 10 --cd /etc/openvpn --config /etc/openvpn/openvpn.conf
root       518  0.0  0.0      0     0 ?        S    14:42   0:00 [w1_bus_master2]
avahi      526  0.0  0.0   3876   240 ?        S    14:42   0:00 avahi-daemon: chroot helper
root       553  0.0  0.0      0     0 ?        S    14:42   0:00 [kworker/u8:3]
root       571  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/1:1H]
root       581  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/0:1H]
root       594  0.0  0.2   5616  2840 ?        Ss   14:42   0:00 /usr/sbin/openvpn --daemon ovpn-openvpn --status /run/openvpn/openvpn.status 10 --cd /etc/openvpn --config /etc/openvpn/openvpn.conf
root       606  0.0  0.2   7148  2764 ?        Ss   14:42   0:00 /sbin/wpa_supplicant -s -B -P /run/wpa_supplicant.wlan0.pid -i wlan0 -D nl80211,wext -c /etc/wpa_supplicant/wpa_supplicant.conf
root       609  0.0  0.2  32144  2816 ?        Ssl  14:42   0:00 /usr/sbin/rsyslogd -n
root       680  0.0  0.4   7860  4404 ?        Ss   14:42   0:00 /usr/sbin/sshd -D
root       700  0.0  0.7  40536  6968 ?        Ssl  14:42   0:00 /usr/sbin/lightdm
ntp        750  0.0  0.3   5684  3676 ?        Ss   14:42   0:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 106:111
root       757  0.0  0.2   5668  2800 tty1     Ss   14:42   0:00 /bin/login -f
root       759  0.0  0.1   5572  1864 ttyAMA0  Ss+  14:42   0:00 /sbin/agetty --keep-baud 115200 38400 9600 ttyAMA0 vt102
snmp       792  0.2  0.5  14752  5088 ?        S    14:42   0:04 /usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -g snmp -I -smux mteTrigger mteTriggerConf -p /run/snmpd.pid
www-data   810  0.0  0.6  12412  6392 ?        Ss   14:42   0:00 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
root       838  0.0  2.7 101608 25652 tty7     Ssl+ 14:42   0:01 /usr/bin/X :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
root       852  0.0  2.0 107712 19124 ?        Ss   14:42   0:00 php-fpm: master process (/etc/php5/fpm/php-fpm.conf)
www-data   857  0.1  1.3 108812 12640 ?        S    14:42   0:01 php-fpm: pool www
www-data   858  0.1  1.3 108712 12608 ?        S    14:42   0:02 php-fpm: pool www
pi         876  0.0  0.3   4976  3344 ?        Ss   14:42   0:00 /lib/systemd/systemd --user
pi         880  0.0  0.1   6948  1392 ?        S    14:42   0:00 (sd-pam)
pi         885  0.0  0.4   8356  4460 tty1     S+   14:42   0:00 -bash
root       903  0.0  0.7  32876  7264 ?        Sl   14:42   0:00 lightdm --session-child 13 16
pi         912  0.0  1.2  54056 12252 ?        Ssl  14:42   0:00 /usr/bin/lxsession -s LXDE-pi -e LXDE
pi         936  0.0  0.0   3696   220 ?        Ss   14:42   0:00 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session x-session-manager
pi         939  0.0  0.1   3692  1636 ?        S    14:42   0:00 /usr/bin/dbus-launch --exit-with-session x-session-manager
pi         940  0.0  0.2   5608  2204 ?        Ss   14:42   0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
pi         946  0.0  0.5  32572  5640 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfsd
root       949  0.0  0.0      0     0 ?        S<   14:42   0:00 [kworker/3:1H]
pi         951  0.0  0.5  48520  5404 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes
pi         962  0.0  1.1  21776 11316 ?        S    14:42   0:00 openbox --config-file /home/pi/.config/openbox/lxde-pi-rc.xml
pi         964  0.0  0.9  32184  9020 ?        Sl   14:42   0:00 lxpolkit
pi         967  0.2  2.6  96260 24752 ?        Sl   14:42   0:04 lxpanel --profile LXDE-pi
pi         968  0.0  1.9  80404 18296 ?        Sl   14:42   0:00 pcmanfm --desktop --profile LXDE-pi
pi         973  0.0  0.0   3696   220 ?        Ss   14:42   0:00 /usr/bin/ssh-agent -s
root       978  0.0  0.7  40944  7372 ?        Ssl  14:42   0:00 /usr/lib/policykit-1/polkitd --no-debug
pi         986  0.0  0.8  44844  8128 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
root       990  0.0  0.8  59068  7816 ?        Ssl  14:42   0:00 /usr/lib/udisks2/udisksd --no-debug
rtkit      998  0.0  0.2  21376  2024 ?        SNsl 14:42   0:00 /usr/lib/rtkit/rtkit-daemon
root      1089  0.0  0.3   5008  3352 ?        Ss   14:42   0:00 /usr/lib/bluetooth/bluetoothd
pi        1096  0.0  0.6  44132  6504 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfs-afc-volume-monitor
pi        1101  0.0  0.0   1912    92 ?        S    14:42   0:00 /bin/sh /usr/bin/start-pulseaudio-x11
pi        1103  0.0  0.2   7496  2112 ?        S    14:42   0:00 /usr/bin/xprop -root -spy
pi        1107  0.0  0.5  31648  5228 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfs-mtp-volume-monitor
pi        1116  0.0  0.5  32668  5320 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
pi        1124  0.0  0.5  31752  5332 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfs-goa-volume-monitor
pi        1134  0.0  0.7  62236  7424 ?        Sl   14:42   0:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.1 /org/gtk/gvfs/exec_spaw/0
pi        1138  0.0  0.6  29692  6004 ?        Ssl  14:42   0:00 /usr/lib/menu-cache/menu-cached /tmp/.menu-cached-:0-pi
pi        1150  0.0  0.0      0     0 ?        Z    14:42   0:00 [sh] <defunct>
pi        1154  0.0  0.0      0     0 ?        Z    14:42   0:00 [sh] <defunct>
pi        1159  0.0  0.0      0     0 ?        Z    14:43   0:00 [sh] <defunct>
root      1320  0.0  0.5  12072  5028 ?        Ss   14:43   0:00 sshd: pi [priv]
pi        1334  0.1  0.4  12208  3936 ?        S    14:43   0:01 sshd: [email protected]/0
pi        1336  0.0  0.4   8356  4512 pts/0    Ss   14:43   0:00 -bash
root      1347  0.0  0.3   8288  2964 pts/0    S    14:43   0:00 su
root      1360  0.3  0.3   7188  3384 pts/0    S    14:43   0:06 bash
root      1551  0.0  0.0      0     0 ?        Z    14:43   0:00 [apccontrol] <defunct>
root      4081  0.0  0.0      0     0 ?        S    14:49   0:00 [kworker/u8:2]
smsd      4385  0.0  0.5   5828  4856 ?        Ss   14:49   0:00 smsd 574 0.0 0.5 5828 4756 ? Ss 14:42 0:00 /usr/sbin/smsd -p/var/run/smstools/smsd.pid -i/var/run/smstools/smsd.working -usmsd -gdialout
smsd      4386  0.0  0.0      0     0 ?        Z    14:49   0:00 [smsd] <defunct>
root      6551  0.0  0.0      0     0 ?        S    14:55   0:00 [kworker/1:1]
root      9106  0.0  0.0      0     0 ?        S    15:02   0:00 [kworker/0:0]
root      9268  0.0  0.0      0     0 ?        S    15:03   0:00 [kworker/2:2]
root     10037  0.0  0.0      0     0 ?        S    15:05   0:00 [kworker/3:0]
root     10881  0.0  0.0      0     0 ?        S    15:07   0:00 [kworker/1:2]
root     11787  0.0  0.0      0     0 ?        S    15:10   0:00 [kworker/2:0]
root     11996  0.1  0.0      0     0 ?        S    15:10   0:00 [kworker/0:2]
root     12133  0.0  0.0      0     0 ?        S    15:11   0:00 [kworker/3:2]
root     12672  0.0  0.0      0     0 ?        D    15:12   0:00 [kworker/0:3]
root     12673  0.0  0.0      0     0 ?        S    15:12   0:00 [kworker/1:0]
root     12676  0.0  0.2   8196  2464 ?        S    15:13   0:00 /usr/sbin/CRON -f
root     12680  0.0  0.0   1912   364 ?        Ss   15:13   0:00 /bin/sh -c /var/www/nettemp/modules/cron/1
root     12681  0.0  0.2   6312  2424 ?        S    15:13   0:00 /bin/bash /var/www/nettemp/modules/cron/1
root     12686  0.0  0.1   6312  1568 ?        S    15:13   0:00 /bin/bash /var/www/nettemp/modules/cron/1
root     12687  0.1  0.2   6312  2564 ?        S    15:13   0:00 /bin/bash /var/www/nettemp/modules/sensors/read
root     12790  0.0  0.2   6328  2744 ?        S    15:13   0:00 /bin/bash /var/www/nettemp/modules/sensors/rs485/sdm120
root     12815  0.0  0.1   6328  1340 ?        S    15:13   0:00 /bin/bash /var/www/nettemp/modules/sensors/rs485/sdm120
root     12816  0.0  0.1   1924  1204 ?        S    15:13   0:00 /usr/local/bin/sdm120c /dev/ttyUSB0 -a 188 -c
root     12817  0.0  0.1   5492  1556 ?        S    15:13   0:00 head -1
root     12818  0.0  0.0   2396   456 ?        S    15:13   0:00 awk {print $2}
root     12819  0.0  0.1   6064  1320 ?        S    15:13   0:00 sed s/-//g
root     12821  0.0  0.2   6440  2132 pts/0    R+   15:13   0:00 ps -axuw
[email protected]:/home/pi#

jot
Posty: 926
Rejestracja: śr lut 03, 2016 8:50 pm

Re: SDM120 - licznik energii elektrycznej

Post autor: jot » pt maja 27, 2016 3:23 pm

Nie wiem, czy tak powinno być, ale sprawdź co masz w cronie i sprawdź swoje ustawienia dla SDM w NT, bo możliwe, że masz zdefiniowane dwa czujniki SDM.
Z przesłanych wpisów wynika, że w momencie, w którym próbujesz odpytać SDM on już jest odpytywany:

Kod: Zaznacz cały

# sdm120c -a1 -b 2400 /dev/ttyUSB0 || ps -axuw
20160527-15:13:04: sdm120c: Problem locking serial device /dev/ttyUSB0, couldn't get the lock for 12804, locked by 12801.
20160527-15:13:04: Try a greater -w value (eg -w 5).
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
(ciach!)
root     12676  0.3  0.2   8196  2464 ?        S    15:13   0:00 /usr/sbin/CRON -f
root     12680  0.0  0.0   1912   364 ?        Ss   15:13   0:00 /bin/sh -c /var/www/nettemp/modules/cron/1
root     12681  0.3  0.2   6312  2424 ?        S    15:13   0:00 /bin/bash /var/www/nettemp/modules/cron/1
root     12686  0.0  0.1   6312  1568 ?        S    15:13   0:00 /bin/bash /var/www/nettemp/modules/cron/1
root     12687  0.6  0.2   6312  2564 ?        S    15:13   0:00 /bin/bash /var/www/nettemp/modules/sensors/read
root     12790  0.5  0.2   6324  2728 ?        S    15:13   0:00 /bin/bash /var/www/nettemp/modules/sensors/rs485/sdm120
root     12800  0.0  0.1   6324  1336 ?        S    15:13   0:00 /bin/bash /var/www/nettemp/modules/sensors/rs485/sdm120
root     12801  0.0  0.1   1924  1332 ?        S    15:13   0:00 /usr/local/bin/sdm120c /dev/ttyUSB0 -a 188 -p

Awatar użytkownika
slawko
Posty: 260
Rejestracja: czw lis 26, 2015 10:59 pm
Lokalizacja: Bełchatów

Re: SDM120 - licznik energii elektrycznej

Post autor: slawko » pt maja 27, 2016 3:42 pm

W cromnie mam:

Kod: Zaznacz cały

www/nettemp/modules/cron/1
*/5 * * * * /var/www/nettemp/modules/cron/5                 0 * * * * /var/www/nettemp/modules/cron/1h
@reboot /var/www/nettemp/modules/cron/r
00 00 * * * /var/www/nettemp/modules/cron/00h
To jest czysta instalka nettempa jeszcze nie dodane żadne czujniki wykonany skan i próbowałem dodać tylko Sdm ale jak widać coś nie idzie.
Ostatnio zmieniony pt maja 27, 2016 8:21 pm przez slawko, łącznie zmieniany 1 raz.

jot
Posty: 926
Rejestracja: śr lut 03, 2016 8:50 pm

Re: SDM120 - licznik energii elektrycznej

Post autor: jot » pt maja 27, 2016 8:13 pm

slawko pisze:To jest czy ścieżka instalka nettemp jeszcze nie dodane żadne czujniki wykonany skan i próbowałem dodać tylko Sdm ale jak widać coś nie idzie.
Jakoś nie rozumiem tego co napisałeś.

Generalnie SDM u Ciebie raczej działa. Na moje oko masz problem z ustabilizowaniem portu USB na którym masz serial, ale pare postów wyżej @hryst podrzucił rozwiązanie tego problemu. A jak już stwierdzisz pod jaką nazwą 'ukrył' się RS i poprawisz ścieżkę do urządzenia, to chcesz to zweryfikować i próbujesz czytać dane z SDM kiedy akurat cron go czyta i stąd masz problem.

Awatar użytkownika
slawko
Posty: 260
Rejestracja: czw lis 26, 2015 10:59 pm
Lokalizacja: Bełchatów

Re: SDM120 - licznik energii elektrycznej

Post autor: slawko » pt maja 27, 2016 8:31 pm

Po zainstalowaniu wszystkiego na nowo serial mam cały czas pod /dev/ttyUSB0 modem wywalony a problem i tak występuje już nawet była sama malinka i tylko serial pod usb bez żadnych czujników i to samo.

jot
Posty: 926
Rejestracja: śr lut 03, 2016 8:50 pm

Re: SDM120 - licznik energii elektrycznej

Post autor: jot » pt maja 27, 2016 8:59 pm

A usuń konfigurację SDM z NT i posprawdzaj parę razy

ODPOWIEDZ

Kto jest online

Użytkownicy przeglądający to forum: Obecnie na forum nie ma żadnego zarejestrowanego użytkownika i 1 gość