Changing System Settings

Clustering Settings

The system configuration page showing the clustering settings tab.

The system configuration page showing the clustering settings tab.

The clustering daemon controls how Cortex servers communicate with each other. There isn't much to set in order for clustering to run, and this should have been set during your initial setup, but you can change these fields at any time after installing.

 

Server Name Your server's name on the cluster. This is an arbitrary name and doesn't need to match the system hostname, although it helps.
Server Location Where this server is located. Again this is arbitrary and can be anything you want, but if you have multiple servers in many locations it will be quite helpful to identify them by where they are located.

Click the save button to commit your changes. Changes happen on the fly, and you do not need to restart the clustering daemon after saving.

 

The High Resolution Timer

Servers running Microsoft Windows have the option to enable use of the Windows high resolution timer within the clustering daemon. The high resolution timer is a piece of the Windows OS that handles high performance I/O from multimedia applications such as Windows Media Player and the Macromedia Flash Player. Game servers based on the Half-Life and Source engines also utilize the high resolution timer. Enabling the high resolution timer can give you up to a 500% increase in game server performance at the expense of overall CPU usage. Enable this if you run a small handful of Half-Life or Source based games. If you do not run hlds or srcds servers or host a large amount of games in a mixed environment it's best to leave this disabled.

 

Network Settings

The system configuration page showing the network settings tab.

The system configuration page showing the network settings tab.

Cortex gives you rudimentary control over your server's network settings.

 

Setting the Hostname

Your server identifies itself internally and on its local network by it's hostname. Cortex lets you change the system hostname at your leisure. This is the equivalent of editing the necessary lines of /etc/sysconfig/network file in RedHat Linux or by changing the computer name in Microsoft Windows. Fill out the form with the following information:

 

Hostname Your server's hostname. This defaults to the name chosen when ordering the server.

Click the save icon to save your system hostname. If your server runs the Microsoft Windows operating system then you must reboot it for the change to take effect.

 

IP Addressing

In the middle of the Network Settings tab is a list of IP addresses currently bound to the system and in use by Cortex. If you order more IP addresses from Insomnia365 or your reseller you can add them one by one on this form. You may also delete unused IP addresses as well, though it's recommended you don't remove IPs unless there is a compelling and necessary reason to do so.

IP addresses and their subnet masks must be added to the system in dotted quad format (aa.bb.cc.dd). Cortex will return an error message if it detects an invalid IP address. Adding new IP addresses inserts the IP into the Cortex backend database and binds the new address to your server's network interface and restarts your server's networking stack. You may see a few seconds of lost connectivity when adding new IP addresses to the system.

 

In order to prevent the administrator from harming the system Cortex will not let you delete the first IP address assigned to your network interface. Please contact Insomnia365 if you need this address changed or removed.

 

System Monitoring

If your server has more than one network interface you may need to select one to use to monitor instance network usage. Network usage is calculated on these interfaces to display on your instance's history graphs. Click the Enabled checkbox next to the interfaces you want to monitor on and click the Save button to enable monitoring on a network interface.

If you recently added, removed, or changed network interfaces in your server you will need to update Cortex with the changes. Click the button next to Check for network changes to update your interface list.

 

DNS Resolvers

Though not essential for game server operation working DNS servers in your server's network configuration can ease overall system operation. These DNS addresses are what your server use for local name resolution. They default to The Planet's addresses, but you can change them to whatever you like. Note that entering invalid DNS server addresses can cause unexpected system problems, so be sure you're adding the right addresses before hitting the add button.

 

As with adding IP addresses, changing DNS servers requires that Cortex restarts your server's networking stack. You may see a few seconds of network loss to the server after changing DNS addresses.

Email Settings

The system configuration page showing the email settings tab.

The system configuration page showing the email settings tab.

Cortex has the ability to notify you and your users via email when certain events are triggered by you, your users, or the game instances running on your system. The Email Settings tab of the System Configuration page is where you can customize these emails. These settings apply to the local server only and are not sent accross your cluster. There is a dropdown box in the top-right hand corner of this window for you to change email settings on a remote server.

 

General Settings

This form applies to all email that Cortex sends when an event is triggered:

 

From: The email address that all Cortex event messages are sent from. You must set this when you first use Cortex. Note that error messages may display in Cortex when events are triggered and an invalid From address is given.
Reply-To: Optional: An address to use when users reply to Cortex generated messages.
Cc: Optional: Who to carbon copy the event mail in every Cortex generated message. This must be a properly formatted email address.
Bcc: Optional:Who to blind carbon copy the event mail in every Cortex generated message. This must be a properly formatted email address.
Signature Optional: A bit of text appended to the bottom of every message sent by Cortex.
Enabled If unchecked, then Cortex will not send any email when an event is triggered. Uncheck this if you want to disable event messaging.

Click the save icon to save these settings.

 

Message Templates

Message templates are the text of the email messages along with the intended recipients to send to when an event triggers. Cortex comes with a number of templates by default which you are unable to edit, but you can add your own to get your custom templates going. Select any template in the select template to load it into the edit templates form or select "Add new template" to create a new template. The page reloads with the following form:

 

Name The name of the template. You'll use this name when you select your template for an event.
Subject The subject of the email sent when messages using this template are sent.
Contents The body of the email sent when messages using this template are sent.

Click the save icon to add or save your template into Cortex.

 

Events

Once your templates are created you need to assign them to events. Events are actions triggered when Cortex performs a function, such as updating an engine or adding a new user. When an event is triggered Cortex sends an email to the addresses specified in the event with the text of the template selected for the event, and if applicable creates a log event for the instance the event applies to. Cortex generates events for the following actions:

 

  • When a new user is created.
  • When a user's information is edited by the admin.
  • When a user is deleted.
  • When an instance is created.
  • When an instance is activated.
  • When an instance is deactivated.
  • When an instance is deleted.
  • When an instance is started.
  • When an instance is stopped.
  • When an instance crashes or shuts down unexpectedly. This is handled by the script that restarts game instances after they crash.
  • When an engine is updated.
  • When the system is rebooted by the reboot function.

Select an event to configure in the Events drop down field on the events form to load that event into the configuration page. The event form has the following options:

 

Events The event you're configuring.
Template The template to use when sending email for this event.
To: Who to send the event mail to. This must be a properly formatted email address.
Cc: Optional: Who to carbon copy the event mail to. This must be a properly formatted email address.
Bcc: Optional:Who to blind carbon copy the event mail to. This must be a properly formatted email address.
Enabled Check this to enable the event. If the event is disabled then no email message nor Instance log will be generated when this event is triggered.
Message wait time In order to prevent Cortex from flooding you and your users' inboxes with event messages you can limit the amount of time that must pass before two event emails are sent. This value defaults to 5 minutes for each event.

Click the save icon to save your event changes in Cortex.

 

Template and Event Objects

Templates and events employ a special syntax to help you customize an event email to specific users, engines, instances, and much more. Enter the following text into your template subject, template body or event To:, Cc:, or Bcc: fields and cortex will replace them with their corresponding equivalents. The following objects are specific to message templates:

 

  • {USER_NAME}: The username of the user affected by the event. This refers to the instance owner if the event is instance related.
  • {USER_EMAIL}: The email address of the user affected by the event. This refers to the instance owner if the event is instance related.
  • {USER_FNAME}: The first name of the user affected by the event. This refers to the instance owner if the event is instance related.
  • {USER_LNAME}: The last name of the user affected by the event. This refers to the instance owner if the event is instance related.
  • {USER_PASSWORD}: The password of the user affected by the event. This sends a user password in plain text via email, which is inherently very insecure. Know these risks when emailing a user their password.
  • {ADMIN_EMAIL}: The email address of the admin user.
  • {INSTANCE_NAME}: The name of the affected instance, if applicable.
  • {INSTANCE_IP}: The IP address of the affected instance, if applicable.
  • {INSTANCE_PORT}: The port the affected instance is bound to, if applicable.
  • {SERVER_IP}: The primary IP address of your Cortex server.
  • {DATE_Ymd}: The current date and time. The text "Ymd" in this object can be replaced with any string that works with the PHP date() function's format parameter.

The following objects relate to events. Note that they pertain to who an event gets emailed to:

 

  • {USER_EMAIL}: The email address of the user affected by the event. This refers to the instance owner if the event is instance related.
  • {ADMIN_EMAIL}: The email address of the admin user.
  • {ALL_USERS}: All Cortex users on the local system. This does not email all users on the cluster.
  • {AFFECTED_USERS}: All users affected by an event,
  • {SERVER_ADMINS}: The addresses of all users on the system with admin level accounts.

 

Disk Settings

The system configuration page showing the disk settings tab.

The system configuration page showing the disk settings tab.

Cortex lets you install game instances on any of your server's hard drives or disk partitions. By default only the primary drive is set up in Cortex. To allow Cortex to install game servers onto your other drives fill out the form on Disk Settings tab of the System Configuration page.

 

Label The name of the drive as reported to the Operating System, for example "C:", "D:", or "/".
Utilization The amount of space in use on the disk followed by the total space on the disk and disk usage percentage.
Name A name to assign to the disk in Cortex. This will make it easier to determine which disk is which when adding instances to the system.
Path The path on the disk to install instances on. Instances are installed to the instances/username/instrance directory on the disk. For example, if drive D: is set up on the system and has the path "cortex" then instances on D: will be installed to D:\cortex\instances\username\instancename.
Enabled If checked then Cortex will allow you to install game instances on this drive or partition. Leave this unchecked for partitions like /boot and /tmp.

Click the save icon to save your drive changes. If you have added a new drive or changed drive letters or mountpoints on your hard drives click the button next to Check for disk changes to have Cortex resync it's database with your current drive structure.

 

Rebooting the System

The system configuration page showing the restart tab.

The system configuration page showing the restart tab.

A reboot can be beneficial when you've exhausted all of your options when troubleshooting a server issue. The reboot function in Cortex will reboot the system one minute after you click the reboot button. The server may take a few minutes to shut down and boot, and Cortex and your game instances will be inaccessible while it is down. Remember that Cortex will auto restart your running game servers when it comes back up, so you don't need to restart every instance on the system.