Skip to main content

pyspectator is a Python cross-platform tool for monitoring OS resources.

Project description

Summary

pyspectator is a Python cross-platform tool for monitoring resources of OS: CPU, memory, disk, network.

Requirements

  • OS: Linux, Windows, FreeBSD, Solaris

  • Python version: 3.X

  • Packages: psutil, netifaces, wmi (only on Windows), enum34 (only on python 3.0.0 - 3.4.0)

  • For Windows OS Microsoft Visual C++ 10.0 or higher is required

How to install

Run as root user:

pip install pyspectator

Example of usage

There is simple project named pyspectator_tornado developed special for demonstration of pyspectator features.

General information CPU Disk devices Network

How to use

You can use pyspectator as module for your own project. Simple example of usage is presented in file “console.py”.

NOTE: on Windows pyspectator can require elevated privileges.

Class “Computer”

>>> from pyspectator.computer import Computer
>>> computer = Computer()
>>> computer.os
'Linux 3.14.4-1-MANJARO'
>>> computer.python_version
'CPython ver. 3.4.1'
>>> computer.uptime
'1:07:52'
>>> computer.processor.name
'Intel(R) Core(TM) i3-3110M CPU @ 2.40GHz'

Class “Cpu”

>>> from pyspectator.processor import Cpu
>>> from time import sleep
>>> cpu = Cpu(monitoring_latency=1)
>>> with cpu:
...     for _ in range(8):
...        cpu.load, cpu.temperature
...        sleep(1.1)
...
(22.6, 55)
(6.1, 55)
(5.5, 54)
(7.1, 54)
(5.6, 54)
(7.0, 54)
(10.2, 54)
(6.6, 54)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyspectator-1.2.2.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

pyspectator-1.2.2-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file pyspectator-1.2.2.tar.gz.

File metadata

  • Download URL: pyspectator-1.2.2.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

File hashes

Hashes for pyspectator-1.2.2.tar.gz
Algorithm Hash digest
SHA256 28fa6911de96e81cb61d5fa67b7940d432581edc3c26c44a7a80c374bf8bc939
MD5 6cba73115fbe93bf667953638eac9f7d
BLAKE2b-256 90aeecdbf52d6dde87ff9f6b7e09e4c5b6a5af40a738488f998167ba32500f0e

See more details on using hashes here.

File details

Details for the file pyspectator-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: pyspectator-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

File hashes

Hashes for pyspectator-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7e4728c5a65f63e927b31d1179c3503940038ec8b823e9cc3ea5631e9e04a6a2
MD5 23059eebf5165c132330ef2aaff1df18
BLAKE2b-256 b81e24f2e6af686e8faf95c6081277b3743d76d4be8d10fa1ecd0085cf6ccabd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page