Module for interfacing with SysFS
New in version 2016.3.0.
salt.modules.sysfs.attr(key, value=None)¶Access/write a SysFS attribute. If the attribute is a symlink, it's destination is returned
| Returns: | value or bool |
|---|
salt '*' sysfs.attr block/sda/queue/logical_block_size
salt.modules.sysfs.interfaces(root)¶Generate a dictionary with all available interfaces relative to root. Symlinks are not followed.
salt '*' sysfs.interfaces block/bcache0/bcache
Note
salt.modules.sysfs.read(key, root='')¶Read from SysFS
| Parameters: | key -- file or path in SysFS; if key is a list then root will be prefixed on each key |
|---|---|
| Returns: | the full (tree of) SysFS attributes under key |
salt '*' sysfs.read class/net/em1/statistics
salt.modules.sysfs.target(key, full=True)¶Return the basename of a SysFS key path
| Parameters: |
|
|---|---|
| Returns: | fullpath or basename of path |
salt '*' sysfs.read class/ttyS0
salt.modules.sysfs.write(key, value)¶Write a SysFS attribute/action
salt '*' sysfs.write devices/system/cpu/cpu0/cpufreq/scaling_governor 'performance'