cum opresc un server de cs pe linux ?[rezolvat!]
Moderators: Moderatori ajutatori, Moderatori
- Mantea
- Membru, skill 0
- Posts: 46
- Joined: 08 Feb 2011, 02:07
- Detinator Steam: Da
- Detinator server CS: da
- Has thanked: 6 times
- Contact:
Am pornit mai devreme un server de cs si nu stiu comanda de oprire Am acces la SSH .ma ajuta si pe mine cineva ?D
Last edited by SPLAT on 14 Mar 2011, 13:38, edited 1 time in total.
Reason: [rezolvat!]
Reason: [rezolvat!]
- VINTYLA #
- Membru, skill +4
- Posts: 1548
- Joined: 05 Apr 2009, 00:48
- Detinator Steam: Da
- CS Status: Do more !
- Detinator server CS: CS.EXTREAM.RO
- SteamID: VINTILA23
- Location: Craiova !
- Has thanked: 114 times
- Been thanked: 87 times
Tragi pc.u' din priza...si gata! se stinge serverul !
@-)
@-)
STIINTA NU MOARE !
-
- Programator eXtream
- Posts: 853
- Joined: 29 May 2009, 19:13
- Detinator Steam: Da
- CS Status: Trag cu praştia !
- Reputatie: Fost programator web eXtreamCS
Administrator tehnic
Sysadmin - Location: Bucureşti
- Has thanked: 2 times
- Been thanked: 342 times
Pe viitor incearca sa utilizezi un script bash prin intermediul caruia sa pornesti/repornesti/opresti server-ul. (google search)
Momentan, drept "solutie din topor" poti sa folosesti:
ps = arata lista de procese active
grep -i hlds = cauta in lista de procese active termenul "hlds". ceea ce este gasit, este printat in stdout.
grep -v grep = exclude din rezultate comanda grep (nu vrem sig failure, nu ?)
awk '{print $2}' = din rezultatele ramase preluam coloana numarul 2 in care se afla PID-urile programelor si le trimitem catre comanda "kill" care va inchide procesul cu acel PID.
Daca ai mai multe servere pe dedicatul ala, or sa fie inchise toate.
Momentan, drept "solutie din topor" poti sa folosesti:
Code: Select all
kill $(ps aux | grep -i hlds | grep -v grep | awk '{print $2}')
grep -i hlds = cauta in lista de procese active termenul "hlds". ceea ce este gasit, este printat in stdout.
grep -v grep = exclude din rezultate comanda grep (nu vrem sig failure, nu ?)
awk '{print $2}' = din rezultatele ramase preluam coloana numarul 2 in care se afla PID-urile programelor si le trimitem catre comanda "kill" care va inchide procesul cu acel PID.
Daca ai mai multe servere pe dedicatul ala, or sa fie inchise toate.
Last edited by vim on 14 Mar 2011, 08:05, edited 1 time in total.
I'm not antisocial, I'm just not user friendly.
⎯ retired
⎯ retired
-
- Information
-
Who is online
Users browsing this forum: duduanl, Google [Bot], lexz, Semrush [Bot] and 357 guests