# Moogsoft Docs

## Moogfarmd Reference

Moogfarmd controls all other services in Moogsoft AIOps and manages which algorithms and Moolets are running.

## Services

We advise that you start Moogfarmd as a service. A service script is provided out of the box for the default Moogfarmd configuration and is located here:

/etc/init.d/moogfarmd

A backup Moogfarmd service script is located at  $MOOGSOFT_HOME/etc/service-wrappers/moogfarmd  . If using multiple instances of Moogfarmd on the same host, we advise that you copy and modify the default Moogfarmd service script for each Moogfarmd running on the host. ## Run the Moogfarmd Service Daemon Moogfarmd is a command line executable that can be run as a service daemon. To execute the daemon and view available arguments run: moog_farmd --help By default, you do not need either 'config' or 'instance'. If you run the system without configuring either of these, the moogfarmd instance loads the default configuration file for moogfarmd, and responds to farmd_ctrl with no instance specified. See High Availability for HA specific command line options. The  moog_farmd  command line executable accepts the following arguments: Option Input Description --clear_state - Clears any persisted state information associated with Moogfarmd on startup. --cluster <arg> String: <cluster name> Name of the High Availability (HA) cluster. Overwrites the value in the configuration file.  --config <arg>  String: <file path/name> Name and path of the configuration file specific to the running Moogfarmd instance. --group <arg> String: <group name> Name of the HA group. Overwrites the value in the configuration file. -h, --help - Displays all command line options. --instance <arg> String: <instance name> Enables you to name the Moogfarmd instance. You can refer to this name in the farmd_ctrl utility, which allows you to start, restart and reload the various Moolets.  --logconsole  - Instructs Moogfarmd to write logs to the console only.  --logfilename <arg>  String: <file path/name> Name and path of the Moogfarmd log file. -l, --loglevel <arg> INFO|WARN|ALL Specifies the debug level. Defaults to WARN, which is the recommended level in all production implementations. --mode <arg>  String: active/passive Starts the process in passive or active mode. The default is active.  --service_instance <arg>  String: <service suffix> Suffix for the service name. -v, --version - Displays the Moogfarmd version number. ## Configuration You can control Moogfarmd behavior through the following files: • system.conf: the general Moogsoft AIOps system configuration file is located in $MOOGSOFT_HOME/config/system.conf  . See System Configuration .
• moog_farmd.conf: configuration specific to Moogfarmd operation. If you run multiple instances of Moogfarmd, each needs it own configuration file. All instances of Moogfarmd which do not specify a different --config use the default configuration file located in  \$MOOGSOFT_HOME/config/moog_farmd.conf  .

Moogfarmd runs individual isolated applications called Moolets inside the Moogfarmd app container. Moolets are a parallel concept to servlets in a traditional enterprise application container such as Tomcat. Moogfarmd controls the flow of data through the Moolets where the data can come via the Message Bus or from other Moolets.