Skip to main content

pesping

Concurrent IPv4 ICMP scanner and network upgrade monitor · Version 1.1.0

Español · Publishing guide / Guía de publicación

pesping checks single hosts, files of hosts, IPv4 CIDR subnets, and inclusive IP ranges. Use a one-time scan to see reachable addresses or continuous monitoring to track device outages and recoveries during network maintenance.

Requirements

  • Python 3.10 or newer.
  • Windows, Linux, or macOS with the system ping command available.
  • Optional colorama for colored terminal output (installed automatically on Windows).

Installation

After the package has been published to PyPI:

python -m pip install pesping
pesping --help

From source before PyPI publication:

git clone https://github.com/jpesqueda/pesping.git
cd pesping
python -m pip install -e .
pesping --help

Target options

Exactly one target source is required.

Argument Meaning Example
-ho, --host One IP address or hostname -ho 192.0.2.10
-hf, --host_file UTF-8 host file -hf hosts.txt
-r, --range Inclusive range, full or short form -r 192.0.2.100-200
-s, --subnet IPv4 CIDR network -s 198.51.100.0/26

Both -r 192.0.2.100-192.0.2.200 and -r 192.0.2.100-200 select 101 IPs. To cross an octet boundary, use the full ending IP. CIDR enumeration excludes network/broadcast for ordinary subnets, while /31 and /32 follow Python's ipaddress.hosts() behavior.

Examples

pesping -ho 192.0.2.10
pesping -hf hosts.txt --show down
pesping -r 192.0.2.100-200 --show up
pesping -r 192.0.2.100-192.0.2.200
pesping -s 198.51.100.0/26 --workers 20
pesping -s 192.0.2.0/24 --monitor --only-changes
pesping -hf hosts.txt --monitor --interval 2 --fail-threshold 3 --recovery-threshold 2 --log upgrade.log --csv upgrade.csv
pesping -hf hosts.txt --stop-when-all-up --only-changes

Host file format

# One target per line, or optional friendly-name,address
switch01.example.test,192.0.2.10
switch02.example.test,192.0.2.11
192.0.2.12

Blank lines and lines starting with # are ignored; duplicate addresses are skipped.

Monitoring behavior

A target changes to DOWN after --fail-threshold consecutive failed ICMP probes (default 3); it changes to UP after --recovery-threshold consecutive replies (default 2). --only-changes suppresses cycle totals while retaining events. --wait-for-up exits once all targets reach UP. --stop-when-all-up exits after a DOWN event was observed and every target has recovered. Use Ctrl+C to stop and print a summary.

--show all|up|down filters one-time scan results only. --workers controls concurrency (default 50), --timeout controls the probe timeout (default 1 second), --interval controls monitoring intervals (default 2 seconds), and --max-hosts limits scan size (default 4096). Run pesping --help for exact options.

Output

  • Single scans show each selected target and a summary with total/reachable/unreachable counts.
  • Monitoring logs state transitions, outage counts, accumulated downtime, and final per-device states.
  • --log FILE stores timestamped text events; --csv FILE writes timestamp, event, host, address, status, outage count, and downtime.

Important limitations

A failed ICMP reply does not prove that a host is down: firewalls and rate limiting can block ping. An ICMP response does not prove that applications or routing protocols are healthy. Outages are estimates based on the monitoring process's probes, not precise device event times.

All addresses and hostnames shown here are fictional documentation examples from RFC 5737 and the reserved .test domain. Only scan systems you are authorized to test. Runtime logs/CSVs may contain actual host information and should be protected.

Development

python -m pip install -e . pytest build twine
python -m pytest -q
python -m build
python -m twine check dist/*

License: MIT. Maintainer: jpesqueda.

Metadata

Release files for pesping 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pesping 1.1.0
File Size Uploaded Provenance Actions
pesping-1.1.0.tar.gz 11.2 kB With provenance Details for pesping-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pesping 1.1.0
File Interpreter ABI Platform Actions
pesping-1.1.0-py3-none-any.whl Python 3 none any Details for pesping-1.1.0-py3-none-any.whl

Total release size: 22.4 kB

Release files / pesping-1.1.0.tar.gz

Download URL pesping-1.1.0.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
308d13b522f37bb8ccc816b537a38399012ad4016ba77573ba4bf866f688d795
BLAKE2b-256 checksum
How to use checksums
da81ae245de9b8b73c69f3fa4dd6124a20666fd26282241dcbd694401ffb9acd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / pesping-1.1.0-py3-none-any.whl

Download URL pesping-1.1.0-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1185933d8eff8a154789abd3383fb6a9b4c0142c84b5eeb60cc6128022329bc8
BLAKE2b-256 checksum
How to use checksums
24e5036674867c197eddc56f89294636685d35018d491cecbe98fefa40c5f357
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Security for pesping 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pesping-1.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page