vsp stats

Discussion for Admins of ETPro/BayonET servers.
If you don't run a server, please don't post here...

Moderators: Forum moderators, developers

Post Reply
User avatar
Luk4ward
Posts: 236
Joined: Sun Jul 30, 2006 1:55 pm
Location: Poland
Contact:

vsp stats

Post by Luk4ward »

Hi,

i did what bani said:

Code: Select all

Q: "(some stats/logparser program) doesn't work with etpro!"
A: b_logrealtimestamps 0, b_brokenlogtimestamps 1 will make etpro log in the old broken etmain log format that some log analysers expect.
and vsp is showing incorrect date, for example: 1971-12-28 00:18:16

Image

I was talking with an admin from jaymod server and in this mod he can set the correct time. He said that the only way to fix it for me is manually adding timestamp to server.cfg:

for example:

Code: Select all

sets gamestartup 12/28/2006 11:46:00
or by adding

Code: Select all

+ sets gamestartup \"`date +"%m-%d-%Y %T"`\""
any1 from etpro admins try to set the proper date? Or maybe got some suggestion how to fix this?
wolFTeam.pl
jump3r
Posts: 159
Joined: Sun Apr 18, 2004 1:11 am

Post by jump3r »

yes, you need to set gamestartup anyway (at least for vsp stats).

in shortened version, just add
+sets gamestartup "currentdate currenttime"
to the command line. it must be in this format: "12/22/2006 7:11:02"

for example, i'm using this batch file @ my windows server:

Code: Select all

@echo off
cls
title ET server start
cd c:\wolfet1
if exist text.txt del text.txt
if exist t$e$m$p*.bat del t$e$m$p*.bat

if not '%2'=='' goto SecondTime
echo @PROMPT %0 $t > T$E$M$P1.BAT
command /e:4096 /C T$E$M$P1.BAT > T$E$M$P2.BAT
T$E$M$P2.BAT
:SecondTime
if exist t$e$m$p*.bat DEL T$E$M$P*.BAT
echo %1 > text.txt
for /f "tokens=1-3 delims=. " %%x IN ('type text.txt') do set cas=%%x:%%y:%%z

for /f "tokens=1-4 delims=/ " %%i IN ('date /t') do set usdate=%%k/%%j/%%l

echo %usdate% %cas%

ETDED.exe +set dedicated 2 +set fs_game etpro +sets gamestartup "%usdate% %cas%" +set net_ip xxx.xxx.xxx.xxx +set net_port xxxxx +set com_hunkmegs 128 +set sv_punkbuster 1 +exec server.cfg

if exist text.txt del text.txt
if exist t$e$m$p*.bat del t$e$m$p*.bat
yes, it's really weird. however, it works.
User avatar
Luk4ward
Posts: 236
Joined: Sun Jul 30, 2006 1:55 pm
Location: Poland
Contact:

Post by Luk4ward »

i see:/,

thanks for your answer and i guess u do not have some script in linux version :P. The host is restarting server everyday at 6 a.m so ill ask them to set at this time the current date and time in the command line, but dont know if they be able to write such script...

regards
wolFTeam.pl
User avatar
Luk4ward
Posts: 236
Joined: Sun Jul 30, 2006 1:55 pm
Location: Poland
Contact:

Post by Luk4ward »

and btw the time&date in etadmin mod is correct :/ ...

Maybe it can be fixed by lua script?

http://www.lua.org/pil/22.1.html
wolFTeam.pl
User avatar
RoadKillPuppy
Posts: 207
Joined: Thu Apr 08, 2004 9:21 am
Location: Belgium!
Contact:

Post by RoadKillPuppy »

Luk4ward wrote:and i guess u do not have some script in linux version :P.
There you gooo... +sets gamestartup "`date +"%D %T"`"
User avatar
Luk4ward
Posts: 236
Joined: Sun Jul 30, 2006 1:55 pm
Location: Poland
Contact:

Post by Luk4ward »

RoadKillPuppy wrote:
Luk4ward wrote:and i guess u do not have some script in linux version :P.
There you gooo... +sets gamestartup "`date +"%D %T"`"
yep i know, i was asking if there is a script not a command for linux
wolFTeam.pl
User avatar
RoadKillPuppy
Posts: 207
Joined: Thu Apr 08, 2004 9:21 am
Location: Belgium!
Contact:

Post by RoadKillPuppy »

roger that... 2nd attempt...

Code: Select all

#!/bin/bash

SERVER_ROOT_DIR="/opt/srv/myserver"
IP=<ip here>
PORT=27960
MCLIENTS=30
USER="etded"
NAME="ETPro Game Server on $IP&#58;$PORT - MYSERVER"
DESC="s$PORT"

BASEPATH="$SERVER_ROOT_DIR"
if &#91; ! -d $BASEPATH &#93;
        then
                echo -e "\nNo game server found in location $BASEPATH."
                echo -e "This is what is in your server root directory&#58;\n"
                ls -dog --color /opt/srv/* $SERVER_ROOT_DIR | grep dr
                echo ""
                exit 1
fi

HOMEPATH=$BASEPATH
MOD="etpro"
HUNKMEGS="128"
ZONEMEGS="24"
BINARY="etded.x86"
DAEMON="$BASEPATH/$BINARY"

OPTIONS="+set dedicated 2 +set com_hunkmegs $HUNKMEGS +set com_zonemegs $ZONEMEGS +set net_ip $IP +set net_port $PORT +set sv_maxclients $MCLIENTS +set fs_basepath $BASEPATH +set fs_homepath $HOMEPATH +set fs_game $MOD +set sv_punkbuster 1 +exec server.cfg +sets gamestartup "`date +"%D %T"`""

server_start &#40;&#41; &#123;
        echo -n "Starting $NAME&#58; "
        echo screen -dmS $DESC su -m -c "$DAEMON $OPTIONS" - $USER
        screen -dmS $DESC su -m -c "$DAEMON $OPTIONS" - $USER
        echo "done."
        sleep 1
        SERVERPID=$&#40;pidof $DAEMON&#41;
        echo -e "$DESC has PID $SERVERPID"
        $BASEPATH/etadmin_mod/etadmin_mod.sh start
&#125;

server_stop &#40;&#41; &#123;
        echo -n "Shutting down $NAME&#58; "
        kill -s SIGTERM $&#40;pidof $DAEMON&#41;
        echo "done."
        $BASEPATH/etadmin_mod/etadmin_mod.sh stop
&#125;

server_restart &#40;&#41; &#123;
        server_stop
        sleep 2
        server_start
&#125;

case "$1" in
    start&#41;
        server_start
        ;;
    stop&#41;
        server_stop
        ;;
    restart&#41;
        server_restart
        ;;
    *&#41;
        SCRIPTNAME=`basename $0`
        echo "Usage&#58; $SCRIPTNAME &#123;start|stop|restart&#125;"
        exit 1
        ;;
esac
exit 0
User avatar
Luk4ward
Posts: 236
Joined: Sun Jul 30, 2006 1:55 pm
Location: Poland
Contact:

Post by Luk4ward »

thx RoadKillPuppy :), looks like u did very hard and good job :P

ill send it to the host company and see what they will say

regards and thx again :)
wolFTeam.pl
Post Reply