1Munin::Node::Service(3)User Contributed Perl DocumentatioMnunin::Node::Service(3)
2
3
4

NAME

6       Munin::Node::Service - Methods related to handling of Munin services
7

SYNOPSIS

9        my $bool = Munin::Node::Service->is_a_runnable_service($file_name);
10        $result = Munin::Node::Service->fork_service($file_name)
11           if $bool;
12

METHODS

14       is_a_runnable_service
15            my $bool = Munin::Node::Service->is_a_runnable_service($file_name, $dir);
16
17           Runs miscellaneous tests on $file_name in directory $dir. These
18           tests are intended to verify that $file_name is a runnable service.
19
20           If not specified, $dir defaults to $config->{servicedir}
21
22       prepare_plugin_environment(@services)
23           Carries out various tasks that plugins require before being run,
24           such as loading service configurations and exporting common
25           environment variables.
26
27       export_service_environment
28            Munin::Node::Service->export_service_enviromnent($service);
29
30           Exports all the environment variables specific to service $service.
31
32       change_real_and_effective_user_and_group
33            Munin::Node::Service->change_real_and_effective_user_and_group($service);
34
35           Changes the current process' effective group and user IDs to those
36           specified in the configuration, or the default user or group
37           otherwise.  Also changes the real group and user IDs if the
38           operating system supports it.
39
40           On failure, causes the process to exit.
41
42       exec_service
43            Munin::Node::Service->exec_service($directory, $service, [$argument]);
44
45           Replaces the current process with an instance of service $service
46           in $directory, running with the correct environment and privileges.
47
48           This function never returns.
49
50       fork_service
51            $result = Munin::Node::Service->fork_service($directory, $service, [$argument]);
52
53           Identical to exec_service(), except it forks off a child to run the
54           service.  If the service takes longer than its configured timeout,
55           it will be terminated.
56
57           Returns a hash reference containing (among other things) the
58           service's output and exit value.  (See documentation for
59           run_as_child() in Munin::Node::Service for a comprehensive
60           description.)
61
62
63
64perl v5.12.2                      2010-12-05           Munin::Node::Service(3)
Impressum