Jump to content

Recommended Posts

Posted (edited)

FC2 Server::Monitor - Alpha v.0.10

- Extended leave for you and your Admins.

--------------------------------------------------------

 

Dear Admins, as we talked about in this thread - there's a possibility to automate your servers.

 

NEW VERSION - GUI implemented.

- Support for DCS and FC2

- More application support, early stages.

demo1.thumb.jpg.890b8bc6e3009bc70bfea61d9c425cdb.jpg

 

The project is "open source", since it will benefit us all if we keep on updating it.

 

So what do you need to automate your server?

 

1. ServMon Alpha 0.10

Note: Forgot to tell the obvious - doubleclick a Server in the list to EDIT it.

 

It will then keep running in the background, every <nn> seconds:

  • Checking for a frozen DCS/FC2 (ghosted)
  • Check for a specific error dialog.
  • If the Server-process is no longer running.

--------------------------------------------------------

Known issues / under construction:

- Some fields may not be saved in the "Edit server".

- Icons may not appear on Windows 2003 / XP.

- Server reboot, not completed.

- Autostartup of Servmon after a reboot.

- Misc application / server datafields to edit.

- Export of config. (Stored in Registry, HKEY_CURRENT_USER\Software\SerMon for now).

 

Thats all there is to it. Source code should be attached to later builds.

 

--------------------------------------------------------

 

Current Compatibility:

- Windows 7, English (Untested on other platforms)

- FC2 1.2.x

- DCS 1.0.x

 

Contributors:

- Please tell us a little bit what you did to the script, and why.

- Attach your version, I'll try to update the main post here with new versions.

 

Wanted:

- Other kinds of crashes, that hasn't been covered / detected by this version. There may be other types of crashes it cannot detect.

(Hint, use Au3Info_x64.exe or Au3Info.exe to spy on the CRASH-window)

1. Start the Au3Info, activate the window that Identify a crash.

2. Note the exact spelling (or take a screenshot) of the error.

3. Post it here, and wait as we add the exception to ServMon.

spy.jpg.0000d2ada01f1b051d360469ad84a90b.jpg

- More crash-titles / languages from other Windows localizations (German, Spanish etc).

- Crash dialogs / titles from other Windows editions (2003, XP, Vista etc).

 

Note: I'm making alot of comments in the script so you guys can study it and learn AutoIT scripting from it.

Use the AutoIT editor to edit the script.

DCS ServMon 0.10.zip

Edited by Panzertard

The mind is like a parachute. It only works when it's open | The important thing is not to stop questioning

Posted (edited)

Old version - Keeping it for a few days, to be deleted.

 

So what do you need to automate your server?

1. Download AutoIT - install AutoIT.

During install it ask if you want to EDIT or RUN scripts as the default action. Choose RUN.

2. Download the version of the script attached. Extract it on the desktop of your server. You will find an AU3 file.

You are now ready to run the FC2 Server Launcher.

Note: Together with AutoIT you get a SciteLite editor which you can use to edit and modify AU3 files.

--------------------------------------------------------

 

When you doubleclick the script it will:

  • Check in registry for FC2 and where it is installed.
    In case you have multiple installations, it uses your default install.
  • Find the first mission in the .\Missions\Multiplayer.
    Note, first in Windows Explorer may not be what AutoIT considers as first.
  • Start FC2 with the first mission available.

It will then keep running in the background, every 30 seconds:

  • Checking for a frozen FC2 (ghosted)
  • Check for a specific error dialog.
  • If the FC2-process is no longer running.

When it finds this it will wait another 30 seconds before concluding that your server froze/crashed/missing.

It will then ask you on screen "Server crashed - starts automaticly in 20 seconds".

If nobody presses "No", the server will start again with mission #1.

When you exit your server it will also ASK if you really meant to close it - right now it cannot determine if a silent crash to desktop happened, or if you closed the server on purpose.

So just answer "No" when you want to shut down the server.

--------------------------------------------------------

Thats all there is to it. Later editions will support DCS as well.

Note: I'm making alot of comments in the script so you guys can study it and learn AutoIT scripting from it.

Use the AutoIT editor to edit the script.

Current Compatability:

- Windows 7, English

- FC2 102.

Contributors:

- Please tell us a little bit what you did to the script, and why.

- Attach your version, I'll try to update the main post here with new versions.

Wanted:

- Other kinds of crashes, that hasnt been covered / detected by this version. There may be other types of crashes it cannot detect.

(Hint, use Au3Info_x64.exe or Au3Info.exe to spy on the CRASH-window)

- More crash-titles / languages from other Windows localizations (German, Spanish etc).

- Crash dialogs / titles from other Windows editions (2003, XP, Vista etc).

Later, when this script is more complete we should be able to create a standalone EXE version for easier usage.

Edited by Panzertard

The mind is like a parachute. It only works when it's open | The important thing is not to stop questioning

Posted

What can I say... :thumbup:

There are only 10 types of people in the world: Those who understand binary, and those who don't.

Posted (edited)

:cheer3nc::xmas::prop::juggle::punk::clap_2:

 

Edit: I get an error when run, "Can't open mission file". Is ServMan required?

My installation is to "D:\FC2Server" and its brand new :D

Edited by HiJack
Posted
OK it dont support space in filenames! Version 1.1? :)

v.0.02

- now supports files with spaces. Using a dirty trick and converting the names to 8.3 DOS standard since FC2 doesn't accept "quotes" in the launcher.

 

Note: I'm making alot of comments in the script so you guys can study it and learn from it if you wish to assist. Use the AutoIT editor to edit the script ;)

The mind is like a parachute. It only works when it's open | The important thing is not to stop questioning

Posted

Panzer you are incredible great :D

Reminder: Fighter pilots make movies. Bomber pilots make... HISTORY! :D | Also to be remembered: FRENCH TANKS HAVE ONE GEAR FORWARD AND FIVE BACKWARD :D

ಠ_ಠ



Posted

Going with filename 8.3 is not the way to go. It ruins the servers mission folder path. The command must be like this Panzer:

 

simulator.exe --net "server/./Missions/Multiplayer/My mission with spaces.miz"

 

 

(HJ)

  • Like 1
Posted (edited)
Going with filename 8.3 is not the way to go. It ruins the servers mission folder path. The command must be like this Panzer:

 

simulator.exe --net "server/./Missions/Multiplayer/My mission with spaces.miz"

 

 

(HJ)

Ah, thanks - that must have been the only variant I didnt test. Altough I dont understand what you meant by "ruin the path".

Still, good catch yet again ;)

Fixed in 0.03.

Edited by Panzertard

The mind is like a parachute. It only works when it's open | The important thing is not to stop questioning

Posted

Finally got a chance to test this...

Upon running the script I got this error

 

Unable to find any * .miz files in \Missions\Multiplayer

 

Do I have to do the command line addition to make it work?

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

No, it will try to look for missions in your default-install directory. If you have several instances of FC2 it may be looking in the wrong version - or not have the permissions to do it.

I havent made any "override" mechanisms for it yet.

 

It checks your registry:

HKEY_CURRENT_USER\Software\Eagle Dynamics\LockOn Flaming Cliffs 2\Path

to find the default install - and then it checks \Missions\Multiplayer inside that directory.

 

Is that your correct installpath?

The mind is like a parachute. It only works when it's open | The important thing is not to stop questioning

Posted

Wish for next version: The script detects that the server is already running when script starts. I changed my script to wait for 2 minutes before new cycle and when I started it again it tried to start a new instance.

 

(HJ)

Posted

What are the possibilities of having an auto restart of FC2? For example, every 12 hours, give in game message server will restart, restart FC2 completely, restart FC2 with first mission.

 

Running FC2 for too long can lead to a crash due to memeroy resources. This would be a nice automated assist.

 

Cheers

Posted

Yes that would be nice. On the Call of Duty servers I used to manage I had scripts that stoped the servers every night and at the same time zipped all logfiles to a file with the date. Then we had all the logs archived and could look back at event and chatlogs for a long time! I have not found my old scripts again and I have retired from the CoD life due to the fact that it's been taken ower by a console game. I don't have access to the game servers any longer I think but should have the scripts stored somewhere on my computer. Anyway; it's just to reproduce some similar feature but I've been so f* bussy flying on the 51st and 104th servers :D :D

 

(HJ)

Posted
What are the possibilities of having an auto restart of FC2? For example, every 12 hours, give in game message server will restart, restart FC2 completely, restart FC2 with first mission.

 

Running FC2 for too long can lead to a crash due to memeroy resources. This would be a nice automated assist.

 

Cheers

 

I second that! We usually restart our server once a day to avoid the above mentioned problems...

 

Breakshot_Sig_2.jpg

Tim "Breakshot" Mytrofanov | C.O. of 51 ПВО / 100 КИАП Regiments | twitch.tv/51breakshot

 

 

Posted (edited)
Using regedit.exe there was no "path" listed

 

just

Sorry, I have no fix for a missing registry key at the moment.

Maybe we could add some config files - or a dialog asking for your installation when this happens. Todo.

 

Meanwhile you can add the key yourself (it should have been there if the server was installed with the user you are launching it with).

- Start regedit

- Browse "HKEY_CURRENT_USER\Software\Eagle Dynamics"

- If "LockOn Flaming Cliffs 2" is missing on the left side, rightclick "Eagle Dynamics" and create a new Key "LockOn Flaming Cliffs 2"

Then rightclick "LockOn Flaming Cliffs 2" create a new key, "Path".

- In the "Path" folder, rightclick and create a new StringValue.

- Rename "New Value #1" -> "Path".

- Edit "Path" stringvalue to contain the path to your server-installation, f.ex: C:\Games\Eagle Dynamics\LockOn Flaming Cliffs 2

regedit-FC2-path.jpg.639840a0a96fea2385dd03bcf92c217f.jpg

Edited by Panzertard

The mind is like a parachute. It only works when it's open | The important thing is not to stop questioning

Posted (edited)

Server-restarts

Incidently Fudd and I was discussing this the other day.

I've considered doing this in the script - but then again it's quite easy to set up your windows server to reboot once a day, so I decided to drop coding this into the script for now.

But it's a valid request. Todo.

 

"Rebooting Windows" vs "Restarting the FC2-server"

Pros about "Rebooting Windows":

- Windows will be fresh, less chance of memory leaks occupying the memory space. As well as other problems will be handled (buggy firewalls, AV, or others).

- The procedure below will preapare you for server outage and automatic server startups.

Cons:

- Takes longer to reboot Windows, compare to just killing and starting FC2.

 

Miniguide how to set your server (Windows) for auto reboots.

... a reboot once a day/week is good for your server.

 

Prepare the Reboot-task

- Start menu, Administrative tools, Task Scheduler

- Add a new basic task, Daily.

- Select a time you wish for this to happen.

- Action "Start a program"

- Program: shutdown

- Arguments: /r /t 30

It should look something like this:

task-reboot-server.jpg.fda288b38a4926563ac1641e77e888fb.jpg

 

Add "server monitor" to startup

- Open startup from the start menu.

- Drag & Drop a shortcut from your "FC2-ServerLauncher.au3" into startup.

startup1.jpg.76994a9ff003b6001dc642ad2e4dd18f.jpg startup2.jpg.800ed846a1401da30406e850bb7a1a3b.jpg

 

Autologon

You must ensure your server logs on to the desktop after reboots.

Windows Home etc, (non Business editions) do this by default.

If you have no autologon you need to create one:

1. Launch the "Run" by pressing Win+R.

2. Type: control userpasswords2

3. Press Enter. The User Accounts window will display.

autologon1.jpg.0c6642034a046926ee161f96738faa12.jpg

4. Uncheck the checkmark in "Users must enter a user name and password to use this computer" and click "OK".

6. Enter the current password for the account and confirm it.

After doing so, you will no longer be prompted to enter your password upon login.

Edited by Panzertard

The mind is like a parachute. It only works when it's open | The important thing is not to stop questioning

  • 1 month later...
Posted

*bump* - new version almost ready, just need to compile and ZIP it.

The mind is like a parachute. It only works when it's open | The important thing is not to stop questioning

  • 2 weeks later...
Posted

You should really consider hosting this on Google Code or one of the many other open source management sites. I was actually going to start working on a server mod this weekend so I will take a look and possibly start contributing to this one. :)

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...