Blog

Friday, December 09, 2011

Error Popups Prevent My Server/application from Restarting

If your server or application fails to restart when a error popup displays then the following fix will solve the problem. Go to http://msdn.microsoft.com/en-us/windowsembedded/standard/aa731206.aspx and follow the instructions there for the registry modification of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Windows\ErrorMode After you change the registry key, you will need to restart the computer for the changes to take effect. Note: Be extremely careful with the registry as incorrect changes can break Windows.

For low-level filtering out visible notification of various errors use registry entry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Windows\ErrorMode. ErrorMode value descriptions: 0 - All messages are visible (default value). 1 - Only system messages are invisible. An example of this type of message is: "Virtual Memory Minimum Too Low." 2 - All messages are invisible. An example of this type of message is: "Unable to Locate Component" shown when application can't load DLL statically linked to it.

You should use the last setting (2) for the registry tweak. The first registry key will fix the error (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Windows\ErrorMode). The registry file contains the following:

Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Windows] "ErrorMode"=dword:00000002
Sunday, December 04, 2011

How to Restart a Session in service

Services in FireDaemon Pro can be restarted in session. This means that you can see your service on your desktop without switching to session 0. This can be useful if you have an application that you want to see running for test purposes.

FireDaemon Pro - Restart In Session

Friday, December 02, 2011

Restarting an application every few second/minutes

Restarting an application every few seconds/minutes can be done with the scheduling tab and the user defined interval setting. This is especially useful if you have an application that you want restarting every few seconds/minutes. On the Scheduling Tab, Select "User Defined" from the dropdown list of "Schedule a Restart" (its at the bottom). Then enter the amount of seconds for the restart.

FireDaemon User Defined Scheduling

Saturday, November 26, 2011

How to Skin or Theme FireDaemon Pro

FireDaemon Pro can be skinned/themed. You can replace the command line, splash screen, title bar and About box product name, FireDaemon and non-FireDaemon icons in main GUI service list, splash screen product name & icon and all button icons. Theme modifications are done through an XML file and all images must be in .ICO format. Detailed information on this process can be found in the manual.

Saturday, November 19, 2011

How to Configure Pre/Post-Service

The Pre-Service and Post-Service tab allows applications to be run during service startup and service shutdown. Pre-service and post-service programs are always run during service start-ups, controlled shutdowns, and intentional restarts.

- From the FireDaemon Pro manual. A good example where this would be useful is the following: You have a web server like Apache and PHP installed. If PHP shuts down while Apache is running, anyone can see the contents of your PHP files (they can even see your mysql username/password in config files). To prevent this from happening, you would set PHP as a Post-Service program of Apache. That way when Apache is started/restarted, it automatically starts PHP for you.

 

Friday, November 18, 2011

How to configure Dependencies

Service Dependencies allow services to be started (and stopped) in order. They specify which services or load order groups must be running on the machine before this service can run. For example, if the service FDSvc depends on the pre-requisite service Pre, then Windows will always start Pre before FDSvc during a machine boot-up. Similarly, if both Pre and FDSvc are stopped, then manually starting FDSvc will firstly cause Pre to be automatically started. Similarly, stopping Pre manually will force FDSvc to stop. Interestingly, services dependencies are not used during machine shutdown.

- From the FireDaemon Pro manual. For instance, let's say you have a service that depends on TCP/IP and you only want your service to start after the TCP/IP service has started. To do this, you would select "LanmanWorkstation / Workstation" from the service dependencies tab.

FireDaemon Service Dependencies 

Sunday, November 13, 2011

How to bind a process to one or more CPU's

CPU Bindings is a useful feature of FireDaemon. It allows you to bind a process to one or more CPU's or Cores. This can be very useful when you have a very load intensive application and you dont want your whole computer to freeze up while its running. To access it, go to the Advanced tab of your service definition and at the bottom, from the dropdown list; select the CPU's you want to bind to.

FireDaemon Pro: CPU Bindings You can find out more information on how to bind a process to one or more CPU's here on our Manual.

Friday, November 11, 2011

How to clone or clone hot services

FireDaemon Pro has the ability to clone and hot clone services. This is a very useful feature especially when you have lots of services you need to configure and you dont want to manually re-enter all the information. To clone and edit a service, right click the service and select "Clone" from the context menu. A new window will appear with a copy of your service that you can edit. To clone a service and have it run right away, right click the service and select "Clone Hot" from the context menu. The service will be immediately cloned and started.

FireDaemon Clone / Clone Hot

Sunday, November 06, 2011

Monitor SRCDS: Restart when it uses excess system resources and alert me

SRCDS when left running for extended periods of time will use more and more system resources, this is especially true for very poorly coded mods or when you have lots of plugins loaded. When this happens, your SRCDS server will start to lag really bad and your entire server computer will slow to a crawl. Daemon can solve this by monitoring and restarting SRCDS before it reaches these danger levels.

Reconfiguring the FireDaemon SRCDS Service

First you need to configure your SRCDS service to shutdown firedaemon if it crashes. The "Upon Program Exit" option in the "Settings" tab should set to: "Disabled" or "Shutdown FireDaemon".

FireDaemon Settings

Install and Configure daeMON

1. Download and install FireDaemon.

2. Download daeMON and unzip it into the directory of your choice (eg. C:\Program Files\daeMON).

3. Make a note of the short name of the SRCDS service you want to monitor (eg. srcds).

4. Start the FireDaemon Service Manager from the Start/Programs menu or desktop icon. Click on the Create A New Service Definition button in the Toolbar or press Ctrl+N. Fill out the panel as per the screen shot below (adjust your paths and parameters to suite) - you can use the TAB or SHIFT+TAB keys to move between fields:

Daemon Program Tab

The working directory is where you have placed the daeMON Perl script. Note the Parameters list. This is the list of services (in startup order) that you want to monitor. Each service short name is prefixed with a -s. If you want to change the monitoring facility frequency use the -f flag. The following settings are good in most cases: High CPU load threshold (as a percentage): 75 High memory threshold (in MB): 1024 Monitoring frequency (in seconds): 60 Ignore high CPU/Memory for X monitored intervals (in minutes): 5 [Look in readme.txt included with Daemon for more flags and descriptions]

5. You should really change the desktop interaction flag as it's not necessary to see what's going on (but you can leave it on if you are curious):

Daemon Settings Tab

6. If you want to capture the debug log output of the utility then you can enable it as per the Output Capture section in the screenshot below. If your services take quite a while to initialise then you can set the Pre-Launch delay (in the Process section). This will defer the startup of daeMON by the number of milliseconds you specify (5000 = 5s).

Daemon Advanced Tab

7. Alternately, you can make the daeMON dependent on the services it is monitoring. For example:

Daemon Dependencies Tab

8. Then click the Install button and daeMON should be installed and monitoring your group of services. Should you accidently shutdown a service or a process dies, then all the services that you specified in the Parameters list will be restarted. If you want to monitor multiple SRCDS servers, then you should create a new daeMON for each service rather than add another -s flag. The reason you should do this is because daeMON will restart every server if just one of them uses too much resources. Setting up a seperate daeMON for each SRCDS server will prevent this from happening. Don't worry about the CPU/Ram usage for having lots of daeMON services; one daeMON uses around 4MB of Ram and under 1% CPU. To find out how to receive email alerts when SRCDS restarts go here.

Saturday, November 05, 2011

Monitor MySQL: Restart when it uses excess system resources and alert me

MySQL when left running for extended periods of time can use more and more system resources, this is especially true for very busy websites where the usage can become so extreme that all the ram is used and cpu usage hits 100%. When this happens, your website will fail to load and your entire server will lock up. daeMON can solve this by monitoring and restarting MySQL before it reaches these danger levels.

Reconfiguring the FireDaemon MySQL Service

First you need to configure your MySQL service to shutdown firedaemon if it crashes. The "Upon Program Exit" option in the "Settings" tab should set to: "Disabled" or "Shutdown FireDaemon".

FireDaemon Settings

Install and Configure daeMON

1. Download and install FireDaemon.

2. Download daeMON and unzip it into the directory of your choice (eg. C:\Program Files\daeMON).

3. Make a note of the short name of the MySQL service you want to monitor (eg. mysql).

4. Start the FireDaemon Service Manager from the Start/Programs menu or desktop icon. Click on the Create A New Service Definition button in the Toolbar or press Ctrl+N. Fill out the panel as per the screen shot below (adjust your paths and parameters to suite) - you can use the TAB or SHIFT+TAB keys to move between fields:

Daemon Program Tab

The working directory is where you have placed the daeMON Perl script. Note the Parameters list. This is the list of services (in startup order) that you want to monitor. Each service short name is prefixed with a -s. If you want to change the monitoring facility frequency use the -f flag. The following settings are good in most cases: High CPU load threshold (as a percentage): 75 High memory threshold (in MB): 1024 Monitoring frequency (in seconds): 60 Ignore high CPU/Memory for X monitored intervals (in minutes): 5 [Look in readme.txt included with Daemon for more flags and descriptions]

5. You should really change the desktop interaction flag as it's not necessary to see what's going on (but you can leave it on if you are curious):

Daemon Settings Tab

6. If you want to capture the debug log output of the utility then you can enable it as per the Output Capture section in the screenshot below. If your services take quite a while to initialise then you can set the Pre-Launch delay (in the Process section). This will defer the startup of daeMON by the number of milliseconds you specify (5000 = 5s).

Daemon Advanced Tab

7. Alternately, you can make the daeMON dependent on the services it is monitoring. For example:

Daemon Dependencies Tab

8. Then click the Install button and daeMON should be installed and monitoring your group of services. Should you accidently shutdown a service or a process dies, then all the services that you specified in the Parameters list will be restarted. To find out how to receive email alerts when MySQL restarts go here.


Recent Posts



Tags


Archive

    Sign up for Product Updates and Discounts
    Captcha Image
    ×