Distinguishing server consoles

  • Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

jhrzhzhzh

FNG / Fresh Meat
Aug 29, 2012
37
0
0
Hey

I'm currently running 4 servers and my RDP looks like this right now:

noQAPHr.png


I have a batch script for starting each server, but no way of knowing which console belongs to which server. This is a problem e.g. when i want to restart a specific server.

Is there any way to set the title of the console window to reflect the server number/name?
 

shaitan

Member
Jun 27, 2013
82
0
6
That's what I am trying to figure out as well atm, this old one doesn't work for it.
title Rencorner KF2 #4
 

Isotonic

FNG / Fresh Meat
Feb 12, 2012
65
0
0
That looks really nice, I'll have to use this myself sometime. Thanks for the link.
 

GoldenGlovez

FNG / Fresh Meat
Jun 2, 2011
35
0
0
On the Move
how do you open bat files with conemu?

While you can execute a BAT with ConEmu, this is the way I do it.

1) Create a 'Task' in ConEmu
2) In task parameters I put the path to KFServer.exe e.g
Code:
/dir "C:\steamcmd\kf2server\Binaries\Win64"
3) Call KFServer.exe directly for each server instance e.g
Code:
kfserver.exe kf-bioticslab -port=7760 -configsubdir=Normal-Long1 -PREFERPROCESSOR=0 -new_console:t:"Normal | Long | #1"

kfserver.exe kf-bioticslab -port=7765 -configsubdir=Normal-Long2 -PREFERPROCESSOR=1 -new_console:t:"Normal | Long | #2"

kfserver.exe kf-bioticslab -port=7770 -configsubdir=Normal-Long3 -PREFERPROCESSOR=2 -new_console:t:"Normal | Long | #3"

kfserver.exe kf-bioticslab -port=7775 -configsubdir=Hard-Long1 -PREFERPROCESSOR=3 -new_console:t:"Hard | Long | #1"

kfserver.exe kf-bioticslab -port=7780 -configsubdir=Hard-Long2 -PREFERPROCESSOR=0 -new_console:t:"Hard | Long | #2"

kfserver.exe kf-bioticslab -port=7785 -configsubdir=Hard-Long3 -PREFERPROCESSOR=1 -new_console:t:"Hard | Long | #3"

kfserver.exe kf-bioticslab -port=7790 -configsubdir=Suicidal-Long1 -PREFERPROCESSOR=2 -new_console:t:"Suicidal | Long | #1"

kfserver.exe kf-bioticslab -port=7795 -configsubdir=Suicidal-Long2 -PREFERPROCESSOR=3 -new_console:t:"Suicidal | Long | #2"

kfserver.exe kf-bioticslab -port=7800 -configsubdir=Suicidal-Long3 -PREFERPROCESSOR=0 -new_console:t:"Suicidal | Long | #3"

This one task will execute ALL servers. You can then create individual tasks for each server, so if you need to reset just one you can do so.

It will also automatically bind each server instance into ConEmu's window (with a BAT script it'll open an external window which you have to manually bind)
 
Last edited:

Amoutsukasa

FNG / Fresh Meat
Jan 3, 2012
58
0
0
Hey Golden I did that but only one of my server shows up on server list, even in my lan is there a fix for that? I mean all the ports are open and different.
 

Harryhy

FNG / Fresh Meat
May 17, 2011
48
0
0
Hey Golden I did that but only one of my server shows up on server list, even in my lan is there a fix for that? I mean all the ports are open and different.
I had this same issue. Run a steamcmd validate on your folder. Fixed it then for me, maybe for you as well? Make sure afterwards that you configure in the config subdirectories for each game.

PS: I did it using "start .\Binaries\win64\kfserver", rather than running directly from kfserver.exe's folder, and just used the configsubdir instead of doing -port. Shouldn't matter though.
 
Last edited:

Amoutsukasa

FNG / Fresh Meat
Jan 3, 2012
58
0
0
Thanks Harryhy, tried it. Even reinstalled fresh still only showing the first server.
*Basically anything using configsubdir doesn't show up. I mean I guess I can make multi folders since I do have the space but kinda sucks =D
 
Last edited:

Harryhy

FNG / Fresh Meat
May 17, 2011
48
0
0
Thanks Harryhy, tried it. Even reinstalled fresh still only showing the first server.
*Basically anything using configsubdir doesn't show up. I mean I guess I can make multi folders since I do have the space but kinda sucks =D
Also sucks for disc caching, if you run more than a couple servers it will be more intensive on your disc I/O I have seen.

I had the similar problem regardless a few days ago, couldn't make sense of it, so I continued to use my separate install dirs. But now I tried again using same configs after forcing the validate cmd, and then it worked. Pretty weird, shame it doesn't work for you. This is what I am using for reference:
Code:
start .\Binaries\win64\kfserver kf-outpost -configsubdir=kf1 -PREFERREDPROCESSOR=0 -new_console:t:"N #1"

start .\Binaries\win64\kfserver kf-outpost -configsubdir=kf2 -PREFERREDPROCESSOR=1 -new_console:t:"N #2"
etc, with everything configured in the actual config directory for each config subdirectory. Only the first 3 will show up on Steam, but all the rest people still see on server browser ingame so it's okay.
 

Amoutsukasa

FNG / Fresh Meat
Jan 3, 2012
58
0
0
Also sucks for disc caching, if you run more than a couple servers it will be more intensive on your disc I/O I have seen.

I had the similar problem regardless a few days ago, couldn't make sense of it, so I continued to use my separate install dirs. But now I tried again using same configs after forcing the validate cmd, and then it worked. Pretty weird, shame it doesn't work for you. This is what I am using for reference:
Code:
start .\Binaries\win64\kfserver kf-outpost -configsubdir=kf1 -PREFERREDPROCESSOR=0 -new_console:t:"N #1"

start .\Binaries\win64\kfserver kf-outpost -configsubdir=kf2 -PREFERREDPROCESSOR=1 -new_console:t:"N #2"
etc, with everything configured in the actual config directory for each config subdirectory. Only the first 3 will show up on Steam, but all the rest people still see on server browser ingame so it's okay.

Yeah no go. Does it matter where the directory of the whole kfserver is? Does it need to be in the steamcmd?
 

Harryhy

FNG / Fresh Meat
May 17, 2011
48
0
0
Yeah no go. Does it matter where the directory of the whole kfserver is? Does it need to be in the steamcmd?
Have steamcmd.exe in C:\KFServer\.
Open cmd and cd to there.
Run "steamcmd +login anonymous +force_install_dir ./kf2 +app_update 232130 validate", typing exit once it finishes.
Now cd to that kf2 folder that just downloaded.
Run those start commands in earlier post once, starting servers, ensuring configsubdir is a unique name for each instance.
Quit those KF servers once they fully loaded.
Now edit the configs in kf2\KFGame\Config\CONFIGSUBDIR -- being what you specified before when launching.

In configs:
1. Change the ListenPort in KFWeb.ini
2. Set port and peerport in PCServer-KFEngine.ini -- peerport should be one higher than port, so if port is 7777 on one server, peerport being 7778. Keep this in mind, since ports must be unique of course.
3. Add AdminPassword to PCServer-KFGame.ini

Rest is easy on web admin.
Then run the starting KF2 commands in earlier post one more time, and everything should run fine. If you run "netstat -nba" as admin, you should see the KF server bound to port 808x for webadmin, 777x for port, and 2056x and 2701x set automatically.

If it doesn't work doing exactly this then no idea :(((
 

RedBeanPaste

FNG / Fresh Meat
Feb 3, 2014
21
0
0
While you can execute a BAT with ConEmu, this is the way I do it.

1) Create a 'Task' in ConEmu
2) In task parameters I put the path to KFServer.exe e.g
Code:
/dir "C:\steamcmd\kf2server\Binaries\Win64"
3) Call KFServer.exe directly for each server instance e.g
Code:
kfserver.exe kf-bioticslab -port=7760 -configsubdir=Normal-Long1 -PREFERPROCESSOR=0 -new_console:t:"Normal | Long | #1"

kfserver.exe kf-bioticslab -port=7765 -configsubdir=Normal-Long2 -PREFERPROCESSOR=1 -new_console:t:"Normal | Long | #2"

kfserver.exe kf-bioticslab -port=7770 -configsubdir=Normal-Long3 -PREFERPROCESSOR=2 -new_console:t:"Normal | Long | #3"

kfserver.exe kf-bioticslab -port=7775 -configsubdir=Hard-Long1 -PREFERPROCESSOR=3 -new_console:t:"Hard | Long | #1"

kfserver.exe kf-bioticslab -port=7780 -configsubdir=Hard-Long2 -PREFERPROCESSOR=0 -new_console:t:"Hard | Long | #2"

kfserver.exe kf-bioticslab -port=7785 -configsubdir=Hard-Long3 -PREFERPROCESSOR=1 -new_console:t:"Hard | Long | #3"

kfserver.exe kf-bioticslab -port=7790 -configsubdir=Suicidal-Long1 -PREFERPROCESSOR=2 -new_console:t:"Suicidal | Long | #1"

kfserver.exe kf-bioticslab -port=7795 -configsubdir=Suicidal-Long2 -PREFERPROCESSOR=3 -new_console:t:"Suicidal | Long | #2"

kfserver.exe kf-bioticslab -port=7800 -configsubdir=Suicidal-Long3 -PREFERPROCESSOR=0 -new_console:t:"Suicidal | Long | #3"

This one task will execute ALL servers. You can then create individual tasks for each server, so if you need to reset just one you can do so.

It will also automatically bind each server instance into ConEmu's window (with a BAT script it'll open an external window which you have to manually bind)

How do we get this to work with the auto-restart scripts that open another cmd window for the server?
 
Last edited:

Amoutsukasa

FNG / Fresh Meat
Jan 3, 2012
58
0
0
*facepalm* Figured it out, brother helped out. It was because I forgot to forward the steam ports.