Tremulous Forum

Community => Servers => Topic started by: Hugoagogo on July 20, 2008, 06:13:38 am

Title: record Server statitics
Post by: Hugoagogo on July 20, 2008, 06:13:38 am
i finaly got my server to work. does anyone know a simple way to record server stats such as what maps have been played or downloaded and if aliens or humans win. mabey something similar to the tremwars stats thing but thats a bit complicated i think
Title: Re: record Server statitics
Post by: Death On Ice on July 20, 2008, 08:51:11 am
TremStats?
http://code.google.com/p/jtremstats/
Title: Re: record Server statitics
Post by: Hugoagogo on July 20, 2008, 09:22:00 am
it dosent actualy say how to use it so any help please
Title: Re: record Server statitics
Post by: David on July 20, 2008, 12:35:12 pm
Real TremStats: http://www.dasprids.de/files/Programs/tremstats
Should have docs in there.
Title: Re: record Server statitics
Post by: Hugoagogo on July 21, 2008, 05:20:38 am
ok thanks i followed that though but when i run the tremstats.py thing it just goes to a blank console and sits there doing notheing
why does nothing i do seem to work for me
Title: Re: record Server statitics
Post by: Paradox on July 21, 2008, 05:30:23 pm
Because you need python installed.
Title: Re: record Server statitics
Post by: David on July 21, 2008, 05:35:51 pm
If he didn't have python it would have made an error.
It probably takes a while to work, assuming you have any real volume of logs.
Title: Re: record Server statitics
Post by: Hugoagogo on July 22, 2008, 08:22:46 am
what i was testing it with was only like 2 games long also python comes on prity much all intsalls of linux and yes i did check i got an error the first time telling me to get the mysql python library but i got that also do i choose run in consol or run i have tried both to no luck run nothing hapens and run in consol just opens a a blank conso screen without something sometthing@something-
Title: Re: record Server statitics
Post by: Zero on July 22, 2008, 10:14:15 am
Python seems to work better on Linux and Mac OSs
Title: Re: record Server statitics
Post by: Hugoagogo on July 22, 2008, 10:35:12 am
by adding in print statements i have found where it trips over its self is with this command
self.MySQL_connect()
any ideas i have checked by opeinging idle and typing
import MySQLdb
and it dosent come up with errors so that must be ok then so what else

Edit
the line it dies on in that function is
self.db = MySQLdb.connect(CONFIG['MYSQL_HOSTNAME'], CONFIG['MYSQL_USERNAME'], CONFIG['MYSQL_PASSWORD'], CONFIG['MYSQL_DATABASE'])

so its the one where it connects i downloaded some other .py files that test if mysqldb.connect is working and they didnt work either reading though the code i understand it mostly(i have done some stuff in python before but not connecting to mysql databases
Title: Re: record Server statitics
Post by: David on July 22, 2008, 02:20:02 pm
Did you give it the correct user and password etc in the config file?
And are you allowed to connect to the specified server?  It may be sat there waiting for the server to respond.
Title: Re: record Server statitics
Post by: Hugoagogo on July 27, 2008, 09:23:26 am
um the details are right but i downloaded a client on my windows machine and it couldn't connect to it either. im using one of the free databases provided by my byethost web hosting thingy
Title: Re: record Server statitics
Post by: Bissig on July 27, 2008, 09:59:39 pm
Please clarify:

1. The mysql database sits at your host?
2. You have tried accessing the database from the webhost as well as from your computer?

Considering the login data:

My host gives me 3 passwords for the mysql database: A read-only password, a read-and-write password and a master password. You might have supplied the wrong password. F.e. to create a new database you usually need the master password (at least that's how two different hosts work where I have stuff)
Title: Re: record Server statitics
Post by: Hugoagogo on July 28, 2008, 08:40:55 am
like i said i use byethost free hosting which has been realy good and i have managed to connect to it when i have used php and that kind of thing as for different passwords i havent been given different ones and yes i can aces it using the online client (php-myadmin)
Title: Re: record Server statitics
Post by: David on July 28, 2008, 12:49:41 pm
phpmyadmin is on the same box as the mysql server, so will work.
People generally firewall mysql servers so only authorised people can access them.
Get added to the list or get your own server.
Title: Re: record Server statitics
Post by: Hugoagogo on July 29, 2008, 06:48:16 am
i know il try sending them to a local one then uploading them to the other one
Title: Re: record Server statitics
Post by: codernem on August 31, 2008, 05:40:03 pm
Why is JTremStats so bad for your kind of usage?
Title: Re: record Server statitics
Post by: Oblivion on August 31, 2008, 07:18:36 pm
Seems to me what he is trying to do is upload tremstats to his free hosting provider and link it from point a to point b, that is going to run so slow. Better to run off the same machine. 

- Mysql
- PHP
- Tremulous
- Tremstats

All on one machine.  It will work much better.  Follow the directions, open the ports for hosting your tremstats website, then type http://(YourIP)
Title: Re: record Server statitics
Post by: David on September 06, 2008, 06:56:40 pm
It will work much better assuming you have the spare ram / cpu's and know what your doing.
A web server is a giant bullseye that will get you hacked in no time unless you hold its hand 24x7.

And JTremStats parses everything every time.  No way you want that eating a gig of logs on the same box as people are trying to play.
Title: Re: record Server statitics
Post by: codernem on September 13, 2008, 08:41:25 am
Noobulous server admins use JTremStats to parse their logs: they use it as a cron job which starts at 4 a.m every day, and it took about 4 minutes to parse 500 MB log...