putty server restart?
#1

How can i use putty to restart the server?
Reply
#2

It's SSH and if you started it you should be able to stop it.
http://www.cyberciti.biz/faq/kill-pr...linux-systems/
Reply
#3

The a whole lot process, my server is up running, i connect the putty to the vps and now i dont know the commands to restart the server, can ya give me the commands
Reply
#4

Type 'top'. Look for the samp server process 'samp03svr'. If you found it, press 'k' and enter the pid for the 'samp03svr' process and press enter. Then press enter again to use the default process kill signal.
The server now is offline. Now you can start him as you did the first time. If you dont know how to start it, use the search as theres plenty of tutorials on this.
Reply
#5

Quote:
Originally Posted by Mauzen
View Post
Type 'top'. Look for the samp server process 'samp03svr'. If you found it, press 'k' and enter the pid for the 'samp03svr' process and press enter. Then press enter again to use the default process kill signal.
The server now is offline. Now you can start him as you did the first time. If you dont know how to start it, use the search as theres plenty of tutorials on this.
Alright i get that but the command must be something like " nohup ./sampsvr & " isn't it? and how can i make it to the correct directory before doing that?
Reply
#6

Your server files should be on the root or home then Type the nohup ./samp03svr &
Reply
#7

Quote:
Originally Posted by ReD_DeVi
View Post
Your server files should be on the root or home then Type the nohup ./samp03svr &
Yeah until then everything is fine but after using nohup ./samp03svr & it shows this msg

Quote:

nohup: ignoring input and appending output to `nohup.out'
nohup: failed to run command `./samp03svr': No such file or directory

Reply
#8

Quote:
Originally Posted by ReD_DeVi
View Post
Your server files should be on the root or home then Type the nohup ./samp03svr &
No, they shouldn't be in the root or home folder - you shouldn't even remotely consider them being in the root folder as that'd require running the SA-MP server as root which is a security risk. You should never run applications as root.
http://en.wikipedia.org/wiki/Filesys...archy_Standard
Reply
#9

First use 'killall -9 samp03svr' to kill the existing process & then use 'nohup ./samp03svr'
Reply
#10

Quote:
Originally Posted by ShivRp
View Post
First use 'killall -9 samp03svr' to kill the existing process & then use 'nohup ./samp03svr'
Why would you use the TERM signal? Send a signal that will properly initiate the OnGameModeExit sequence - sending TERM won't do that. Use 'kill -h' and use a better signal.
Reply
#11

Quote:
Originally Posted by rymax99
View Post
Why would you use the TERM signal? Send a signal that will properly initiate the OnGameModeExit sequence - sending TERM won't do that. Use 'kill -h' and use a better signal.
Okay guys, i just killed samp03svr and then i did nohup ./samp03svr & but what i got is this

Quote:

root@*******:~# nohup: ignoring input and appending output to `nohup.out'
nohup: failed to run command `./samp03svr': No such file or directory

What do i do now? how could i turn back my server on.
Reply
#12

cd /whereyousampserverexecislocated
./samp03svr
Reply
#13

Better yet use a starter .sh script

Code:
#!/bin/sh
log=samp.log
dat=`date`
samp="samp-server"
dir="."
cd $dir
 
echo "${dat} watchdog script starting." >>${log}
while true; do
        echo "${dat} Server exited, restarting..." >>${log}
        mv $dir/server_log.txt $dir/logs/server_log.`date '+%m%d%y%H%M%S'`
        "$dir/$samp" >> $log
	sleep 5
done
Reply
#14

Quote:
Originally Posted by Alex Valdez
View Post
cd /whereyousampserverexecislocated
./samp03svr
Yerp its working but its only temporarly working, after i close the putty it goes off. I wanna make it perm tho
Reply
#15

Quote:
Originally Posted by Bondage
View Post
Yerp its working but its only temporarly working, after i close the putty it goes off. I wanna make it perm tho
Use the starter script it will automatically restart your server in the case of a crash.
Reply
#16

Quote:
Originally Posted by Pottus
View Post
Use the starter script it will automatically restart your server in the case of a crash.
You mean i gotta use that script on the putty?
Reply
#17

To kill samp03svr process:
Code:
killall samp03svr
To turn on it on:
Code:
nohup ./samp03svr &
So your server has been rebooted
Reply
#18

Ok thank you everyone
Reply


Forum Jump:


Users browsing this thread: