[cod] Remote logging tool codlog.pl version 0.1
kendokan at amateur-hour.net
Sat Feb 7 15:10:22 EST 2004
-----BEGIN PGP SIGNED MESSAGE-----
New version is available at
Per request I've added the ability to receive from multiple senders,
although I have not actually tested the functionality. It should work,
though (famous last words, right?). You just specify multiple --address
x.x.x.x (or -a x.x.x.x) on the command line when using in receiver mode.
Sender mode will let you specify multiple addresses as well, but will only
actually use the first one for sending traffic.
I've also added a command line option to not change log file names with
every map change.
Lastly, I fixed a bug that would sometimes not change the log file name
when the map ended.
Let me know if something doesn't work.
> I had a go with this tool, is there a way of;
> - Enabling multiple senders to send to one host instance and all go in to
> the one log file? (eg 5 cod servers into one log reciever for generation)
> the moment it appears that you can only enable one host to recieve udp
> packets from, cant you just go -h /path/sendinghosts (where sendinghosts
> a list of ips which are your server)?
> - Turning on or off the per map logfile for option of one big logfile. or
> perhaps perday logfile, 20040207.log etc?
> Those are the two features I crave most.
> ----- Original Message -----
> From: "Kendokan" <kendokan at amateur-hour.net>
> To: <cod at icculus.org>
> Sent: Wednesday, February 04, 2004 2:51 PM
> Subject: [cod] Remote logging tool codlog.pl version 0.1
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>> I have no idea if a similar tool already exists, but I needed this and
>> was fun to write. Some of you might find it useful.
>> This Perl script codlog.pl tails a file, in particular games_mp.log, and
>> sends it to a remote server over an IP network via UDP. If you are
>> familiar with HL/CS's logaddress command, I wrote this to provide the
>> functionality. In other words, as events are added to your game server's
>> log file they are also sent across an IP network to a remote server for
>> The same script will operate as either a log sender or a log receiver,
>> by a command-line switch. Essentially, just make sure that the required
>> CPAN modules are installed on your servers and put a copy of codlog.pl
>> both servers. You use a command-line switch to set the mode, sender or
>> receiver. The receiver also creates a new log file for each map, which
>> should make parsing stats with mohstats faster since you can keep the
>> cache file.
>> Usage: codlog.pl [OPTIONS]
>> -h, --help display this help and exit
>> -s, --sender runs as a log file sender
>> -r, --receiver runs as a log file receiver
>> -a, --address address to send to or receive from
>> -p, --port UDP port to send to or receive on
>> -f, --file log file to send (sender mode only)
>> -d, --directory directory to store log files in (receiver mode
>> -e, --echo echo sent or received info to console
>> For example, on the game server:
>> /path/to/codlog.pl --sender --file
>> - --address web.server.ip.address --port 2001 --echo
>> On the web server:
>> /path/to/codlog.pl --receiver --directory /path/to/cod/log/files
>> game.server.ip.address --port 2001 --echo
>> The File::Tail CPAN module is required and can be found at
>> http://search.cpan.org/~mgrabnar/File-Tail-0.98. The other modules
>> come as part of your standard Perl installation.
>> Important things to note:
>> Documentation is scarce (read: this email is the entire documentation at
>> this point). I'll be happy to answer whatever questions I can.
>> This is a very early version, completed maybe half an hour ago.
>> Log files are sent via UDP with no error correction, encryption, or any
>> other network technology invented after about 1980 or so. Network
>> mean you will lose log information in transit. This will not affect the
>> log file on the game server, of course, just what the web server
>> But hey, if the network connection on either your game or your web
>> was crap, you wouldn't be hosting anything on it, right?
>> Running this script will have very little impact on your bandwidth. I
>> don't have an exact figure, but I'd guess maybe 2kb per second,
>> on how busy your server is and how quickly your players are shooting one
>> I have no idea if this will run under Windows. It probably will.
>> Bug reports are welcomed.
>> This script is released under the GPL. Modify it to your hearts content,
>> but any changes must also be publicly released with the copyright header
>> intact (add yourself to it).
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.2.2 (GNU/Linux)
>> -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the Cod