fabtools.system

System settings

Hostname

fabtools.system.get_hostname()[source]

Get the fully qualified hostname.

fabtools.system.set_hostname(hostname, persist=True)[source]

Set the hostname.

Kernel parameters

fabtools.system.get_sysctl(key)[source]

Get a kernel parameter.

Example:

from fabtools.system import get_sysctl

print "Max number of open files:", get_sysctl('fs.file-max')
fabtools.system.set_sysctl(key, value)[source]

Set a kernel parameter.

Example:

import fabtools

# Protect from SYN flooding attack
fabtools.system.set_sysctl('net.ipv4.tcp_syncookies', 1)

Locales

fabtools.system.supported_locales()[source]

Gets the list of supported locales.

Each locale is returned as a (locale, charset) tuple.

Project Versions

Table Of Contents

Previous topic

fabtools.supervisor

Next topic

fabtools.user

This Page