Skip to main content

No project description provided

Project description

systemstat

use http requests to check the status of a system

Installation

pip install systemstat

Or from this repo:

pip install git+https://github.com/dskard/systemstat.git

Example Usage:

Use gridstat3 to check if a Selenium Grid 3 has nodes attached and is ready to accept requests

$ gridstat3 --wait 4 --url http://localhost:4444 --verbose --stdout

2022-08-21 18:07:06,714 starting gridstat3
2022-08-21 18:07:06,714 command line options: ['--wait', '4', '--url', 'http://localhost:4444', '--verbose', '--stdout']
2022-08-21 18:07:06,714 checking status of http://localhost:4444
2022-08-21 18:07:06,714 starting at 2022-08-21 18:07:06.714839
2022-08-21 18:07:06,714 ending at 2022-08-21 18:07:10.714839
2022-08-21 18:07:06,721 hub is up at http://localhost:4444/grid/api/hub
2022-08-21 18:07:06,721 2 of 2 nodes are attached
2022-08-21 18:07:06,721 all nodes are attached
2022-08-21 18:07:06,721 2 of 2 nodes are ready
2022-08-21 18:07:06,721 all nodes are ready

Use gridstat4 to check if a Selenium Grid 4 has nodes attached and is ready to accept requests

$ gridstat4 --wait 4 --url http://localhost:4444 --verbose --stdout

2022-08-21 18:48:47,497 starting gridstat4
2022-08-21 18:48:47,497 command line options: ['--wait', '4', '--url', 'http://localhost:4444', '--verbose', '--stdout']
2022-08-21 18:48:47,497 checking status of http://localhost:4444
2022-08-21 18:48:47,497 starting at 2022-08-21 18:48:47.497451
2022-08-21 18:48:47,497 ending at 2022-08-21 18:48:51.497451
2022-08-21 18:48:47,545 hub is up at http://localhost:4444/wd/hub/status
2022-08-21 18:48:47,545 all nodes are ready

Use sutstat to check if a system is listening on port 4444

$ sutstat --wait 4 --url http://localhost:4444 --verbose --stdout

2022-08-21 18:08:25,344 starting sutstat
2022-08-21 18:08:25,344 command line options: ['--wait', '4', '--url', 'http://localhost:4444', '--verbose', '--stdout']
2022-08-21 18:08:25,345 checking status of http://localhost:4444
2022-08-21 18:08:25,345 starting at 2022-08-21 18:08:25.345155
2022-08-21 18:08:25,345 ending at 2022-08-21 18:08:29.345155
2022-08-21 18:08:25,359 System under test is up at http://localhost:4444

Development

Creating a Python virtual environment:

make pyenv

Installing the development dependencies and current version of the library:

make install

Running the test cases:

make test

Running the command line tools through the development environment:

poetry run gridstat3 --wait 4 --url http://localhost:4444 --verbose --stdout
poetry run gridstat4 --wait 4 --url http://localhost:4444 --verbose --stdout
poetry run sutstat --wait 4 --url http://localhost:8080 --verbose --stdout

Clean logs and Python cache files

make clean

Project details


Download files

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

Source Distribution

systemstat-0.0.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

systemstat-0.0.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file systemstat-0.0.1.tar.gz.

File metadata

  • Download URL: systemstat-0.0.1.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.8.2 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for systemstat-0.0.1.tar.gz
Algorithm Hash digest
SHA256 7b76f2d5c704d6341e6fe4a087c9aa85c8c8f3b03721229e511e9e7e80ca01fa
MD5 6c833c78d01d9c5a4a723021d32d60c8
BLAKE2b-256 3f2bb5f01e0eedf3cf0e9cf3ecc5aeac8e6e2b753d85155c7ea062a22ba9e4bf

See more details on using hashes here.

File details

Details for the file systemstat-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: systemstat-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.8.2 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for systemstat-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6c083a37789eb609ee46abceefeb4dc14a05386186ca9677d1a7f026b6ffb82c
MD5 3631dc479a5120335af193c14dac46e9
BLAKE2b-256 cbb246d97177c8c55761399eee7a0019073444f35d9e6880c57cae68b4c0625b

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