text
stringlengths
81
112k
Test if a specific extension is installed CLI Example: .. code-block:: bash salt '*' postgres.is_installed_extension def is_installed_extension(name, user=None, host=None, port=None, maintenan...
Get lifecycle information about an extension CLI Example: .. code-block:: bash salt '*' postgres.create_metadata adminpack def create_metadata(name, ext_version=None, schema=None, user=None, host=None, ...
Drop an installed postgresql extension CLI Example: .. code-block:: bash salt '*' postgres.drop_extension 'adminpack' def drop_extension(name, if_exists=None, restrict=None, cascade=None, user=None, host=N...
Install a postgresql extension CLI Example: .. code-block:: bash salt '*' postgres.create_extension 'adminpack' def create_extension(name, if_not_exists=None, schema=None, ext_version=None, from_version=None, ...
Removes a user from the Postgres server. CLI Example: .. code-block:: bash salt '*' postgres.user_remove 'username' def user_remove(username, user=None, host=None, port=None, maintenance_db=None, password=None, ...
Creates a Postgres group. A group is postgres is similar to a user, but cannot login. CLI Example: .. code-block:: bash salt '*' postgres.group_create 'groupname' user='user' \\ host='hostname' port='port' password='password' \\ rolepassword='rolepassword' def gro...
Removes a group from the Postgres server. CLI Example: .. code-block:: bash salt '*' postgres.group_remove 'groupname' def group_remove(groupname, user=None, host=None, port=None, maintenance_db=None, password=None,...
Set the owner of all schemas, functions, tables, views and sequences to the given username. CLI Example: .. code-block:: bash salt '*' postgres.owner_to 'dbname' 'username' def owner_to(dbname, ownername, user=None, host=None, port=None, ...
Creates a Postgres schema. CLI Example: .. code-block:: bash salt '*' postgres.schema_create dbname name owner='owner' \\ user='user' \\ db_user='user' db_password='password' db_host='hostname' db_port='port' def schema_create(dbname, name, owner=None,...
Removes a schema from the Postgres server. CLI Example: .. code-block:: bash salt '*' postgres.schema_remove dbname schemaname dbname Database name we work on schemaname The schema's name we'll remove user System user all operations should be performed on behalf...
Checks if a schema exists on the Postgres server. CLI Example: .. code-block:: bash salt '*' postgres.schema_exists dbname schemaname dbname Database name we query on name Schema name we look for user The system user the operation should be performed on behalf of...
Return a dict with information about schemas in a database. CLI Example: .. code-block:: bash salt '*' postgres.schema_get dbname name dbname Database name we query on name Schema name we look for user The system user the operation should be performed on behalf o...
Return a dict with information about schemas in a Postgres database. CLI Example: .. code-block:: bash salt '*' postgres.schema_list dbname dbname Database name we query on user The system user the operation should be performed on behalf of db_user database user...
.. versionadded:: 2016.3.0 Return a list of languages in a database. CLI Example: .. code-block:: bash salt '*' postgres.language_list dbname maintenance_db The database to check user database username if different from config or default password user passw...
.. versionadded:: 2016.3.0 Checks if language exists in a database. CLI Example: .. code-block:: bash salt '*' postgres.language_exists plpgsql dbname name Language to check for maintenance_db The database to check in user database username if different from...
.. versionadded:: 2016.3.0 Installs a language into a database CLI Example: .. code-block:: bash salt '*' postgres.language_create plpgsql dbname name Language to install maintenance_db The database to install the language in user database username if differ...
Generate the SQL required for specific object type def _make_default_privileges_list_query(name, object_type, prepend): ''' Generate the SQL required for specific object type ''' if object_type == 'table': query = (' '.join([ 'SELECT defacl.defaclacl AS name', 'FROM pg_d...
Generate the SQL required for specific object type def _make_privileges_list_query(name, object_type, prepend): ''' Generate the SQL required for specific object type ''' if object_type == 'table': query = (' '.join([ 'SELECT relacl AS name', 'FROM pg_catalog.pg_class c'...
Return the owner of a postgres object def _get_object_owner(name, object_type, prepend='public', maintenance_db=None, user=None, host=None, port=None, password=None, runas=None): ''' Return the owner of a postgres object ''' if object_type...
Validate the supplied privileges def _validate_default_privileges(object_type, defprivs, defprivileges): ''' Validate the supplied privileges ''' if object_type != 'group': _defperms = [_DEFAULT_PRIVILEGES_MAP[defperm] for defperm in _DEFAULT_PRIVILEGE_TYPE_MAP[object_type]] ...
Format options def _mod_defpriv_opts(object_type, defprivileges): ''' Format options ''' object_type = object_type.lower() defprivileges = '' if defprivileges is None else defprivileges _defprivs = re.split(r'\s?,\s?', defprivileges.upper()) return object_type, defprivileges, _defprivs
Process part def _process_defpriv_part(defperms): ''' Process part ''' _tmp = {} previous = None for defperm in defperms: if previous is None: _tmp[_DEFAULT_PRIVILEGES_MAP[defperm]] = False previous = _DEFAULT_PRIVILEGES_MAP[defperm] else: if ...
Validate the supplied privileges def _validate_privileges(object_type, privs, privileges): ''' Validate the supplied privileges ''' if object_type != 'group': _perms = [_PRIVILEGES_MAP[perm] for perm in _PRIVILEGE_TYPE_MAP[object_type]] _perms.append('ALL') if o...
Format options def _mod_priv_opts(object_type, privileges): ''' Format options ''' object_type = object_type.lower() privileges = '' if privileges is None else privileges _privs = re.split(r'\s?,\s?', privileges.upper()) return object_type, privileges, _privs
Process part def _process_priv_part(perms): ''' Process part ''' _tmp = {} previous = None for perm in perms: if previous is None: _tmp[_PRIVILEGES_MAP[perm]] = False previous = _PRIVILEGES_MAP[perm] else: if perm == '*': _tmp[...
.. versionadded:: 2019.0.0 Return a list of default privileges for the specified object. CLI Example: .. code-block:: bash salt '*' postgres.default_privileges_list table_name table maintenance_db=db_name name Name of the object for which the permissions should be returned objec...
.. versionadded:: 2016.3.0 Return a list of privileges for the specified object. CLI Example: .. code-block:: bash salt '*' postgres.privileges_list table_name table maintenance_db=db_name name Name of the object for which the permissions should be returned object_type Th...
.. versionadded:: 2019.0.0 Check if a role has the specified privileges on an object CLI Example: .. code-block:: bash salt '*' postgres.has_default_privileges user_name table_name table \\ SELECT,INSERT maintenance_db=db_name name Name of the role whose privileges should be ...
.. versionadded:: 2016.3.0 Check if a role has the specified privileges on an object CLI Example: .. code-block:: bash salt '*' postgres.has_privileges user_name table_name table \\ SELECT,INSERT maintenance_db=db_name name Name of the role whose privileges should be checked ...
.. versionadded:: 2019.0.0 Grant default privileges on a postgres object CLI Example: .. code-block:: bash salt '*' postgres.default_privileges_grant user_name table_name table \\ SELECT,UPDATE maintenance_db=db_name name Name of the role to which default privileges should be...
.. versionadded:: 2019.0.0 Revoke default privileges on a postgres object CLI Example: .. code-block:: bash salt '*' postgres.default_privileges_revoke user_name table_name table \\ SELECT,UPDATE maintenance_db=db_name name Name of the role whose default privileges should be ...
.. versionadded:: 2016.3.0 Grant privileges on a postgres object CLI Example: .. code-block:: bash salt '*' postgres.privileges_grant user_name table_name table \\ SELECT,UPDATE maintenance_db=db_name name Name of the role to which privileges should be granted object_nam...
.. versionadded:: 2016.3.0 Revoke privileges on a postgres object CLI Example: .. code-block:: bash salt '*' postgres.privileges_revoke user_name table_name table \\ SELECT,UPDATE maintenance_db=db_name name Name of the role whose privileges should be revoked object_name...
.. versionadded:: 2016.3.0 Initializes a postgres data directory CLI Example: .. code-block:: bash salt '*' postgres.datadir_init '/var/lib/pgsql/data' name The name of the directory to initialize auth The default authentication method for local connections passwor...
.. versionadded:: 2016.3.0 Checks if postgres data directory has been initialized CLI Example: .. code-block:: bash salt '*' postgres.datadir_exists '/var/lib/pgsql/data' name Name of the directory to check def datadir_exists(name): ''' .. versionadded:: 2016.3.0 Check...
Execute an arbitrary action on a module. module name of the module to be executed action name of the module's action to be run module_parameter additional params passed to the defined module action_parameter additional params passed to the defined action state_on...
List available ``eselect`` modules. CLI Example: .. code-block:: bash salt '*' eselect.get_modules def get_modules(): ''' List available ``eselect`` modules. CLI Example: .. code-block:: bash salt '*' eselect.get_modules ''' modules = [] module_list = exec_acti...
List available targets for the given module. module name of the module to be queried for its targets action_parameter additional params passed to the defined action .. versionadded:: 2016.11.0 CLI Example: .. code-block:: bash salt '*' eselect.get_target_list kernel...
Get the currently selected target for the given module. module name of the module to be queried for its current target module_parameter additional params passed to the defined module action_parameter additional params passed to the 'show' action CLI Example (current target of...
Set the target for the given module. Target can be specified by index or name. module name of the module for which a target should be set target name of the target to be set for this module module_parameter additional params passed to the defined module action_parameter ...
Perform a calculation on the ``num`` most recent values. Requires a list. Valid values for ``oper`` are: - add: Add last ``num`` values together - mul: Multiple last ``num`` values together - mean: Calculate mean of last ``num`` values - median: Calculate median of last ``num`` values - median_...
Adds together the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.add: - name: myregentry - num: 5 def add(name, num, minimum=0, maximum=0, ref=None): ''' Adds together the ``num`` most recent values. Requires a list. ...
Multiplies together the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.mul: - name: myregentry - num: 5 def mul(name, num, minimum=0, maximum=0, ref=None): ''' Multiplies together the ``num`` most recent values. Requires a...
Calculates the mean of the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.mean: - name: myregentry - num: 5 def mean(name, num, minimum=0, maximum=0, ref=None): ''' Calculates the mean of the ``num`` most recent values. Re...
Calculates the mean of the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.median: - name: myregentry - num: 5 def median(name, num, minimum=0, maximum=0, ref=None): ''' Calculates the mean of the ``num`` most recent values...
Calculates the low mean of the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.median_low: - name: myregentry - num: 5 def median_low(name, num, minimum=0, maximum=0, ref=None): ''' Calculates the low mean of the ``num`` mo...
Calculates the high mean of the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.median_high: - name: myregentry - num: 5 def median_high(name, num, minimum=0, maximum=0, ref=None): ''' Calculates the high mean of the ``num`...
Calculates the grouped mean of the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.median_grouped: - name: myregentry - num: 5 def median_grouped(name, num, minimum=0, maximum=0, ref=None): ''' Calculates the grouped me...
Calculates the mode of the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.mode: - name: myregentry - num: 5 def mode(name, num, minimum=0, maximum=0, ref=None): ''' Calculates the mode of the ``num`` most recent values. Re...
Convert the libvirt enum integer value into a human readable string. :param prefix: start of the libvirt attribute to look for. :param value: integer to convert to string def _get_libvirt_enum_string(prefix, value): ''' Convert the libvirt enum integer value into a human readable string. :param p...
Convert event and detail numeric values into a tuple of human readable strings def _get_domain_event_detail(event, detail): ''' Convert event and detail numeric values into a tuple of human readable strings ''' event_name = _get_libvirt_enum_string('VIR_DOMAIN_EVENT_', event) if event_name == 'unkn...
Convenience function adding common data to the event and sending it on the salt event bus. :param opaque: the opaque data that is passed to the callback. This is a dict with 'prefix', 'object' and 'event' keys. :param conn: libvirt connection :param data: additional event data dict t...
Helper function send a salt event for a libvirt domain. :param opaque: the opaque data that is passed to the callback. This is a dict with 'prefix', 'object' and 'event' keys. :param conn: libvirt connection :param domain: name of the domain related to the event :param event: name of...
Domain lifecycle events handler def _domain_event_lifecycle_cb(conn, domain, event, detail, opaque): ''' Domain lifecycle events handler ''' event_str, detail_str = _get_domain_event_detail(event, detail) _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'event': event_str,...
Domain RTC change events handler def _domain_event_rtc_change_cb(conn, domain, utcoffset, opaque): ''' Domain RTC change events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'utcoffset': utcoffset })
Domain watchdog events handler def _domain_event_watchdog_cb(conn, domain, action, opaque): ''' Domain watchdog events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'action': _get_libvirt_enum_string('VIR_DOMAIN_EVENT_WATCHDOG_', action) })
Domain I/O Error events handler def _domain_event_io_error_cb(conn, domain, srcpath, devalias, action, reason, opaque): ''' Domain I/O Error events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'srcPath': srcpath, 'dev': devalias, 'action': _get_li...
Domain graphics events handler def _domain_event_graphics_cb(conn, domain, phase, local, remote, auth, subject, opaque): ''' Domain graphics events handler ''' prefix = 'VIR_DOMAIN_EVENT_GRAPHICS_' def get_address(addr): ''' transform address structure into event data piece ...
Domain disk change events handler def _domain_event_disk_change_cb(conn, domain, old_src, new_src, dev, reason, opaque): ''' Domain disk change events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'oldSrcPath': old_src, 'newSrcPath': new_src, 'dev'...
Domain tray change events handler def _domain_event_tray_change_cb(conn, domain, dev, reason, opaque): ''' Domain tray change events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'dev': dev, 'reason': _get_libvirt_enum_string('VIR_DOMAIN_EVENT_TRAY_CHANGE_...
Domain wakeup events handler def _domain_event_pmwakeup_cb(conn, domain, reason, opaque): ''' Domain wakeup events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'reason': 'unknown' # currently unused })
Domain suspend events handler def _domain_event_pmsuspend_cb(conn, domain, reason, opaque): ''' Domain suspend events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'reason': 'unknown' # currently unused })
Domain balloon change events handler def _domain_event_balloon_change_cb(conn, domain, actual, opaque): ''' Domain balloon change events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'actual': actual })
Domain disk suspend events handler def _domain_event_pmsuspend_disk_cb(conn, domain, reason, opaque): ''' Domain disk suspend events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'reason': 'unknown' # currently unused })
Domain block job events handler def _domain_event_block_job_cb(conn, domain, disk, job_type, status, opaque): ''' Domain block job events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'disk': disk, 'type': _get_libvirt_enum_string('VIR_DOMAIN_BLOCK_JOB_TYP...
Domain device removal events handler def _domain_event_device_removed_cb(conn, domain, dev, opaque): ''' Domain device removal events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'dev': dev })
Domain tunable events handler def _domain_event_tunable_cb(conn, domain, params, opaque): ''' Domain tunable events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'params': params })
Domain agent lifecycle events handler def _domain_event_agent_lifecycle_cb(conn, domain, state, reason, opaque): ''' Domain agent lifecycle events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'state': _get_libvirt_enum_string('VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFEC...
Domain device addition events handler def _domain_event_device_added_cb(conn, domain, dev, opaque): ''' Domain device addition events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'dev': dev })
Domain migration iteration events handler def _domain_event_migration_iteration_cb(conn, domain, iteration, opaque): ''' Domain migration iteration events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'iteration': iteration })
Domain job completion events handler def _domain_event_job_completed_cb(conn, domain, params, opaque): ''' Domain job completion events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'params': params })
Domain device removal failure events handler def _domain_event_device_removal_failed_cb(conn, domain, dev, opaque): ''' Domain device removal failure events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'dev': dev })
Domain metadata change events handler def _domain_event_metadata_change_cb(conn, domain, mtype, nsuri, opaque): ''' Domain metadata change events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'type': _get_libvirt_enum_string('VIR_DOMAIN_METADATA_', mtype), ...
Domain block threshold events handler def _domain_event_block_threshold_cb(conn, domain, dev, path, threshold, excess, opaque): ''' Domain block threshold events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'dev': dev, 'path': path, 'threshold': t...
Network lifecycle events handler def _network_event_lifecycle_cb(conn, net, event, detail, opaque): ''' Network lifecycle events handler ''' _salt_send_event(opaque, conn, { 'network': { 'name': net.name(), 'uuid': net.UUIDString() }, 'event': _get_libvi...
Storage pool lifecycle events handler def _pool_event_lifecycle_cb(conn, pool, event, detail, opaque): ''' Storage pool lifecycle events handler ''' _salt_send_event(opaque, conn, { 'pool': { 'name': pool.name(), 'uuid': pool.UUIDString() }, 'event': _get...
Storage pool refresh events handler def _pool_event_refresh_cb(conn, pool, opaque): ''' Storage pool refresh events handler ''' _salt_send_event(opaque, conn, { 'pool': { 'name': pool.name(), 'uuid': pool.UUIDString() }, 'event': opaque['event'] })
Node device lifecycle events handler def _nodedev_event_lifecycle_cb(conn, dev, event, detail, opaque): ''' Node device lifecycle events handler ''' _salt_send_event(opaque, conn, { 'nodedev': { 'name': dev.name() }, 'event': _get_libvirt_enum_string('VIR_NODE_DEVICE...
Node device update events handler def _nodedev_event_update_cb(conn, dev, opaque): ''' Node device update events handler ''' _salt_send_event(opaque, conn, { 'nodedev': { 'name': dev.name() }, 'event': opaque['event'] })
Secret lifecycle events handler def _secret_event_lifecycle_cb(conn, secret, event, detail, opaque): ''' Secret lifecycle events handler ''' _salt_send_event(opaque, conn, { 'secret': { 'uuid': secret.UUIDString() }, 'event': _get_libvirt_enum_string('VIR_SECRET_EVEN...
Secret value change events handler def _secret_event_value_changed_cb(conn, secret, opaque): ''' Secret value change events handler ''' _salt_send_event(opaque, conn, { 'secret': { 'uuid': secret.UUIDString() }, 'event': opaque['event'] })
Unregister all the registered callbacks :param cnx: libvirt connection :param callback_ids: dictionary mapping a libvirt object type to an ID list of callbacks to deregister def _callbacks_cleanup(cnx, callback_ids): ''' Unregister all the registered callbacks :param cnx:...
Helper function registering a callback :param cnx: libvirt connection :param tag_prefix: salt event tag prefix to use :param obj: the libvirt object name for the event. Needs to be one of the REGISTER_FUNCTIONS keys. :param event: the event type name. :param real_id: the libvirt nam...
Helper function adding a callback ID to the IDs dict. The callback ids dict maps an object to event callback ids. :param ids: dict of callback IDs to update :param obj: one of the keys of REGISTER_FUNCTIONS :param callback_id: the result of _register_callback def _append_callback_id(ids, obj, callback...
Listen to libvirt events and forward them to salt. :param uri: libvirt URI to listen on. Defaults to None to pick the first available local hypervisor :param tag_prefix: the begining of the salt event tag to use. Defaults to 'salt/engines/libvirt_events' :param filter...
Convert a string to a number. Returns an integer if the string represents an integer, a floating point number if the string is a real number, or the string unchanged otherwise. def _number(text): ''' Convert a string to a number. Returns an integer if the string represents an integer, a floatin...
Return the number of seconds since boot time on AIX t=$(LC_ALL=POSIX ps -o etime= -p 1) d=0 h=0 case $t in *-*) d=${t%%-*}; t=${t#*-};; esac case $t in *:*:*) h=${t%%:*}; t=${t#*:};; esac s=$((d*86400 + h*3600 + ${t%%:*}*60 + ${t#*:})) t is 7-20:46:46 def _get_boot_time_aix(): ''' Ret...
Return the load average on AIX def _aix_loadavg(): ''' Return the load average on AIX ''' # 03:42PM up 9 days, 20:41, 2 users, load average: 0.28, 0.47, 0.69 uptime = __salt__['cmd.run']('uptime') ldavg = uptime.split('load average') load_avg = ldavg[1].split() return {'1-min': lo...
Return the process data .. versionchanged:: 2016.11.4 Added support for AIX CLI Example: .. code-block:: bash salt '*' status.procs def procs(): ''' Return the process data .. versionchanged:: 2016.11.4 Added support for AIX CLI Example: .. code-block:: ba...
Return a custom composite of status data and info for this minion, based on the minion config file. An example config like might be:: status.cpustats.custom: [ 'cpu', 'ctxt', 'btime', 'processes' ] Where status refers to status.py, cpustats is the function where we get our data, and custom is this...
Return the uptime for this system. .. versionchanged:: 2015.8.9 The uptime function was changed to return a dictionary of easy-to-read key/value pairs containing uptime information, instead of the output from a ``cmd.run`` call. .. versionchanged:: 2016.11.0 Support for OpenBSD...
Return the load averages for this minion .. versionchanged:: 2016.11.4 Added support for AIX CLI Example: .. code-block:: bash salt '*' status.loadavg :raises CommandExecutionError: If the system cannot report loadaverages to Python def loadavg(): ''' Return the load av...
Return the CPU stats for this minion .. versionchanged:: 2016.11.4 Added support for AIX .. versionchanged:: 2018.3.0 Added support for OpenBSD CLI Example: .. code-block:: bash salt '*' status.cpustats def cpustats(): ''' Return the CPU stats for this minion ....
Return the memory info for this minion .. versionchanged:: 2016.11.4 Added support for AIX .. versionchanged:: 2018.3.0 Added support for OpenBSD CLI Example: .. code-block:: bash salt '*' status.meminfo def meminfo(): ''' Return the memory info for this minion ...
.. versionchanged:: 2016.3.2 Return the CPU info for this minion .. versionchanged:: 2016.11.4 Added support for AIX .. versionchanged:: 2018.3.0 Added support for NetBSD and OpenBSD CLI Example: .. code-block:: bash salt '*' status.cpuinfo def cpuinfo(): ''' ...
.. versionchanged:: 2016.3.2 Return the disk stats for this minion .. versionchanged:: 2016.11.4 Added support for AIX CLI Example: .. code-block:: bash salt '*' status.diskstats def diskstats(): ''' .. versionchanged:: 2016.3.2 Return the disk stats for this min...
Return the disk usage for this minion Usage:: salt '*' status.diskusage [paths and/or filesystem types] CLI Example: .. code-block:: bash salt '*' status.diskusage # usage for all filesystems salt '*' status.diskusage / /tmp # usage for / and /tmp salt '*' statu...
.. versionchanged:: 2016.3.2 Return the virtual memory stats for this minion .. versionchanged:: 2016.11.4 Added support for AIX CLI Example: .. code-block:: bash salt '*' status.vmstats def vmstats(): ''' .. versionchanged:: 2016.3.2 Return the virtual memory st...
Return the number of processing units available on this system .. versionchanged:: 2016.11.4 Added support for AIX .. versionchanged:: 2018.3.0 Added support for Darwin, FreeBSD and OpenBSD CLI Example: .. code-block:: bash salt '*' status.nproc def nproc(): ''' Ret...
Return the network stats for this minion .. versionchanged:: 2016.11.4 Added support for AIX .. versionchanged:: 2018.3.0 Added support for OpenBSD CLI Example: .. code-block:: bash salt '*' status.netstats def netstats(): ''' Return the network stats for this minio...