Скрипт запуска HLDS, Помогите запустить данный скрипт с привязкой к ядру. |
Здравствуйте, гость Вход | Регистрация
Наши новости:
|
|
|
Скрипт запуска HLDS, Помогите запустить данный скрипт с привязкой к ядру. |
Vitalijkee
|
3.10.2015, 11:29
Сообщение
|
|
|
Тебе сюда!! вот етот скрипт я использовал его както там есть привязка по ядрам указуешь 0-ето первое ядро 1- ето второе и так дальше!
Вобщем там все написано! |
|
|
|
kat5566
|
3.10.2015, 12:01
Сообщение
|
|
|
Тебе сюда!! вот етот скрипт я использовал его както там есть привязка по ядрам указуешь 0-ето первое ядро 1- ето второе и так дальше! Вобщем там все написано! Спасибо конечно, но мне он не подходит. У меня несколько серверов, перепробовал кучу разных, у каждого скрипта есть своя загвоздка (То скрин сесия отваливается, то рестарт не проходит, вообщем с каждым скриптом какая-то беда.) Я остановился на этом скрипте потому-что там всё чётко работает даже если у тебя 5 и более серверов HLDS. Но увы привязки по ядру я так и не нашёл... ребят помогите кто шарит в bash |
|
|
|
user.gameover.user
|
3.10.2015, 12:09
Сообщение
|
|
|
Попробуй так
Код executable="taskset -c номер ядра ./hlds_run"
|
|
|
|
kat5566
|
3.10.2015, 12:15
Сообщение
|
|
|
Попробуй так Код executable="taskset -c номер ядра ./hlds_run" Это в скрипте, в строку запуска я так понимаю? Или как то так? (Выделил красным) #!/bin/bash # Counter Strike # Server Management Script # Author: Daniel Gibbs # Website: http://gameservermanagers.com version="040715" #### Variables #### # Notification Email # (on|off) emailnotification="on" email="" # Steam login steamuser="anonymous" steampass="" # Start Variables defaultmap="cs_mansion" maxplayers="23" port="27015" clientport="27005" ip="0.0.0.0" updateonstart="off" executable="taskset -c номер ядра ./hlds_run" # https://developer.valvesoftware.com/wiki/Co...ne_parameters_2 fn_parms(){ parms="-game cstrike -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers} +sys_ticrate 1000 -pingboost 3" } #### Advanced Variables #### # Steam appid="90" appidmod="cstrike" # Server Details servicename="classic" gamename="server_classic" engine="goldsource" # Directories rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" selfname="$(basename $0)" lockselfname=".${servicename}.lock" filesdir="${rootdir}/serverfiles" systemdir="${filesdir}/cstrike" executabledir="${filesdir}" executable="./hlds_run" servercfg="${servicename}.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" servercfgdefault="${servercfgdir}/server.cfg" backupdir="${rootdir}/backups" # Logging logdays="30" gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" ##### Script ##### # Do not edit fn_runfunction(){ # Functions are downloaded and run with this function if [ ! -f "${rootdir}/functions/${functionfile}" ]; then cd "${rootdir}" if [ ! -d "functions" ]; then mkdir functions fi cd functions echo -e " loading ${functionfile}...\c" wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/...;{functionfile} 2>&1 | grep -F HTTP | cut -c45- chmod +x "${functionfile}" cd "${rootdir}" fi source "${rootdir}/functions/${functionfile}" } fn_functions(){ # Functions are defined in fn_functions. functionfile="${FUNCNAME}" fn_runfunction } fn_functions getopt=$1 fn_getopt
Отредактировал: kat5566, - 3.10.2015, 12:16
|
|
|
|
user.gameover.user
|
3.10.2015, 12:35
Сообщение
|
|
|
Это в скрипте, в строку запуска я так понимаю? Или как то так? (Выделил красным) #!/bin/bash # Counter Strike # Server Management Script # Author: Daniel Gibbs # Website: http://gameservermanagers.com version="040715" #### Variables #### # Notification Email # (on|off) emailnotification="on" email="" # Steam login steamuser="anonymous" steampass="" # Start Variables defaultmap="cs_mansion" maxplayers="23" port="27015" clientport="27005" ip="0.0.0.0" updateonstart="off" executable="taskset -c номер ядра ./hlds_run" # https://developer.valvesoftware.com/wiki/Co...ne_parameters_2 fn_parms(){ parms="-game cstrike -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers} +sys_ticrate 1000 -pingboost 3" } #### Advanced Variables #### # Steam appid="90" appidmod="cstrike" # Server Details servicename="classic" gamename="server_classic" engine="goldsource" # Directories rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" selfname="$(basename $0)" lockselfname=".${servicename}.lock" filesdir="${rootdir}/serverfiles" systemdir="${filesdir}/cstrike" executabledir="${filesdir}" executable="./hlds_run" servercfg="${servicename}.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" servercfgdefault="${servercfgdir}/server.cfg" backupdir="${rootdir}/backups" # Logging logdays="30" gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" ##### Script ##### # Do not edit fn_runfunction(){ # Functions are downloaded and run with this function if [ ! -f "${rootdir}/functions/${functionfile}" ]; then cd "${rootdir}" if [ ! -d "functions" ]; then mkdir functions fi cd functions echo -e " loading ${functionfile}...\c" wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/...;{functionfile} 2>&1 | grep -F HTTP | cut -c45- chmod +x "${functionfile}" cd "${rootdir}" fi source "${rootdir}/functions/${functionfile}" } fn_functions(){ # Functions are defined in fn_functions. functionfile="${FUNCNAME}" fn_runfunction } fn_functions getopt=$1 fn_getopt ненужно добавлять новую строку а найди существующую строку с hlds_run и отредактируй раздел в конфиге # Directories и не taskset -c номер ядра ,а taskset -c номер ядра цыфрой ,например taskset -c 0
Отредактировал: user.gameover.user, - 3.10.2015, 12:36
|
Поблагодарили 1 раз
|
|
kat5566
|
3.10.2015, 14:15
Сообщение
|
|
|
|
|
|
|
Bloo
|
3.10.2015, 17:07
Сообщение
|
![]() |
Код executable="taskset -c 1 ./hlds_run"
|
Поблагодарили 1 раз
|
|
Bloo
|
3.10.2015, 18:06
Сообщение
|
![]() |
|
|
|
|
death_error
|
3.10.2015, 19:26
Сообщение
|
|
|
Проверил сейчас на ботах, работает.
|
Поблагодарили 1 раз
|
|
kat5566
|
4.10.2015, 7:07
Сообщение
|
|
|
|
|
|
|
![]() ![]() |