Forum

> > CS2D > Servers > Server's auto-restart
ForenübersichtCS2D-Übersicht Servers-ÜbersichtEinloggen, um zu antworten

Englisch Server's auto-restart

28 Antworten
Seite
Zum Anfang Vorherige 1 2 Nächste Zum Anfang

alt .

RoDioN1322
BANNED Off Offline

Zitieren
explain to me how to do it?

alt Re: Server's auto-restart

oxytamine
User Off Offline

Zitieren
user RoDioN1322 hat geschrieben
explain to me how to do it?

Check here for your server - if not present, start it again. That's a very basic, of course. You also need to kill old process, for example.

alt Re: Server's auto-restart

Vulpes
User Off Offline

Zitieren
He want to create script, which will restart server automatically (when it crashed in some reasons), he asks how to made one.

alt Re: Server's auto-restart

Tristam
User Off Offline

Zitieren
You can make it with other programing language like C++. And you can simply make one code which will restart cs2d_dedicated.exe when is this process crashed/closed. This is not the only one way, but it's the easiest I guess.

Pseudo code:
1
2
3
4
5
6
7
8
if process("process") is running 
{
return
}
else
{
restart
}
3× editiert, zuletzt 06.04.13 18:44:11

alt Re: Server's auto-restart

Tristam
User Off Offline

Zitieren
user oxytamine: I don't know other way, because I'm not lua programmer. Also why did you say ''Write a script to do that for you.'', if he asked how to do this?
1× editiert, zuletzt 06.04.13 18:53:19

alt Re: Server's auto-restart

Avo
User Off Offline

Zitieren
Restarting crashed with lua? Seems legit. You would use some out program to control system's process. Or hmmm... server could write to *.txt file log with time of last server's update (for example every minute) If file is not updated for one minute, out program will run cs2d_dedicated.exe one more time.

alt Re: Server's auto-restart

oxytamine
User Off Offline

Zitieren
user Tristam hat geschrieben
user oxytamine: I don't know other way, because I'm not lua programmer.

What I'm telling you is that when server is crashed it's still running (process). You should check serverlist instead.
user Avo hat geschrieben
Restarting crashed with lua? Seems legit. You would use some out program to control system's process. Or hmmm... server could write to *.txt file log with time of last server's update (for example every minute) If file is not updated for one minute, out program will run cs2d_dedicated.exe one more time.

Why so complicated dude.

alt Re: Server's auto-restart

Tristam
User Off Offline

Zitieren
user Avo: This program'll open so much of cs2d_dedicated.exe processes that'll computer freeze.

user oxytamine: I understand you. But this isn't the correct answer for his question bro.

alt Re: Server's auto-restart

oxytamine
User Off Offline

Zitieren
user Tristam hat geschrieben
user oxytamine: I understand you. But this isn't the correct answer for his question bro.

This is the correct answer - to check CS2D serverlist to make sure that server is up and running. This tech. was used on Oxy2D without any problems.

alt Re: Server's auto-restart

oxytamine
User Off Offline

Zitieren
user Cirium hat geschrieben
Always more than one way to do something.

Always one way which is the most simple. Yet you can of course try to ping the port server is running on, Mr. I-had-to-reply-because-I-am-smart.

alt Re: Server's auto-restart

Cirium
User Off Offline

Zitieren
user oxytamine hat geschrieben
user Cirium hat geschrieben
Always more than one way to do something.

Always one way which is the most simple. Yet you can of course try to ping the port server is running on, Mr. I-had-to-reply-because-I-am-smart.


Ping the process? the hell?

Ever heard of something called pgrep?

alt Re: Server's auto-restart

oxytamine
User Off Offline

Zitieren
user Cirium hat geschrieben
Ping the process? the hell?

Ping the port server is running on, idiot. <ip:port>
user Cirium hat geschrieben
Ever heard of something called pgrep?

1
netstat -plant|grep ":22"
And never use pgrep because pgrep with cron will kill your RAM.
Look, I found a link for you.
http://www.linux.com/learn
You'll find many interesting things there.

alt Re: Server's auto-restart

Cirium
User Off Offline

Zitieren
Cute. I find it interesting in which you think I have to learn. Judging by the fact that I am using it and it works.

user oxytamine hat geschrieben
And never use pgrep because pgrep with cron will kill your RAM.


That's inaccurate.
Zum Anfang Vorherige 1 2 Nächste Zum Anfang
Einloggen, um zu antworten Servers-ÜbersichtCS2D-ÜbersichtForenübersicht