Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

munin::node::os(3pm) [debian man page]

Munin::Node::OS(3pm)					User Contributed Perl Documentation				      Munin::Node::OS(3pm)

NAME
Munin::Node::OS - OS related utility methods for the Munin node. SYNOPSIS
use Munin::Node::OS; my $uid = Munin::Node::OS->get_uid('foo'); my $host = Munin::Node::OS->get_fq_hostname(); METHODS
get_uid $uid = $class->get_uid($user) Returns the user ID. $user might either be a user name or a user ID. Returns undef if the user doesn't exist. get_gid $gid = $class->get_gid($group) Returns the group ID. $group might either be a group name or a group ID. Returns undef if the group doesn't exist. get_fq_hostname $host = $class->get_fq_hostname() Returns the fully qualified host name of the machine. check_perms_if_paranoid $bool = $class->check_perms_if_paranoid($target); If paranoia is enabled, returns false unless $target is owned by root, and has safe permissions. If $target is a file, also checks the directory it inhabits. run_as_child $result = run_as_child($timeout, $coderef, @arguments); Creates a child process to run $code and waits for up to $timeout seconds for it to complete. Returns a hashref containing the following keys: "stdout", "stderr" Array references containing the output of these filehandles; "retval" The result of wait(); "timed_out" True if the child had to be interrupted. System errors will cause it to carp. reap_child_group $class->reap_child_group($pid); Sends SIGHUP and SIGKILL to the process group identified by $pid. Sleeps for 2 seconds between SIGHUP and SIGKILL. possible_to_signal_process my $bool = $class->possible_to_signal_process($pid) Check whether it's possible to send a signal to $pid (that means, to be brief, that the process is owned by the same user, or we are the super-user). This is a useful way to check that a child process is alive (even if only as a zombie) and hasn't changed its UID. set_effective_user_id eval { $class->set_effective_user_id($uid); }; if ($@) { # Failed to set EUID } The name says it all ... set_effective_group_id See documentation for set_effective_user_id() set_real_user_id See documentation for set_effective_user_id() set_real_group_id See documentation for set_effective_user_id() set_umask Set umask so that files created by plugins are group writable Only call right before exec-ing a plugin. perl v5.14.2 2013-11-12 Munin::Node::OS(3pm)

Check Out this Related Man Page

Munin::Node::Configure::Plugin(3pm)			User Contributed Perl Documentation		       Munin::Node::Configure::Plugin(3pm)

NAME
Munin::Node::Configure::Plugin - Class representing a plugin, along with its installed and suggested services. SYNOPSIS
my $plugin = Munin::Node::Configure::Plugin->new(); METHODS
new(%args) Constructor. Required arguments are 'name' and 'path', which should be the basename and full path of the plugin, respectively. is_wildcard() Returns true if the plugin is a wildcard. In the case of SNMP plugins, only double-wild plugins will return true (ie. 'snmp__memory' would return false, but 'snmp__if_' would return true). is_snmp() Returns true if the plugin is an SNMP plugin. in_family(@families) Returns true if plugin's family is in @families, false otherwise. is_installed() Returns 'yes' if one or more links to this plugin exist in the service directory, 'no' otherwise. suggestion_string() Returns a string detailing whether or not autoconf considers that the plugin should be installed. The string may also report the reason why the plugin declined to be installed, or the list of suggestions it provided, if this information is available. installed_services_string() Returns a string detailing which wildcards are installed for this plugin. services_to_add() services_to_remove() Return a list of service names that should be added or removed for this plugin. add_instance($name) Associates a link from the service directory with this plugin. add_suggestions(@suggestions) Adds @suggestions to the list of suggested wildcards for this plugin. They are not validated. read_magic_markers() Sets the family and capabilities from the magic markers embedded in the plugin's executable, as specified by http://munin-monitoring.org/wiki/ConcisePlugins#Magicmarkers <http://munin-monitoring.org/wiki/ConcisePlugins#Magicmarkers> parse_autoconf_response(@response) Parses and validates the autoconf response from the plugin, in the format specified by http://munin-monitoring.org/wiki/ConcisePlugins#autoconf <http://munin-monitoring.org/wiki/ConcisePlugins#autoconf> Invalid input will cause an error to be logged against the plugin. parse_suggest_response(@response) Validates the suggestions from the plugin. Invalid suggestions will cause an error to be logged against the plugin. parse_snmpconf_response(@response) Parses and validates the snmpconf response from the plugin, in the format specified by http://munin-monitoring.org/wiki/ConcisePlugins#suggest <http://munin-monitoring.org/wiki/ConcisePlugins#suggest> Invalid or inconsistent input will cause an error to be logged against the plugin. log_error($message) Logs an error for later retrieval. The error will also be displayed if debugging output is enabled. perl v5.14.2 2013-11-12 Munin::Node::Configure::Plugin(3pm)
Man Page