# eva_sup

### MODULE

eva_sup

### MODULE SUMMARY

A Supervisor for the EVA Application

### DESCRIPTION

This module provides a supervisor for the entire EVA application. An application can use this supervisor, or write its own, using the `start_link` functions of the individual services.

The supervisor can be configured to start the different EVA services independently, such as the basic `eva_server` and `eva_log` functionality, and to start the SNMP implementations of the respective service. For each possible combination of services, there is a corresponding start function, for example `start_link_log/1` which starts the basic eva server and the log functionality.

Before the services can be used, the Mnesia tables involved must be created. For each combination of services, there is a corresponding function which creates the tables. Each such function takes a list of nodes as its argument. This list of nodes defines to which nodes the Mnesia tables will be replicated. These nodes should be the same nodes as where the application where EVA is included can run distributed. This is as per the `kernel` configuration parameter `distributed`.

### EXPORTS

`create_tables(Nodes) -> void()`

Types:

`Nodes = [node()]`

Creates the Mnesia tables for the basic EVA service (`eva_server`) only.

`create_tables_log(Nodes) -> void()`

Types:

`Nodes = [node()]`

Creates the Mnesia tables for the basic EVA service (`eva_server`) and EVA log service (`eva_log`).

`create_tables_log_snmp(Nodes) -> void()`

Types:

`Nodes = [node()]`

Creates the Mnesia tables for the basic EVA service (`eva_server`), EVA log service (`eva_log`), and for the SNMP implementation of these (`eva_snmp_adaptation` and `eva_log_snmp`).

`create_tables_snmp(Nodes) -> void()`

Types:

`Nodes = [node()]`

Creates the Mnesia tables for the basic EVA service (`eva_server`), and for the SNMP implementation of this service (`eva_snmp_adaptation`).

`start_link() -> {ok, Pid} | {error, Reason}`

Starts the supervisor and the basic EVA service (`eva_server`) only.

`start_link_log(DefaultLog) -> {ok, Pid} | {error, Reason}`

Types:

`DefaultLog = string() | false`

Starts the supervisor, the basic EVA service (`eva_server`) and EVA log service (`eva_log`).

`DefaultLog` is passed to `eva_log:start_link(DefaultLog)`.

`start_link_log_snmp(DefaultLog, LogDir, MaxDirSize) -> {ok, Pid} | {error, Reason}`

Types:

`DefaultLog = string() | false`
`LogDir = string()`
`MaxDirSize = integer()`

Starts the supervisor, the basic EVA service (`eva_server`), EVA log service (`eva_log`) and the SNMP implementations of these (`eva_snmp_adaptation` and `eva_log_snmp`).

`DefaultLog` is passed to `eva_log:start_link(DefaultLog)`, `LogDir` and `MaxDirSize` to `eva_log_snmp:start_link(LogDir, MaxDirSize)`.

`start_link_snmp() -> {ok, Pid} | {error, Reason}`

Starts the supervisor, the basic EVA service (`eva_server`) and the SNMP implementation of this service (`eva_snmp_adaptation`).

### See Also

eva_log(3), eva_server(3), eva_log_snmp(3), eva_snmp_adaptation(3)

### AUTHORS

Martin Björklund - support@erlang.ericsson.se

eva 2.0.3
Copyright © 1991-2003 Ericsson Utvecklings AB