auto parse

General forum for discussions regarding UTStatsDB
strike
Posts: 16
Joined: Wed Apr 15, 2009 9:34 am

auto parse

Postby strike » Sat May 16, 2009 6:48 pm

hi, i am reposting this thread cause for some reason it was deleted.


i am trying to find out how to auto parse the files from my server. i know there is an option in the maiun config but it doesn't seem to actually work.. here is my info


UTStatsDB version current
Operating system and version linux
Database type and version MySQL version: 5.0.27-std
PHP version 5.2.6
Web server and version hosted
Unreal Tournament version current
Stat logger type and version utstats current

hope this is good.. i didn't post those specs on the first post but i didn't realize i was supposed to..

Panther
Site Admin
Posts: 500
Joined: Sat Dec 08, 2007 12:51 am
Contact:

Re: auto parse

Postby Panther » Sat May 16, 2009 7:06 pm

If you're talking about UT3 then the best solution on a Linux platform is via a cron job (or possibly two, depending on the configuration). Simply run the logs.php script using the command-line arguments. If your web server and UT server are running as the same user this is simple, if not, then the permissions must first be changed for the log files to be accessible by the web server.

Welx
Posts: 3
Joined: Sun May 17, 2009 11:10 am

Re: auto parse

Postby Welx » Sun May 17, 2009 11:50 am

Simply run the logs.php script using the command-line arguments. If your web server and UT server are running as the same user this is simple, if not, then the permissions must first be changed for the log files to be accessible by the web server.
How do you run the logs.php and what are the command-line arguments to use to parse the logs?
Are there instructions available somewhere (no instructions came with UTStatsDB)?

I'm trying to run the logs in my own Windows-based PC.

Welx

Panther
Site Admin
Posts: 500
Joined: Sat Dec 08, 2007 12:51 am
Contact:

Re: auto parse

Postby Panther » Sun May 17, 2009 2:14 pm

Documentation is in the docs directory in the standard release or www/docs in the standalone version.
In Windows you would use the task scheduler to auto-parse logs.

strike
Posts: 16
Joined: Wed Apr 15, 2009 9:34 am

Re: auto parse

Postby strike » Mon May 18, 2009 6:31 am

i did look in the docs folder but found nothing to help out.

maybe if you tell me witch one i should lok at and what i'm missing if possible?

thank you

Panther
Site Admin
Posts: 500
Joined: Sat Dec 08, 2007 12:51 am
Contact:

Re: auto parse

Postby Panther » Mon May 18, 2009 9:24 am

i did look in the docs folder but found nothing to help out.

maybe if you tell me witch one i should lok at and what i'm missing if possible?
I highly recommend reading all of them.

FlyveHest
Posts: 18
Joined: Tue Apr 21, 2009 8:42 am

Re: auto parse

Postby FlyveHest » Tue May 19, 2009 4:11 am

On a Windows box, you will need an external tool to "trigger" the parse, I use cURL, which works perfectly (note, cURL can do a LOT more than just trigger a webpage, but, its small, efficient, and works.

You can get it here

http://curl.haxx.se/latest.cgi?curl=win32-nossl

Then, make a bat file that looks somewhere along the lines of this

Code: Select all

curl http://<URL-TO-STATS-SITE>/logs.php?pass=<LOG-PARSE-PASSWORD>
Use Task Scheduler to make the bat file run every so often, and hey-presto, automatic parsing.

Panther
Site Admin
Posts: 500
Joined: Sat Dec 08, 2007 12:51 am
Contact:

Re: auto parse

Postby Panther » Tue May 19, 2009 4:17 am

There's usually no need to go through the web server - simply run PHP directly.

Code: Select all

php logs.php pass=<LOG-PARSE-PASSWORD> nohtml

strike
Posts: 16
Joined: Wed Apr 15, 2009 9:34 am

Re: auto parse

Postby strike » Tue May 19, 2009 5:55 pm

thank you for the help but i have no clue when it comes to this kinda stuff..thats why i was asking for a bit more. but i understand any help i get i am greatful for anyways ..

horndog
Posts: 40
Joined: Mon Mar 23, 2009 11:39 am
Location: 127.0.0.1
Contact:

Re: auto parse

Postby horndog » Fri May 22, 2009 1:02 pm

There's usually no need to go through the web server - simply run PHP directly.

Code: Select all

php logs.php pass=<LOG-PARSE-PASSWORD> nohtml
Will that work on a non host machine with out php installed and with no access to www file tree?

Panther
Site Admin
Posts: 500
Joined: Sat Dec 08, 2007 12:51 am
Contact:

Re: auto parse

Postby Panther » Fri May 22, 2009 1:26 pm

Will that work on a non host machine with out php installed and with no access to www file tree?
Not really.

shumm
Posts: 1
Joined: Tue Dec 22, 2009 10:14 pm

Re: auto parse

Postby shumm » Wed Dec 23, 2009 12:40 am

Please help.
If to do, the statistics gathers
(http://xxx.xxxxx.xxx/admin.php?action=parselogs)

At use auto parse
(php logs.php pass=ххххххххх nohtml)

error

Code: Select all

Processing log 'Stats-7777-20091223.092136.log'...*Error in database query: 'REPLACE INTO ut_players VALUES ( 12, 'RAWLEX', 0, 2,8,2,0,0, 0,0, 0,0,0,0, 0,0,0, '', '', '187563331', '94.41.143.45', 20000, 0, 1,14137, 0,000141472731131,0,000565890924524,1, 0,0,1, 0,0,0,0,0,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0,0,0, 0,0,0, 0, 0,0,0, 0,0,0)' 1136: Column count doesn't match value count at row 1 Error saving player data in database.

CVROY
Posts: 25
Joined: Fri Jan 01, 2010 1:36 pm

Re: auto parse

Postby CVROY » Fri Jan 29, 2010 6:38 am

shumm, try this

Code: Select all

http://your-url-here/utstats/logs.php?pass=parse-password
That will parse the logs providing that they are on you web server in the logs directory you specified in the logs configuration of utstatsdb. In the same log configuration section you can set it up in there to pull your logs via FTP from your game server to your logs directory on your web server using the above command as well.


Return to “UTStatsDB”