Pmacct - Restart IPFire issue

Hi,

just updated IPFire to core 138 and notice that after the boot up, pmacctd did not start again. Of course I’ve checked option “boot” in menu services, however, I guess the error can be found within the logs:

Nov 29 17:17:33 ipfire pmacctd[14584]: ERROR ( default/core ): [green0] pm_pcap_open(): green0: That device is not up. Exiting.

Is this sthg. that could be fixed? Maybe move the startup of the daemon into cron?

Next question: I’m using pmacct to write some metrics every single minute to a database and noticed that each time the pmacct plugin gets executed, I get some logs in /var/log/messages:

Nov 29 17:35:01 ipfire pmacctd[25121]: INFO ( green_basic/print ): *** Purging cache - START (PID: 25121) ***
Nov 29 17:35:01 ipfire pmacctd[25121]: INFO ( green_basic/print ): *** Purging cache - END (PID: 25121, QN: 6/9, ET: 0) ***
Nov 29 17:36:01 ipfire pmacctd[25826]: INFO ( green_basic/print ): *** Purging cache - START (PID: 25826) ***
Nov 29 17:36:01 ipfire pmacctd[25826]: INFO ( green_basic/print ): *** Purging cache - END (PID: 25826, QN: 7/8, ET: 0) ***
Nov 29 17:37:01 ipfire pmacctd[26372]: INFO ( green_basic/print ): *** Purging cache - START (PID: 26372) ***
Nov 29 17:37:01 ipfire pmacctd[26372]: INFO ( green_basic/print ): *** Purging cache - END (PID: 26372, QN: 8/10, ET: 0) ***
Nov 29 17:38:01 ipfire pmacctd[26902]: INFO ( green_basic/print ): *** Purging cache - START (PID: 26902) ***
Nov 29 17:38:01 ipfire pmacctd[26902]: INFO ( green_basic/print ): *** Purging cache - END (PID: 26902, QN: 6/8, ET: 0) ***

Can I somehow prevent pmacctd from spamming the logs?

cu,
Michael

@ummeegge
Hi Erik,

It occurred recently that after a restart of IPFire, the pmacct service did not restart because of the issue I’ve mentioned above. The green interface is not up and pmacctd is already trying to collect some stats.

Is there a chance to solve this. I mean one time I will not remember and some stats will get lost.

cu,
Michael

Hi Michael,
please checkout pmacct´s starting run level e.g. via
ls /etc/rc.d/rc3.d | grep pmacct
if it is below S20 , delete it and symlink it again above 20 e.g. with a
ln -s ../init.d/pmacctd /etc/rc.d/rc3.d/S25pmacctd
and check then it again.

Best,

Erik

Done! Thanks for this commands.

Right now I do not plan to restart, but will do as soon as core140 is out.

cu,
Michael

So, just had the chance to restart IPFire and noticed that pmacct again did not automatically start up.

Does this symlink
ln -s ../init.d/pmacctd /etc/rc.d/rc3.d/S25pmacctd
supposed to point to file pmacctd in folder /etc/init.d?

If so, there is no such file in /etc/init.d I just found pmacct without letter D at the end. Maybe this is the cause of not properly restarting daemon pmacct?

Any comments plaase,
Michael

This is surely the case. This package is then a really old one, which can be expected with your replay time.

There is also a new version of Pmacct available but haven´t had time to build it but this will come too in the next days.

Best,

Erik

So you mean I should use command
ln -s ../init.d/pmacct /etc/rc.d/rc3.d/S25pmacct
instead, correct?

Maybe I should have paid more attention, because I now noticed that the symlink is painted in red letters within my SSH terminal. I guess this is due to the missing file pmacctd…

I just used the above command to re-create the symlink and now the terminal shows in normal colors.

yes, the symlinks needs to know the correct name of the initscript otherwise they link into the nirvana.