CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Need a Custom or Prewritten Perl Program?: I need a program that...:
ultrastats updating weekly

 



tiggers
New User

Oct 28, 2009, 6:29 AM

Post #1 of 5 (3060 views)
ultrastats updating weekly Can't Post

I own a site called www.fastserverfiles.org I have a subdomain called http://ultrastats.fastserverfiles.org for those not familiar ultrastats queries the servers that are running online games that i support. all the information is stored in a game log. here is what i need. if i put the gamelog in the ultrastats folder it will do the rest. right now I support more then 20 servers and this is very time taxing. I was hoping on getting a program that can go and grab that gamelog file and put it in the correct directory once or twice a week so I dont have to go and do each one manually. everything is done through ftp to a SQL database with secure logins to the game servers. no anonymous access available. anyone know which perl package I need or if i can do it another way that might be easier. If you need more information please email me

tiggers@redirectfiles.org

I am doing my best to explain everything but i know what i want to say you might not. lol



Thanks for your help

Tiggers

Joe


shest75
Novice

Oct 28, 2009, 8:53 AM

Post #2 of 5 (3054 views)
Re: [tiggers] ultrastats updating weekly [In reply to] Can't Post

Bonjour,
In order to help we need to understand the :
os of each server,
what file log name look like, is there any timestamps on the file name ?
when you said 20 servers are they 20 different physical servers ?
the server that initiate the connexion ?

FYI : ftp is not secured at all...
Running on Linux scp may help you also.

Long list of question before giving you any advice ...


(This post was edited by shest75 on Oct 28, 2009, 9:09 AM)


tiggers
New User

Oct 28, 2009, 10:34 AM

Post #3 of 5 (3044 views)
Re: [shest75] ultrastats updating weekly [In reply to] Can't Post

you are correct FTP is horrid for security sending everything plain text. What i meant by my statement of secure is that there was not anonymous access to the site. still not secure



all the servers run on a windows platform pretty much on the same IP just different ports. the game log is a straigt text files name is games_mp.log no timestamp on that file. here is a sample of what the inside of the log file looks like



D;***********************;0;axis;{DBD}MesS;***********************;6;axis;[F'R]Marathon;m21_mp;77;MOD_RIFLE_BULLET;torso_upper
8903:32 K;***********************;0;;{DBD}MesS;***********************;6;;[F'R]Marathon;m21_mp;105;MOD_HEAD_SHOT;head
8903:36 K;***********************;4;;[3SAR] ABL;***********************;1;;{DBD}Travisty;remington700_mp;139;MOD_MELEE;left_arm_upper
8903:39 Weapon;***********************;1;{DBD}Travisty;g36c_gl_mp
8903:40 Weapon;***********************;2;{DBD}Fire;m16_gl_mp
8903:43 Weapon;***********************;4;[3SAR] ABL;m16_gl_mp
8903:43 Weapon;***********************;4;[3SAR] ABL;m16_gl_mp
8903:43 Weapon;***********************;4;[3SAR] ABL;m16_gl_mp
8903:43 Weapon;***********************;4;[3SAR] ABL;m16_gl_mp
8903:43 Weapon;***********************;4;[3SAR] ABL;m16_gl_mp
8903:43 Weapon;***********************;4;[3SAR] ABL;m16_gl_mp
8903:46



ultrastats sorts that though. the trick is getting this log file to my webserver in the correct folder

anything else you need just ask


shest75
Novice

Oct 28, 2009, 11:08 AM

Post #4 of 5 (3042 views)
Re: [tiggers] ultrastats updating weekly [In reply to] Can't Post

Ok,
So don't use perl. Just use ftp command.

Try ftp -h you should see something like :

ftp -s:filename

In this filename you can send ftp command like

open 127.0.0.1 -> You should change it
shest -> the username
shest -> the password
cd /ftproot/test1 -> cd in the remote ftp directory
dir -> have an overview of files in the directory
lcd c:\temp -> "Local cd".. change it to what you want
get test1.txt -> do the get command
bye -> exit

So if you have multiple directory, just add in the script :

cd /first-src-dir
lcd /first-dest-dir
get first-logfile
cd /second-src-dir
lcd /second-dest-dir
get second-logfile

make some tests, but I hope it will help.
You just need to add it in the windows scheduler ( at ) and everything should just be fine.


I'm still wondering how log files are "rotated"...
Bye


(This post was edited by shest75 on Oct 28, 2009, 11:19 AM)


FishMonger
Veteran / Moderator

Oct 28, 2009, 12:51 PM

Post #5 of 5 (3032 views)
Re: [tiggers] ultrastats updating weekly [In reply to] Can't Post

I think rsync would be a better option than ftp.

http://www.rsync.net/resources/howto/windows_rsync.html

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives