A couple Linux questions.

Requests for assistance and other HOWTOs.

Moderator: Board moderators

Zee
Newbie
Posts: 4
Joined: Wed Oct 19, 2005 9:26 am

A couple Linux questions.

Post by Zee »

So I am kinda new to this whole Linux thing, most of my experiance has come from the setup I did to run Crossfire, so if these are stupid I'm sorry. But I figure you guys might be able to help me out on this in ways Google hasn't yet. I love my Google, but he has let me down on these two questions.

I am using crontab to run a backup of the player files on my server twice everyday. That way I can roll players back if it is ever necessary and I chose Noon and Midnight as the two backup times. So here is my crontab entry:

0 0,12 * * * /home/lain/crossfire/backup.sh >/dev/null 2>&1

Now the nice thing is that I get two back ups at 12 hour incraments. The problem is that they are at 05:00 and 17:00. Needless to say I'm a tad confused.

Second question, I have been having touble with my server crashing when people logoff sometimes. It says:

ReadPacket got an error: Connection reset by peer
ReadPacket error 104 returning 0

Now that's not my question, because I came up with a solution that works. I have a script that runs off crontab every 10 minutes and checks to see if the sever is running, and restart it if necessary. The problem is that when the script restarts it from crontab it's opened in the background. So if I want to watch the server activity via the consol, ie. 'TTY2" or whatever, I have to restart it again manually later when I notice there was a crash. So my question is this, is it possible to tell a program to be executed in the foreground of a specific 'TTY'? That way I wouldnt have to restart it again a second time just to watch server activity?

Any pointers would be great. Thanks!
Aaron
Senior member
Posts: 496
Joined: Sun Jan 30, 2005 9:04 pm
Location: New Jersey
Contact:

Post by Aaron »

yea, there should be a crossloop script in /usr/games/bin or the respective directory you isntalled it too. that just restarts the server in the foreground if it ever dies...

and i think that crashing on exiting is not good, and should probably get fixed with something other than that hack...
woo
Senior member
Posts: 427
Joined: Tue Jun 15, 2004 10:32 pm
Location: Atlanta, GA
Contact:

Post by woo »

Have you set the timezone on your linux system? Your 5 hours off which would put you in the US on EST assuming you missed that. (You can check the time/date on the system with the "date" command.) As for setting the timzeone that varies by distribution. What distribution are you running i.e. redhat/debian/etc.
Aaron
Senior member
Posts: 496
Joined: Sun Jan 30, 2005 9:04 pm
Location: New Jersey
Contact:

Post by Aaron »

also be carefull if your using windows on your computer. dont know how windows figures out the time, but it makes no sense. it also puts linuxs time off by a random number our hours, about 5...
woo
Senior member
Posts: 427
Joined: Tue Jun 15, 2004 10:32 pm
Location: Atlanta, GA
Contact:

Post by woo »

A dual booting windows/linux system reads it's time from BIOS - however if one of them has the time set incorrectly when it syncs to BIOS on shutdown the other operating system will boot up with the wrong time.
Aaron
Senior member
Posts: 496
Joined: Sun Jan 30, 2005 9:04 pm
Location: New Jersey
Contact:

Post by Aaron »

i also think windows sotres local time to the bios, while i had my linux box have it set GMT, then have teh desktop convert it to local. i solved the problem by deleting windows...
techolous
Regular
Posts: 77
Joined: Thu Jun 17, 2004 2:41 am
Location: Eastern Coast of the United States

Post by techolous »

I usualy use ntp to sync the clock on boot. Tends to fix any issues with an other OS screwing around with the clock.
woo
Senior member
Posts: 427
Joined: Tue Jun 15, 2004 10:32 pm
Location: Atlanta, GA
Contact:

Post by woo »

ntp certainly works, however only when your online. For laptop users it's not qutie as ideal. I've been supporting dual booting laptops for my guys for years. We don't have trouble with the time getting hosed when going back and forth unless:
a) time zone are set incorrectly
b) motherboard battery is too low

Anyway my point is ntp will work, but if your either a or b is true above, you'll have other problems.
Post Reply