Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pool(3erl) [linux man page]

pool(3erl)						     Erlang Module Definition							pool(3erl)

NAME
pool - Load Distribution Facility DESCRIPTION
pool can be used to run a set of Erlang nodes as a pool of computational processors. It is organized as a master and a set of slave nodes and includes the following features: * The slave nodes send regular reports to the master about their current load. * Queries can be sent to the master to determine which node will have the least load. The BIF statistics(run_queue) is used for estimating future loads. It returns the length of the queue of ready to run processes in the Erlang runtime system. The slave nodes are started with the slave module. This effects, tty IO, file IO, and code loading. If the master node fails, the entire pool will exit. EXPORTS
start(Name) -> start(Name, Args) -> Nodes Types Name = atom() Args = string() Nodes = [node()] Starts a new pool. The file .hosts.erlang is read to find host names where the pool nodes can be started. See section Files below. The start-up procedure fails if the file is not found. The slave nodes are started with slave:start/2,3 , passing along Name and, if provided, Args . Name is used as the first part of the node names, Args is used to specify command line arguments. See slave(3erl) . Access rights must be set so that all nodes in the pool have the authority to access each other. The function is synchronous and all the nodes, as well as all the system servers, are running when it returns a value. attach(Node) -> already_attached | attached Types Node = node() This function ensures that a pool master is running and includes Node in the pool master's pool of nodes. stop() -> stopped Stops the pool and kills all the slave nodes. get_nodes() -> Nodes Types Nodes = [node()] Returns a list of the current member nodes of the pool. pspawn(Mod, Fun, Args) -> pid() Types Mod = Fun = atom() Args = [term()] Spawns a process on the pool node which is expected to have the lowest future load. pspawn_link(Mod, Fun, Args) -> pid() Types Mod = Fun = atom() Args = [term()] Spawn links a process on the pool node which is expected to have the lowest future load. get_node() -> node() Returns the node with the expected lowest future load. FILES
.hosts.erlang is used to pick hosts where nodes can be started. See net_adm(3erl) for information about format and location of this file. $HOME/.erlang.slave.out.HOST is used for all additional IO that may come from the slave nodes on standard IO. If the start-up procedure does not work, this file may indicate the reason. Ericsson AB stdlib 1.17.3 pool(3erl)

Check Out this Related Man Page

ct_slave(3erl)						     Erlang Module Definition						    ct_slave(3erl)

NAME
ct_slave - Common Test Framework functions for starting and stopping nodes for Large Scale Testing. DESCRIPTION
Common Test Framework functions for starting and stopping nodes for Large Scale Testing. This module exports functions which are used by the Common Test Master to start and stop "slave" nodes. It is the default callback module for the {init, node_start} term of the Test Specification. EXPORTS
start(Node) -> Result Types Node = atom() Result = {ok, NodeName} | {error, already_started, NodeName} | {error, started_not_connected, NodeName} | {error, boot_time- out, NodeName} | {error, init_timeout, NodeName} | {error, startup_timeout, NodeName} | {error, not_alive, NodeName} NodeName = atom() Starts an Erlang node with name Node on the local host. See also: start/3 . start(Host, Node) -> Result Types Node = atom() Host = atom() Result = {ok, NodeName} | {error, already_started, NodeName} | {error, started_not_connected, NodeName} | {error, boot_time- out, NodeName} | {error, init_timeout, NodeName} | {error, startup_timeout, NodeName} | {error, not_alive, NodeName} NodeName = atom() Starts an Erlang node with name Node on host Host with the default options. See also: start/3 . start(Host, Node, Options::Opts) -> Result Types Node = atom() Host = atom() Opts = [OptTuples] OptTuples = {username, Username} | {password, Password} | {boot_timeout, BootTimeout} | {init_timeout, InitTimeout} | {startup_timeout, StartupTimeout} | {startup_functions, StartupFunctions} | {monitor_master, Monitor} | {kill_if_fail, Kil- lIfFail} | {erl_flags, ErlangFlags} Username = string() Password = string() BootTimeout = integer() InitTimeout = integer() StartupTimeout = integer() StartupFunctions = [StartupFunctionSpec] StartupFunctionSpec = {Module, Function, Arguments} Module = atom() Function = atom() Arguments = [term] Monitor = bool() KillIfFail = bool() ErlangFlags = string() Result = {ok, NodeName} | {error, already_started, NodeName} | {error, started_not_connected, NodeName} | {error, boot_time- out, NodeName} | {error, init_timeout, NodeName} | {error, startup_timeout, NodeName} | {error, not_alive, NodeName} NodeName = atom() Starts an Erlang node with name Node on host Host as specified by the combination of options in Opts . Options Username and Password will be used to log in onto the remote host Host . Username, if omitted, defaults to the current user name, and password is empty by default. A list of functions specified in the Startup option will be executed after startup of the node. Note that all used modules should be present in the code path on the Host . The timeouts are applied as follows: * BootTimeout - time to start the Erlang node, in seconds. Defaults to 3 seconds. If node does not become pingable within this time, the result {error, boot_timeout, NodeName} is returned; * InitTimeout - time to wait for the node until it calls the internal callback function informing master about successfull startup. Defaults to one second. In case of timed out message the result {error, init_timeout, NodeName} is returned; * StartupTimeout - time to wait intil the node finishes to run the StartupFunctions . Defaults to one second. If this timeout occurs, the result {error, startup_timeout, NodeName} is returned. Option monitor_master specifies, if the slave node should be stopped in case of master node stop. Defaults to false. Option kill_if_fail specifies, if the slave node should be killed in case of a timeout during initialization or startup. Defaults to true. Note that node also may be still alive it the boot timeout occurred, but it will not be killed in this case. Option erlang_flags specifies, which flags will be added to the parameters of the erl executable. Special return values are: * {error, already_started, NodeName} - if the node with the given name is already started on a given host; * {error, started_not_connected, NodeName} - if node is started, but not connected to the master node. * {error, not_alive, NodeName} - if node on which the ct_slave:start/3 is called, is not alive. Note that NodeName is the name of current node in this case. stop(Node) -> Result Types Node = atom() Result = {ok, NodeName} | {error, not_started, NodeName} | {error, not_connected, NodeName} | {error, stop_timeout, NodeName} NodeName = atom() Stops the running Erlang node with name Node on the localhost. stop(Host, Node) -> Result Types Host = atom() Node = atom() Result = {ok, NodeName} | {error, not_started, NodeName} | {error, not_connected, NodeName} | {error, stop_timeout, NodeName} NodeName = atom() Stops the running Erlang node with name Node on host Host . AUTHORS
<> common_test 1.5.3 ct_slave(3erl)
Man Page