MRatWork Forum by Mustafa Ramadhan

Sawo Project - Kloxo-MR Discussions => Kloxo-MR Bugs and Requests => Topic started by: chrisf on 2014-06-04, 03:25:06

Title: [BUG - IMPORTANT] script/fixtraffic
Post by: chrisf on 2014-06-04, 03:25:06
/script/fixtraffic is no longer working for sameday use.  If I run sh /script/fixtraffic it will add the amount traffic use continuously.

It use to keep track what lines were already processed, and not process them again.  It ALWAYS says line 0 now, so it continually adds traffic.

I have been watching and investigating scavenge and fixtraffic.  These don't work very well.  This has been reported numerous times on kloxo official forums and here.

We need these fixed Mustafa.  A control panel is useless without proper traffic counting.
Title: Re: [BUG - IMPORTANT] script/fixtraffic
Post by: chrisf on 2014-06-04, 03:39:15
Code: [Select]
sh /script/fixtraffic

I am only posting neccessary output for domain in question.

Code: [Select]
Current Position 0
Count 1000 1401845375 1401825037 8030513 281
1128 lines actually processed in /home/httpd/convictionshosting.com/stats//convictionshosting.com-custom_log
Returning Total From OUT SIDE This File: 8.5

Output for admin traffic
Code: [Select]
In client-admin traffic_usage equals 36.2 and limit is UnlimitedIn client-admin

run /script/fixtraffic again
Code: [Select]
Current Position 0
Count 1000 1401845375 1401825037 8030513 281
1128 lines actually processed in /home/httpd/convictionshosting.com/stats//convictionshosting.com-custom_log
Returning Total From OUT SIDE This File: 8.5

This is WRONG!   Current position should have been 1128.  And total should have been 0.0.

Code: [Select]
In client-admin traffic_usage equals 44.8 and limit is UnlimitedIn client-admin

Run again, all three ran within a minute!
Code: [Select]
Current Position 0
Count 1000 1401845375 1401825037 8030513 281
1128 lines actually processed in /home/httpd/convictionshosting.com/stats//convictionshosting.com-custom_log
Returning Total From OUT SIDE This File: 8.5

AGAIN!  Current position 0?  It is not keeping track of what it already processed!
Code: [Select]
In client-admin traffic_usage equals 53.4 and limit is UnlimitedIn client-admin

Traffic is NOT working properly!  This is a MAJOR BUG!
Title: Re: [BUG - IMPORTANT] script/fixtraffic
Post by: MRatWork on 2014-06-04, 03:57:51
Try 'sh /script/fixtraffic --day=30'.
Title: Re: [BUG - IMPORTANT] script/fixtraffic
Post by: chrisf on 2014-06-04, 04:03:09
This will process 30 days .  Kloxo resets stats on the 1st of the month.

I run fixtraffic every 4 hours to keep 'traffic' and 'disk' usage current.  This worked in kloxo official.

This no longer works.  It should keep track of what it has processed.  If I run it 5 times, it should not add 8,5 each time to total!

Please investigate.
Title: Re: [BUG - IMPORTANT] script/fixtraffic
Post by: chrisf on 2014-06-04, 17:12:05
Did you look at this Mustafa?
Title: Re: [BUG - IMPORTANT] script/fixtraffic
Post by: MRatWork on 2014-06-04, 17:29:04
I am not testing because using webalizer without cron job for fixtraffic.
Title: Re: [BUG - IMPORTANT] script/fixtraffic
Post by: chrisf on 2014-06-04, 22:21:05
You're not using it so it doesn't matter if it doesn't work?  Really?

I'm beginning to see that this 'project'' is a waste of time.  I'll fix it, because as far as programming is concerned, you are not anything special.

Kloxo and KloxoMR is a programming nightmare.  Written half in OOP and half in conventional function calls.  I just don't have the time to work on KloxoMR as well as develop my own scripts.  You know why I didn't donate?  Because you will rather work on shiny new problems, than fix important issues.  I have spent countless hours working on KloxoMR problems, gave many solutions which you used, and when I ask for help you answer with....,..   not testing.

Well, YOU BROKE IT.  It worked in kloxo official.  It use to work in KloxoMR,  I have no idea when it stopped.
Title: Re: [BUG - IMPORTANT] script/fixtraffic
Post by: MRatWork on 2014-06-04, 22:48:22
Stats in Kloxo-MR and official is the same. Possible different is where rpm source and little bit adjustment. If in your vps not work but work in others no reason to say something wrong with it.

So, please not easy to say something like 'YOU BROKE IT'.
Title: Re: [BUG - IMPORTANT] script/fixtraffic
Post by: Joe on 2014-06-04, 23:30:49
I also run /script/fixtraffic via cron and can confirm it's no longer updating. Worked fine about a week ago. I actually can't remember why I run it via cron but I think scavenge had problems.
Title: Re: [BUG - IMPORTANT] script/fixtraffic
Post by: chrisf on 2014-06-05, 03:48:25
I say that because it was working.  Webalizer works and stats are fine.  If you read my post this is because fixtraffic is the only way to keep domain / client traffic and the resource quotas current, once every 24 hours allows abuse of resource limits.

This is happening on all 5 of my dedi's and my 2 vps.  It just no longer keeps track of the position it left off in the log file.

It always says 'current position 0'.  Rereading the log file and adding duplicate amounts onto the current traffic.
Title: Re: [BUG - IMPORTANT] script/fixtraffic
Post by: Spacedust on 2014-06-05, 12:55:07
I was always saying the same thing switch to quotas and make at least disk usage realtime !
Title: Re: [BUG - IMPORTANT] script/fixtraffic
Post by: MRatWork on 2014-06-05, 13:49:26
Different between Kloxo-MR and Kloxo Official is Kloxo-MR including logrotate. So, possible issue related to logrotate instead stats itself.