Post new topic  Reply to topic  [ 197 posts ]  Go to page Previous 18 9 10 11 1214 Next
Author Message
 Post subject: Re: Blackops Log Access
PostPosted: Wed Mar 02, 2011 1:50 am 
Offline
No Longer a Newb

Joined: Thu Dec 16, 2010 11:15 am
Posts: 45
Would be great if it logged caps/defends/plants/defuses.

_________________
BLACKOPS.NET.NZ
PUGs at 9:30pm(NZ) most nights on BLACKOPS.NET.NZ PUG/Scrim [Unranked]

Top
   
 Post subject: Re: Blackops Log Access
PostPosted: Wed Mar 02, 2011 7:20 am 
Offline
No Longer a Newb

Joined: Fri Nov 12, 2010 2:25 pm
Posts: 130
TracerNZ wrote:
Would be great if it logged caps/defends/plants/defuses.


and IP (only on quit or join would be enough) :D

Top
   
 Post subject: Re: Blackops Log Access
PostPosted: Thu Mar 03, 2011 10:59 am 
Offline
What's Frag Mean?

Joined: Tue Feb 22, 2011 5:44 pm
Posts: 250
Location: At My Desk!
Would be awesome if they recorded score as well ...

_________________
Image
sCon Mod - 100% Online InGame Admin Tool! http://www.sconmod.com
Join us on Facebook - http://www.facebook.com/sConMod

Top
   
 Post subject: Re: Blackops Log Access
PostPosted: Thu Mar 03, 2011 7:04 pm 
Offline
No Longer a Newb

Joined: Mon Nov 08, 2010 6:49 pm
Posts: 36
@whitebox, I have a test version of ultra stats getting stats from a log file every 30 minutes (I read the log file every minute or so with a cron job that updates a separate log file on our FTP, then I use the query script to read the one that's updated on our FTP). Is that similar to what you're doing? I started on modifying the code just last weekend, but I'm not good with the looks or anything lol:

http://hog-hq.com/newmodules/bostats/index.php?

I also added a signature for players because I thought it would be nice to have that. As you can see from the stats pages a) I'm a terrible page designer and b) it's not even close to done lol. College is taking up all my time :(.

If you need any help, I'd be interested.

Top
   
 Post subject: Re: Blackops Log Access
PostPosted: Thu Mar 03, 2011 8:47 pm 
Offline
No Longer a Newb

Joined: Mon Nov 08, 2010 3:02 pm
Posts: 132
Location: Orrstraalia
I wonder if some of you experienced php devs might be able to help me.

Im not a noob at php but Im not an expert either in terms of the best way to do certain things. Specifically im looking for a "best practice" way of getting the last 50k or whatever of logs and then doing the parsing. I am able to get the log using the range header etc using a curl get method and have done some chat log parsing.

But the thing I'm trying to do is figure out the best way to continually get the "next" set of log lines I need and I've seen references to stream_contexts and reading from file versions of the log rather than just straight from the http get response in memory.

can anyone suggest or provide code that will do this?

Thanks in advance.

_________________
Image
Image

TOG - The Older Gamers - Never Too Old To Play Games

Top
   
 Post subject: Re: Blackops Log Access
PostPosted: Thu Mar 03, 2011 11:24 pm 
Offline
No Longer a Newb

Joined: Thu Dec 16, 2010 11:15 am
Posts: 45
The trickiest part is deciding which is a new line since the last scan and which is not, particularly with multiple damage lines which are potentially(and likely) identical. When you come up with a good method which isn't slow let me know. ;)

_________________
BLACKOPS.NET.NZ
PUGs at 9:30pm(NZ) most nights on BLACKOPS.NET.NZ PUG/Scrim [Unranked]

Top
   
 Post subject: Re: Blackops Log Access
PostPosted: Fri Mar 04, 2011 6:13 am 
Offline
No Longer a Newb

Joined: Fri Nov 12, 2010 2:25 pm
Posts: 130
@hogrampage I am not working on ultra stats, i did everything from the scratch. Also I dont use FTP.
Directly fetching the file with the range header and running though the lines every minute.
The log-fetcher is completly finished and supports multiple servers at once.

@TracerNZ,@SJ777 When log file is fetched I put it into an array, then remove the first line
and check the last timestamp. This timestamp i put into a cache file. Then I let the code
run though all lines starting from the previous timestamp cache file until smaller then the current timestamp.
Also other checks are beeing done, for instance if the server would have crashed.

Top
   
 Post subject: Re: Blackops Log Access
PostPosted: Fri Mar 04, 2011 8:28 am 
Offline
No Longer a Newb

Joined: Thu Dec 16, 2010 11:15 am
Posts: 45
Yes but the timestamps are only down to 1 second resolution so you will get duplicate damage lines or miss some that way. I find g_logTimestampInSeconds is awesome though, gives you a unix timestamp of exactly when the line occured rather than time since server restart.

_________________
BLACKOPS.NET.NZ
PUGs at 9:30pm(NZ) most nights on BLACKOPS.NET.NZ PUG/Scrim [Unranked]

Top
   
 Post subject: Re: Blackops Log Access
PostPosted: Fri Mar 04, 2011 10:17 am 
Offline
No Longer a Newb

Joined: Fri Nov 12, 2010 2:25 pm
Posts: 130
TracerNZ wrote:
Yes but the timestamps are only down to 1 second resolution so you will get duplicate damage lines or miss some that way. I find g_logTimestampInSeconds is awesome though, gives you a unix timestamp of exactly when the line occured rather than time since server restart.


I am not using unix timestamp.

I let the coderun though all lines starting from the previous timestamp cache file [del]until[/del] while smaller then the current timestamp.

while ($line_timestamp < $cached_timestamp) ... not =<

I dont get dups.

Top
   
 Post subject: Re: Blackops Log Access
PostPosted: Sat Mar 05, 2011 11:11 pm 
Offline
No Longer a Newb

Joined: Mon Nov 08, 2010 3:02 pm
Posts: 132
Location: Orrstraalia
Thanks for the responses guys. I'm also using the unixtimestamp format but I'm only looking for Join and Chat info at this stage so I should have no problems with the methods suggested.

I'll do some some tests.

_________________
Image
Image

TOG - The Older Gamers - Never Too Old To Play Games

Top
   
 Post subject: Re: Blackops Log Access
PostPosted: Sat Mar 05, 2011 11:44 pm 
Offline
No Longer a Newb

Joined: Thu Dec 16, 2010 11:15 am
Posts: 45
whitebox wrote:
TracerNZ wrote:
Yes but the timestamps are only down to 1 second resolution so you will get duplicate damage lines or miss some that way. I find g_logTimestampInSeconds is awesome though, gives you a unix timestamp of exactly when the line occured rather than time since server restart.


I am not using unix timestamp.

I let the coderun though all lines starting from the previous timestamp cache file [del]until[/del] while smaller then the current timestamp.

while ($line_timestamp < $cached_timestamp) ... not =<

I dont get dups.

As an example, how will your code handle this if it were split? Doesn't matter if you use linux timestamp or time since server reboot, it's still only 1 second resolution.
Code:
1296537925 D;***;7;axis;[zOps]tw!tch.zOps;***;5;allies;TwoToes;spas_mp;30;MOD_HEAD_SHOT;head
1296537925 D;***;7;axis;[zOps]tw!tch.zOps;***;5;allies;TwoToes;spas_mp;30;MOD_HEAD_SHOT;head
1296537925 D;***;7;axis;[zOps]tw!tch.zOps;***;5;allies;TwoToes;spas_mp;30;MOD_HEAD_SHOT;head
1296537925 K;***;7;axis;[zOps]tw!tch.zOps;***;5;allies;TwoToes;spas_mp;30;MOD_HEAD_SHOT;head

Code:
1296537796 K;***;2;allies;Claytonator;***;6;axis;Nudie;knife_mp;136;MOD_MELEE;left_arm_upper
1296537796 D;***;7;allies;[zOps]tw!tch.zOps;***;8;allies;T0X1C;aug_mp;35;MOD_RIFLE_BULLET;right_leg_upper
1296537796 D;***;7;allies;[zOps]tw!tch.zOps;***;8;allies;T0X1C;aug_mp;35;MOD_RIFLE_BULLET;torso_lower
1296537796 K;***;7;allies;[zOps]tw!tch.zOps;***;8;allies;T0X1C;aug_mp;35;MOD_RIFLE_BULLET;torso_lower

Code:
1296537676 D;***;8;allies;T0X1C;***;2;allies;Claytonator;spas_mp;13;MOD_PISTOL_BULLET;right_leg_upper
1296537676 D;***;8;allies;T0X1C;***;2;allies;Claytonator;spas_mp;13;MOD_PISTOL_BULLET;left_leg_upper
1296537676 D;***;8;allies;T0X1C;***;2;allies;Claytonator;spas_mp;16;MOD_PISTOL_BULLET;right_hand
1296537676 D;***;8;allies;T0X1C;***;2;allies;Claytonator;spas_mp;18;MOD_PISTOL_BULLET;torso_lower
1296537676 K;***;8;allies;T0X1C;***;2;allies;Claytonator;spas_mp;18;MOD_PISTOL_BULLET;torso_lower


Code:
3977:56 D;***;11;allies;HappyStar;***;4;axis;Fordfreak;famas_gl_mp;35;MOD_RIFLE_BULLET;torso_lower
3977:56 D;***;17;allies;[1337]TehTommeh=;***;10;axis;A Dodgy Violin;mp5k_rf_mp;20;MOD_PISTOL_BULLET;left_hand
3977:56 D;***;11;allies;HappyStar;***;4;axis;Fordfreak;famas_gl_mp;35;MOD_RIFLE_BULLET;right_foot
3977:56 K;***;17;allies;[1337]TehTommeh=;***;10;axis;A Dodgy Violin;mp5k_rf_mp;20;MOD_PISTOL_BULLET;torso_lower
3977:56 K;***;11;allies;HappyStar;***;4;axis;Fordfreak;famas_gl_mp;35;MOD_RIFLE_BULLET;torso_lower

_________________
BLACKOPS.NET.NZ
PUGs at 9:30pm(NZ) most nights on BLACKOPS.NET.NZ PUG/Scrim [Unranked]

Top
   
 Post subject: Re: Blackops Log Access
PostPosted: Sun Mar 06, 2011 7:30 am 
Offline
No Longer a Newb

Joined: Fri Nov 12, 2010 2:25 pm
Posts: 130
TracerNZ wrote:
Yes but the timestamps are only down to 1 second resolution so you will get duplicate damage lines or miss some that way. I find g_logTimestampInSeconds is awesome though, gives you a unix timestamp of exactly when the line occured rather than time since server restart.


Mate.. your logfile examples are way too short.

I thought it was pretty clear.. but.. here another example of the process.

4:08 is cached. Then the code will run through 4:08 until 4:11 ...... 4:15 will be cached

Code:
  3:41 J;64331657;1;[ArA]WHiTEBOX
  3:47 J;0;0;[3arc]democlient
  4:08 D;20637605;5;allies;dTeam # LiQuiD;21593468;4;axis;Rueg] Operator;ak74u_rf_m...
  4:10 D;64331657;1;allies;[ArA]WHiTEBOX;55528309;2;axis;[ArA]Mr100[SwE];ak74u_rf_...
  4:10 D;64331657;1;allies;[ArA]WHiTEBOX;55528309;2;axis;[ArA]Mr100[SwE];ak74u_rf_...
  4:10 K;64331657;1;allies;[ArA]WHiTEBOX;55528309;2;axis;[ArA]Mr100[SwE];ak74u_rf_...
  4:11 D;21593468;4;axis;Rueg] Operator;20637605;5;allies;dTeam # LiQuiD;ak47_silenc...
  4:11 D;21593468;4;axis;Rueg] Operator;20637605;5;allies;dTeam # LiQuiD;ak47_silenc...
  4:11 K;21593468;4;axis;Rueg] Operator;20637605;5;allies;dTeam # LiQuiD;ak47_silenc...
  4:15 D;50151117;3;allies;[Stz]Saintz | Baal;29097130;6;axis;[SEF]Ra[V]eN;ak74u_rf_m...
  4:15 D;50151117;3;allies;[Stz]Saintz | Baal;29097130;6;axis;[SEF]Ra[V]eN;ak74u_rf_m...



Next run..
At this point 4:15 is cached. The code will run from 4:15 until 4:29 .. and 4:30 will be cached.

Code:
  4:10 K;64331657;1;allies;[ArA]WHiTEBOX;55528309;2;axis;[ArA]Mr100[SwE];ak74u_rf_...
  4:11 D;21593468;4;axis;Rueg] Operator;20637605;5;allies;dTeam # LiQuiD;ak47_silenc...
  4:11 D;21593468;4;axis;Rueg] Operator;20637605;5;allies;dTeam # LiQuiD;ak47_silenc...
  4:11 K;21593468;4;axis;Rueg] Operator;20637605;5;allies;dTeam # LiQuiD;ak47_silenc...
  4:15 D;50151117;3;allies;[Stz]Saintz | Baal;29097130;6;axis;[SEF]Ra[V]eN;ak74u_rf_m...
  4:15 D;50151117;3;allies;[Stz]Saintz | Baal;29097130;6;axis;[SEF]Ra[V]eN;ak74u_rf_m...
  4:15 K;50151117;3;allies;[Stz]Saintz | Baal;29097130;6;axis;[SEF]Ra[V]eN;ak74u_rf_m...
  4:19 J;47160263;7;[SEF]Ultra
  4:29 Weapon;29097130;6;Ra[V]eN;ak74u_rf_mp
  4:29 D;20637605;5;allies;dTeam # LiQuiD;29097130;6;axis;[SEF]Ra[V]eN;ak74u_rf_mp...
  4:30 D;20637605;5;allies;dTeam # LiQuiD;29097130;6;axis;[SEF]Ra[V]eN;ak74u_rf_mp...
  4:30 K;20637605;5;allies;dTeam # LiQuiD;29097130;6;axis;[SEF]Ra[V]eN;ak74u_rf_mp...


I hope you understand the process by these examples now. There wont be dups or missing data.

Top
   
 Post subject: Re: Blackops Log Access
PostPosted: Wed Mar 09, 2011 1:41 am 
Offline
Click my affiliate link

Joined: Fri Feb 05, 2010 12:28 am
Posts: 352
Location: Nuevo Mexico
Where did you get the test ultrastats from ?

_________________
Image
http://www.clanwta.com

Top
   
 Post subject: Re: Blackops Log Access
PostPosted: Mon Mar 14, 2011 9:38 pm 
Offline
No Longer a Newb

Joined: Sun Oct 17, 2010 1:40 pm
Posts: 38
Location: Spain
Is it possible make a ultrastats for joomla???

Thanks

Top
   
 Post subject: Re: Blackops Log Access
PostPosted: Wed Mar 16, 2011 2:29 pm 
Offline
GameServers.com Forum Newb

Joined: Wed Feb 02, 2011 12:01 am
Posts: 8
hogramage
If you dont mind me asking how did you setup a file to get the updated server logs?

Does anyone know the command to set up a script to get logs from black ops server?

Thanks

Top
   
      Looking for Call of Duty: Blackops Dedicated Servers? Find them exclusively at GameServers.com!
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 197 posts ]  Go to page Previous 18 9 10 11 1214 Next


Who is online

Users browsing this forum: No registered users and 58 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


© GameServers.com, All rights reserved. High Quality Teamspeak, Ventrilo & Gameserver Hosting at Cheap Prices!