CRON pgrep "ftpd|nfsiod|smbd|afpd|cnid constantly called

Having issues with your DietPi installation, or, found a bug? Post it here.
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

CRON pgrep "ftpd|nfsiod|smbd|afpd|cnid constantly called

Post by Gord_W »

Using V6.4 on Nanopi Neo with only Netdata running headless with openssh.

journalctl shows CRON job gets repeatedly called once every minute. I don't believe this does anything for me ... is the intended?

Gord_W

Mar 21 16:33:01 DietPi CRON[22343]: pam_unix(cron:session): session opened for user root by (uid=0)
Mar 21 16:33:01 DietPi CRON[22347]: (root) CMD (for i in `pgrep "ftpd|nfsiod|smbd|afpd|cnid"` ; do ionice -c1 -p $i ; done >/dev/null 2>&1)
Mar 21 16:33:01 DietPi CRON[22343]: pam_unix(cron:session): session closed for user root
Mar 21 16:34:01 DietPi CRON[22356]: pam_unix(cron:session): session opened for user root by (uid=0)
Mar 21 16:34:01 DietPi CRON[22360]: (root) CMD (for i in `pgrep "ftpd|nfsiod|smbd|afpd|cnid"` ; do ionice -c1 -p $i ; done >/dev/null 2>&1)
Mar 21 16:34:01 DietPi CRON[22356]: pam_unix(cron:session): session closed for user root
Mar 21 16:35:01 DietPi CRON[22373]: pam_unix(cron:session): session opened for user root by (uid=0)
Mar 21 16:35:01 DietPi CRON[22377]: (root) CMD (for i in `pgrep "ftpd|nfsiod|smbd|afpd|cnid"` ; do ionice -c1 -p $i ; done >/dev/null 2>&1)
Mar 21 16:35:01 DietPi CRON[22373]: pam_unix(cron:session): session closed for user root
Mar 21 16:36:01 DietPi CRON[22385]: pam_unix(cron:session): session opened for user root by (uid=0)
Mar 21 16:36:01 DietPi CRON[22389]: (root) CMD (for i in `pgrep "ftpd|nfsiod|smbd|afpd|cnid"` ; do ionice -c1 -p $i ; done >/dev/null 2>&1)
Mar 21 16:36:01 DietPi CRON[22385]: pam_unix(cron:session): session closed for user root
Mar 21 16:37:01 DietPi CRON[22401]: pam_unix(cron:session): session opened for user root by (uid=0)
Mar 21 16:37:01 DietPi CRON[22405]: (root) CMD (for i in `pgrep "ftpd|nfsiod|smbd|afpd|cnid"` ; do ionice -c1 -p $i ; done >/dev/null 2>&1)
Mar 21 16:37:01 DietPi CRON[22401]: pam_unix(cron:session): session closed for user root
Mar 21 16:38:01 DietPi CRON[22413]: pam_unix(cron:session): session opened for user root by (uid=0)
Mar 21 16:38:01 DietPi CRON[22417]: (root) CMD (for i in `pgrep "ftpd|nfsiod|smbd|afpd|cnid"` ; do ionice -c1 -p $i ; done >/dev/null 2>&1)
Mar 21 16:38:01 DietPi CRON[22413]: pam_unix(cron:session): session closed for user root
Mar 21 16:39:01 DietPi CRON[22432]: pam_unix(cron:session): session opened for user root by (uid=0)
Mar 21 16:39:01 DietPi CRON[22436]: (root) CMD (for i in `pgrep "ftpd|nfsiod|smbd|afpd|cnid"` ; do ionice -c1 -p $i ; done >/dev/null 2>&1)
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

Re: CRON pgrep "ftpd|nfsiod|smbd|afpd|cnid constantly called

Post by Gord_W »

Was wondering if this is a bug? What can I do about it?

Gord_W
User avatar
Fourdee
Site Admin
Posts: 2783
Joined: Tue Feb 06, 2007 1:36 pm

Re: CRON pgrep "ftpd|nfsiod|smbd|afpd|cnid constantly called

Post by Fourdee »

Hi Gordon,

Many thanks for the report.

Please can you paste results of:

Code: Select all

cat /etc/crontab
Ticket created:
https://github.com/Fourdee/DietPi/issues/1654
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

Re: CRON pgrep "ftpd|nfsiod|smbd|afpd|cnid constantly called

Post by Gord_W »

root@DietPi:~# cat /etc/crontab
#Please use dietpi-cron to change cron start times
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user command
*/30 * * * * root cd / && run-parts --report /etc/cron.minutely
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 1 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 1 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 1 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
root@DietPi:~#
User avatar
MichaIng
Site Admin
Posts: 2418
Joined: Sat Nov 18, 2017 6:21 pm

Re: CRON pgrep "ftpd|nfsiod|smbd|afpd|cnid constantly called

Post by MichaIng »

Okay, crontab looks as it should, new cron.minutely is not the reason, as it is set to every 30 minute and the journal output looks different.

Other two possibilities, root user crontab and cron.d. Could you please provide result of:

Code: Select all

ls -l /etc/cron.d
sudo crontab -l
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

Re: CRON pgrep "ftpd|nfsiod|smbd|afpd|cnid constantly called

Post by Gord_W »

root@DietPi:~# ls -l /etc/cron.d
total 8
-rw------- 1 root root 106 May 24 2017 make_nas_processes_faster
-rw-r--r-- 1 root root 123 May 24 2017 openmediavault-rrdtoolgraph
root@DietPi:~#


root@DietPi:~# sudo crontab -l
no crontab for root
root@DietPi:~#
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

Re: CRON pgrep "ftpd|nfsiod|smbd|afpd|cnid constantly called

Post by Gord_W »

root@DietPi:~# cat /etc/cron.d/make_nas_processes_faster
* * * * * root for i in `pgrep "ftpd|nfsiod|smbd|afpd|cnid"` ; do ionice -c1 -p $i ; done >/dev/null 2>&1
root@DietPi:~#

That seems to be the offending line.
User avatar
MichaIng
Site Admin
Posts: 2418
Joined: Sat Nov 18, 2017 6:21 pm

Re: CRON pgrep "ftpd|nfsiod|smbd|afpd|cnid constantly called

Post by MichaIng »

Seems to be part of Rock64 base image: https://github.com/ayufan-rock64/linux- ... ses_faster

But I don't get it, shouldn't it be working to just call this once after boot e.g.? Totally spammy like this, and most users do not even use any of these services :evil:.

So just remove that file or do:

Code: Select all

mv /etc/cron.d/make_nas_processes_faster /etc/cron.d/.make_nas_processes_faster 
to let it be ignored by cron.
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

Re: CRON pgrep "ftpd|nfsiod|smbd|afpd|cnid constantly called

Post by Gord_W »

what about openmediavault-rrdtoolgraph ?
That doesn't seem to be needed either??

root@DietPi:~# journalctl |grep omv
Mar 28 17:30:01 DietPi CRON[725]: (root) CMD (/usr/sbin/omv-mkgraph >/dev/null 2>&1)
Mar 28 17:45:01 DietPi CRON[965]: (root) CMD (/usr/sbin/omv-mkgraph >/dev/null 2>&1)
Mar 28 18:00:01 DietPi CRON[1191]: (root) CMD (/usr/sbin/omv-mkgraph >/dev/null 2>&1)
Mar 28 18:15:01 DietPi CRON[1412]: (root) CMD (/usr/sbin/omv-mkgraph >/dev/null 2>&1)
Mar 28 18:30:01 DietPi CRON[1745]: (root) CMD (/usr/sbin/omv-mkgraph >/dev/null 2>&1)
Mar 28 18:45:01 DietPi CRON[1986]: (root) CMD (/usr/sbin/omv-mkgraph >/dev/null 2>&1)
Mar 28 19:00:01 DietPi CRON[2219]: (root) CMD (/usr/sbin/omv-mkgraph >/dev/null 2>&1)
Mar 28 19:15:01 DietPi CRON[2439]: (root) CMD (/usr/sbin/omv-mkgraph >/dev/null 2>&1)
Mar 28 19:30:01 DietPi CRON[2772]: (root) CMD (/usr/sbin/omv-mkgraph >/dev/null 2>&1)
Mar 28 19:45:01 DietPi CRON[3009]: (root) CMD (/usr/sbin/omv-mkgraph >/dev/null 2>&1)
Mar 28 20:00:01 DietPi CRON[3235]: (root) CMD (/usr/sbin/omv-mkgraph >/dev/null 2>&1)
Mar 28 20:15:01 DietPi CRON[3455]: (root) CMD (/usr/sbin/omv-mkgraph >/dev/null 2>&1)
Mar 28 20:30:01 DietPi CRON[3789]: (root) CMD (/usr/sbin/omv-mkgraph >/dev/null 2>&1)
Mar 28 20:45:01 DietPi CRON[4031]: (root) CMD (/usr/sbin/omv-mkgraph >/dev/null 2>&1)
Mar 28 21:00:01 DietPi CRON[4255]: (root) CMD (/usr/sbin/omv-mkgraph >/dev/null 2>&1)
Mar 28 21:15:01 DietPi CRON[4472]: (root) CMD (/usr/sbin/omv-mkgraph >/dev/null 2>&1)
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

Re: CRON pgrep "ftpd|nfsiod|smbd|afpd|cnid constantly called

Post by Gord_W »

make_nas_processes_faster
openmediavault-rrdtoolgraph

By deleting those two files there are less entries in journalctl output.

thanks,

Gord_W
Post Reply