Systemd-Journal process

Talks about metering
TonyP62
Posts: 97
Joined: Fri May 01, 2015 11:07 pm

Systemd-Journal process

Post by TonyP62 » Mon Nov 20, 2017 7:55 am

Hello All.
I have upgrade my Raspberry with new Kernel 4.9 and also is working well with MeterN 0.7 .
Then i have upgrade MeterN to 0.8 and i have see a strange process running that cause a high Load of CPU and Mem. This process is Systemd-Journal that i see with the TOP command . If i stop MeterN the Loads return normal. This process load causes an over-load after hours and i can't log in to my Raspy in SSH. I have used a cronjob command for rebooting my raspy every 2 hours, but it's not the ideal solution.
Someone have the same problem ? There is another solution ?
My MeterN uses the SDM120C driver.
Thanks.

jeanmarc
Posts: 1586
Joined: Thu Aug 29, 2013 7:16 am

Re: Systemd-Journal process

Post by jeanmarc » Mon Nov 20, 2017 9:56 am

Hello,
what say journalctl -r ?

ambramia
Posts: 19
Joined: Thu Apr 21, 2016 11:33 am

Re: Systemd-Journal process

Post by ambramia » Mon Nov 20, 2017 4:42 pm

this is my output, there ara many many lines:
Image
ctrl-c to esc

jeanmarc
Posts: 1586
Joined: Thu Aug 29, 2013 7:16 am

Re: Systemd-Journal process

Post by jeanmarc » Mon Nov 20, 2017 5:01 pm

Rather journalctl -f ?

ambramia
Posts: 19
Joined: Thu Apr 21, 2016 11:33 am

Re: Systemd-Journal process

Post by ambramia » Mon Nov 20, 2017 5:42 pm

this for pi user

Code: Select all

pi@raspberrypi:~ $ sudo journalctl -f
-- Logs begin at dom 2017-11-19 07:40:00 CET. --
nov 20 17:38:30 raspberrypi systemd[12398]: Starting Basic System.
nov 20 17:38:30 raspberrypi systemd[12398]: Reached target Basic System.
nov 20 17:38:30 raspberrypi systemd[12398]: Starting Default.
nov 20 17:38:30 raspberrypi systemd[12398]: Reached target Default.
nov 20 17:38:30 raspberrypi systemd[12398]: Startup finished in 194ms.
nov 20 17:38:30 raspberrypi systemd[1]: Started User Manager for UID 1000.
nov 20 17:39:01 raspberrypi CRON[13365]: pam_unix(cron:session): session opened for user root by (uid=0)
nov 20 17:39:01 raspberrypi CRON[13369]: (root) CMD (  [ -x /usr/lib/php5/sessionclean ] && /usr/lib/php5/sessionclean)
nov 20 17:39:01 raspberrypi sudo[13376]: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/journalctl -f
nov 20 17:39:01 raspberrypi sudo[13376]: pam_unix(sudo:session): session opened for user root by pi(uid=0)
nov 20 17:39:03 raspberrypi CRON[13365]: pam_unix(cron:session): session closed for user root
and this for root user

Code: Select all

root@raspberrypi:~# journalctl -f
-- Logs begin at dom 2017-11-19 07:40:00 CET. --
nov 20 17:41:17 raspberrypi systemd[17445]: Starting Timers.
nov 20 17:41:17 raspberrypi systemd[17445]: Reached target Timers.
nov 20 17:41:17 raspberrypi systemd[17445]: Starting Sockets.
nov 20 17:41:17 raspberrypi systemd[17445]: Reached target Sockets.
nov 20 17:41:17 raspberrypi systemd[17445]: Starting Basic System.
nov 20 17:41:17 raspberrypi systemd[17445]: Reached target Basic System.
nov 20 17:41:17 raspberrypi systemd[17445]: Starting Default.
nov 20 17:41:17 raspberrypi systemd[17445]: Reached target Default.
nov 20 17:41:17 raspberrypi systemd[17445]: Startup finished in 135ms.
nov 20 17:41:17 raspberrypi systemd[1]: Started User Manager for UID 0.


jeanmarc
Posts: 1586
Joined: Thu Aug 29, 2013 7:16 am

Re: Systemd-Journal process

Post by jeanmarc » Mon Nov 20, 2017 5:50 pm

nothing wrong there. Are you sure it is related to mN ?
try htop, it's clearer and sort by %CPU (F6)

TonyP62
Posts: 97
Joined: Fri May 01, 2015 11:07 pm

Re: Systemd-Journal process

Post by TonyP62 » Mon Nov 20, 2017 6:03 pm

Thanks all for suggestion. I have solved using the journalctl -r .
Into the protocols of 123Solar for the SDM120C driver , i have add the parameter -w9 to avoid a continue calling of the driver. In this way SDM120C expect 9 seconds for a response from the Elect Meter.
Thanks All of us.

ambramia
Posts: 19
Joined: Thu Apr 21, 2016 11:33 am

Re: Systemd-Journal process

Post by ambramia » Mon Nov 20, 2017 6:08 pm

hello TonyP62, can you explain to me what to change for the problem? I'm also writing on Flanesi's forum

TonyP62
Posts: 97
Joined: Fri May 01, 2015 11:07 pm

Re: Systemd-Journal process

Post by TonyP62 » Mon Nov 20, 2017 6:42 pm

ambramia wrote:
Mon Nov 20, 2017 6:08 pm
hello TonyP62, can you explain to me what to change for the problem? I'm also writing on Flanesi's forum
I have 2 SDM120C on the same usb adapter and i have modified the sdm120c.php into protocols in this way:

Code: Select all

$CMD_POOLING = "sdm120c -a1 ${'COMOPTION'.$invt_num} -w 9 -vpcfi -q ${'PORT'.$invt_num}";
Adding the -w9 parameter, i force SDM120C to expect 9 seconds for a response from the meter.

jeanmarc
Posts: 1586
Joined: Thu Aug 29, 2013 7:16 am

Re: Systemd-Journal process

Post by jeanmarc » Mon Nov 20, 2017 7:38 pm

Why don't you use a com daemon ? It's more efficient to read a file instead of querying each time the sdm command.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest