Module for interfacing with SysFS
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
| 返回: | 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
注解
salt.modules.sysfs.read(key, root='')¶Read from SysFS
| 参数: | key -- file or path in SysFS; if key is a list then root will be prefixed on each key | 
|---|---|
| 返回: | 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
| 参数: | 
 | 
|---|---|
| 返回: | 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'