This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

13 instances of nacctdreport.pl running

On 5.100,
This morning I noticed I have 13 copies of nacctdreport.pl running.
Each is using 7% of CPU.

I have accounting set to generate the SMALL reports.

The only other (possibly related?) anomaly is I got 2 emails about /var/log filling up this morning, at 4am and 5am.
It is currently 57% full (1.8G used of 3.4G), I have it set to email at 70%, delete at 80%.

Also, I notice that the Monthly traffic report for Dec is not there, and neither are Jan 1-3.
Dec 31 is there though.

I will leave it alone for the moment, if anyone wants further info let me know.

Thanks,
Barry


This thread was automatically locked due to age.
Parents
  • nacctreport.pl reads your network accounting data and creates network accounting reports. Those reporters always work on the log data of a whole day. I'd bet that one reporter could not finish it's work in 24 hours, the next one was started (on the next day's data), slowing the whole process, so this reporter coul d not finish in 24 hours, too. Then, the next one was started, ..., ...
    How big are your accounting log files? How fast is your processor?
  • Hi Andreas,

    CPU is PIII 500

    /var/log/nacctddata is at 1.9GB

    /var/log/nacctddata # du -sh *
    1.2G    2004
    339M    2005
    371M    net-acct
    788K    net-acct-dump
    0       net-acct-dump.o

    The only thing in 2004 is December; I deleted the other stuff a few weeks ago.

    Is there a fullyear process that is trying to run?

    I was having trouble before with nacctd taking all day to do the accounting reports, but after setting it to the SMALL reports, it usually is done before noon.

    BTW, last night it was down to 12 processes, now it's at 14.
    ISTM that it should only be running 1 per day.
    Also, as I said before, it did finish all the reports through Dec 31, so I don't understand why there would now be 14 processes.

    I'd expect it to be trying to finish Dec fullmonth, & Jan 1,2,3,4, so that seems like it should be 5 processes.

    Should I kill some/all of the processes? reboot?

    The firewall is still otherwise working OK so I can be a little patient, although it does look like it is swapping a lot more than normal.

    Code:
    # free
                 total       used       free     shared    buffers     cached
    Mem:        256360     248400       7960          0      14336      74088
    -/+ buffers/cache:     159976      96384
    Swap:      1052248      98788     953460



    Thanks,
    Barry
  • Hi Barry,
    your assumptions are mostly correct, but:
    - there is no "yearly" naccdt report (this would be suicide for _many_ machines out there)
    - there are three different network accounting report processes:
    One process doing the "daily" reports (started at 00:20, working on yesterday's accounting data), one doing the "ThisMonth" reports (started at 02:30, working on all days of this month), and one doing the "LastMonth" report (started at 01:30 at every first of the month, working on the complete last month). 

    If the "yesterday" process can not be finished in 24 hours, it is more than likely that the "ThisMonth" process can't be finished in 24 hours, either, which leads to processes stacking up. This often happens when the "yesterday" processes get slowed down by a running "LastMonth" process. Normally, the stack gets worked down as soon as the LastMonth is finished. For most customers this is not a problem, since the reporters run with the lowest possible priority. The downside of this is that they run for a long time and need tons of RAM when stacking up.

    You could terminate those processes manually by sending a kill signal, but that would mean that you will not get a report for that day (d'oh). A reboot would terminate all reporters, but in my opinion that would be going over the top. 
    If you really want to do something: I'd terminate the "LastMonth" and "ThisMonth" processes first and wait for the reporters to settle down.

    Hope that helps,
    andreas
  • I've had to delete Nov & Dec's logs to free up disk space.
    I also killed all the nacctdreport.pl processes at that time.

    Now, a few days later, I've got 5 nacctdata.pl processes running for THISMONTH, and 2 running for YESTERDAY.

    ISTM that if there is a THISMONTH process already running, it shouldn't start more of them.

    Also, I haven't had any trouble with accounting since I switched to the SMALL reports a couple months ago.
    I haven't changed anything other than upgrading to 5.100, so I'm not sure why it's not working as well now.

    My traffic is about the same as always, and I have already throttled traffic as of today to see if that helps.

    I will kill all the .pl processes right now (11:30 pm my time), and see what happens again.

    Thanks,
    Barry
  • BTW, should I delete 
    /var/log/nacctddata/net-acct  (253MB)
    or 
    /var/log/nacctddata/net-acct-dump  (230KB)
    ?

    Thanks,
    Barry
  • No. These files contain the captured network accounting data for today. The dump file is written regularly and gets appended to the net-acct file. On midnight, it is rotated and renamed to our standard naming scheme, and during the night the nacctdreport script works on them.

    As long as you have the network accounting logs, you can always re-create accounting reports (either using our tool manually, or using external accounting tools). If you are sure you don't need them, you can delete the log files, but I'd recommend to do so only after having been processed by the nacctreport script ;-)

    Regards,
    andreas
Reply
  • No. These files contain the captured network accounting data for today. The dump file is written regularly and gets appended to the net-acct file. On midnight, it is rotated and renamed to our standard naming scheme, and during the night the nacctdreport script works on them.

    As long as you have the network accounting logs, you can always re-create accounting reports (either using our tool manually, or using external accounting tools). If you are sure you don't need them, you can delete the log files, but I'd recommend to do so only after having been processed by the nacctreport script ;-)

    Regards,
    andreas
Children
No Data