English Server's auto-restart

28 replies
Goto Page
To the start Previous 1 2 Next To the start
06.04.13 05:46:49 pm
Up
RoDioN1322
BANNED
Offline Off
How to make an auto-restart of the server, if it has crashed ? My VDS Linux Debian 6 OS
06.04.13 05:47:19 pm
Up
oxytamine
User
Offline Off
cron
Instead of a million words.
06.04.13 05:48:20 pm
Up
Vulpes
User
Offline Off
You know what? I don't know it.
Extremely Tricky

Admin/mod comment:

Why do you post then?! Imagine everyone who doesn't know the answer would post anyway. Please don't do that again! rules §2.1 - Needless and/or doubled posts (spam) are forbidden, no "+1", "inb4" etc. /DC
06.04.13 05:53:27 pm
Up
RoDioN1322
BANNED
Offline Off
explain to me how to do it?
06.04.13 06:04:44 pm
Up
oxytamine
User
Offline Off
user RoDioN1322 has written:
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.
06.04.13 06:22:43 pm
Up
RoDioN1322
BANNED
Offline Off
I can not always keep track of my server
06.04.13 06:28:45 pm
Up
Vulpes
User
Offline Off
He want to create script, which will restart server automatically (when it crashed in some reasons), he asks how to made one.
Extremely Tricky
06.04.13 06:35:46 pm
Up
Tristam
User
Offline Off
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:
Code:
1
2
3
4
5
6
7
8
if process("process") is running 
{
return
}
else
{
restart
}
edited 3×, last 06.04.13 06:44:11 pm
06.04.13 06:41:25 pm
Up
oxytamine
User
Offline Off
@user Tristam:
When server is crashed it's still running. Straight fail.
@user RoDioN1322:
Write a script to do that for you.
06.04.13 06:47:56 pm
Up
Tristam
User
Offline Off
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?
edited 1×, last 06.04.13 06:53:19 pm
06.04.13 06:50:15 pm
Up
RoDioN1322
BANNED
Offline Off
@Tristam
Thanks, I'll check
06.04.13 06:52:50 pm
Up
Avo
User
Offline Off
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.
06.04.13 06:53:29 pm
Up
oxytamine
User
Offline Off
user Tristam has written:
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 has written:
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.
06.04.13 06:55:39 pm
Up
Tristam
User
Offline Off
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.
06.04.13 07:11:57 pm
Up
oxytamine
User
Offline Off
user Tristam has written:
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.
07.04.13 01:34:42 am
Up
Cirium
User
Offline Off
user oxytamine has written:
user Tristam has written:
user oxytamine: I understand you. But this isn't the correct answer for his question bro.

This is the correct answer


Always more than one way to do something.
07.04.13 01:37:26 am
Up
oxytamine
User
Offline Off
user Cirium has written:
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.
07.04.13 01:41:50 am
Up
Cirium
User
Offline Off
user oxytamine has written:
user Cirium has written:
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?
07.04.13 01:46:58 am
Up
oxytamine
User
Offline Off
user Cirium has written:
Ping the process? the hell?

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

Code:
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.
07.04.13 01:54:31 am
Up
Cirium
User
Offline Off
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 has written:
And never use pgrep because pgrep with cron will kill your RAM.


That's inaccurate.
To the start Previous 1 2 Next To the start