Skip to main content

Changes monitor for shell command outputs

Project description

diffs

GitHub version PyPI version

diffs monitors for any changes in arbitrary shell command output between the initial state and the current output.

Installation

pip3 install diffs

Python 3.6 (or newer) is required.

Usage

diffs CMD

The initial CMD output is stored at the beginning. Then the command is run again periodically and the output is compared against the initial output. If there are differences, they are shown in the standard diff format. The unchaged lines are not shown.

Examples

Show how many packets have been sent since the script has been started:
diffs ifconfig wlp2s0
diffs demo ifconfig

Find new applications opening network ports (shows only changes between the initial state):
diffs sudo netstat -tulpn
diffs demo netstat

Monitor changes in a file:

$ diffs cat /etc/resolv.conf

Difference between starting date and the current date:
diffs date
diffs demo date

Finding newly spawned processes:
diffs ps a -o pid,cmd
diffs demo ps

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

diffs-0.2.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

diffs-0.2.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file diffs-0.2.0.tar.gz.

File metadata

  • Download URL: diffs-0.2.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for diffs-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ce1513ff88d061d02eb65273158285975ebed57ebb7f329a3cb727625620438e
MD5 f4bdc27ab4ff2c070659d3c98289aa87
BLAKE2b-256 5f17327147e74c5fd0dd2db246e6ea2abf33985a5b603a1b9fe563c12fa8946d

See more details on using hashes here.

File details

Details for the file diffs-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: diffs-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for diffs-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 111000faecec3c791f42210f3bb34c96e2eabd9398b5c90d9db289d8ab79e807
MD5 ef7f07e6d4cb204503977c613e1e7912
BLAKE2b-256 76051c40d9ca602c6a77d0e3461d959d940587c9f970335b797b301c23a5d551

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