Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Rex::Commands::Sysctl(User Contributed Perl DocumentatRex::Commands::Sysctl(3)

NAME
       Rex::Commands::Sysctl - Manipulate sysctl

DESCRIPTION
       With this module	you can	set and	get sysctl parameters.

       Version <= 1.0: All these functions will	not be reported.

       All these functions are not idempotent.

       This function doesn't persist the entries in /etc/sysctl.conf.

SYNOPSIS
	use Rex::Commands::Sysctl;

	my $data = sysctl "net.ipv4.tcp_keepalive_time";
	sysctl "net.ipv4.tcp_keepalive_time" =>	1800;

EXPORTED FUNCTIONS
   sysctl($key [, $val])
       This function will read the sysctl key $key.

       If $val is given, then this function will set the sysctl	key $key.

	task "tune", "server01", sub {
	  if( sysctl("net.ipv4.ip_forward") == 0 ) {
	    sysctl "net.ipv4.ip_forward" => 1;
	  }
	};

perl v5.24.1			  2016-07-16	      Rex::Commands::Sysctl(3)

NAME | DESCRIPTION | SYNOPSIS | EXPORTED FUNCTIONS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Rex::Commands::Sysctl&sektion=3&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help