salt.modules.win_status

Module for returning various status data about a minion. These data can be useful for compiling into stats later, or for problem solving if your minion is having problems.

0.12.0 新版功能.

depends:
  • pythoncom
  • wmi
salt.modules.win_status.cpuload()

2015.8.0 新版功能.

Return the processor load as a percentage

CLI 范例:

salt '*' status.cpuload
salt.modules.win_status.diskusage(human_readable=False, path=None)

2015.8.0 新版功能.

Return the disk usage for this minion

human_readable : False
If True, usage will be in KB/MB/GB etc.

CLI 范例:

salt '*' status.diskusage path=c:/salt
salt.modules.win_status.master(master=None, connected=True)

2015.5.0 新版功能.

Fire an event if the minion gets disconnected from its master. This function is meant to be run via a scheduled job from the minion. If master_ip is an FQDN/Hostname, is must be resolvable to a valid IPv4 address.

CLI 范例:

salt '*' status.master
salt.modules.win_status.procs(count=False)

Return the process data

count : False

If True, this function will simply return the number of processes.

2015.8.0 新版功能.

CLI 范例:

salt '*' status.procs
salt '*' status.procs count
salt.modules.win_status.saltmem(human_readable=False)

2015.8.0 新版功能.

Returns the amount of memory that salt is using

human_readable : False
return the value in a nicely formated number

CLI 范例:

salt '*' status.saltmem
salt '*' status.saltmem human_readable=True
salt.modules.win_status.uptime(human_readable=False)

2015.8.0 新版功能.

Return the system uptime for this machine in seconds

human_readable : False
If True, then return uptime in years, days, and seconds.

CLI 范例:

salt '*' status.uptime
salt '*' status.uptime human_readable=True