watchme.watchers.psutils package

Submodules

watchme.watchers.psutils.tasks module

Copyright (C) 2019 Vanessa Sochat.

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

watchme.watchers.psutils.tasks.cpu_task(**kwargs)[source]

Get variables about the cpu of the host. No parameters are required.

Parameters

skip (an optional list of (comma separated) fields to skip. Can be in) – net_io_counters,net_connections,net_if_address,net_if_stats

watchme.watchers.psutils.tasks.disk_task(**kwargs)[source]

Get values for disks on the host

Parameters
  • disk_usage (an optional path to get disk usage for.)

  • skip (an optional list of (comma separated) fields to skip. Can be in) – net_io_counters,net_connections,net_if_address,net_if_stats

watchme.watchers.psutils.tasks.memory_task(**kwargs)[source]

Get values for memory of the host. No parameters are required.

watchme.watchers.psutils.tasks.monitor_pid_task(**kwargs)[source]

monitor a specific process. This function can be used as a task, or is (most likely used) for the psutils.decorators. A pid parameter is required.

Parameters
  • skip (an optional list of (comma separated) fields to skip. Can be in) – net_io_counters,net_connections,net_if_address,net_if_stats

  • pid (the process id or name (required))

watchme.watchers.psutils.tasks.net_task(**kwargs)[source]

Get values for networking on the host

Parameters

skip (an optional list of (comma separated) fields to skip. Can be in) – net_io_counters,net_connections,net_if_address,net_if_stats

watchme.watchers.psutils.tasks.python_task(**kwargs)[source]

Get modules, version, etc. about currently running python

Parameters

skip (an optional list of (comma separated) fields to skip. Can be in) – net_io_counters,net_connections,net_if_address,net_if_stats

watchme.watchers.psutils.tasks.sensors_task(**kwargs)[source]

Get values from system sensors like fans, temperature, battery

watchme.watchers.psutils.tasks.system_task(**kwargs)[source]

Get basic system info, unlikely to change.

Parameters

skip (an optional list of (comma separated) fields to skip. Can be in) – net_io_counters,net_connections,net_if_address,net_if_stats

watchme.watchers.psutils.tasks.users_task(**kwargs)[source]

Get values for current users

Module contents

Copyright (C) 2019 Vanessa Sochat.

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

class watchme.watchers.psutils.Task(name, params=None, **kwargs)[source]

Bases: watchme.tasks.TaskBase

export_func()[source]

this function should return the correct task (from the tasks.py in the same folder) based on some logic of the params that are given by the user (self.params). If there is only one kind of function for the task, it’s fairly easy to import and return it here. This function should take no arguments, but instead use the self.params already provided in the client.

required_params = []