Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/laixintao/pingtop
๐Ping multiple servers and show results in a top-like terminal UI.
https://github.com/laixintao/pingtop
icmp ping top tui
Last synced: 4 days ago
JSON representation
๐Ping multiple servers and show results in a top-like terminal UI.
- Host: GitHub
- URL: https://github.com/laixintao/pingtop
- Owner: laixintao
- License: mit
- Created: 2019-04-01T14:42:20.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-09-23T04:51:45.000Z (about 2 years ago)
- Last Synced: 2024-10-30T10:40:13.644Z (14 days ago)
- Topics: icmp, ping, top, tui
- Language: Python
- Homepage: https://pypi.org/project/pingtop/
- Size: 183 KB
- Stars: 502
- Watchers: 12
- Forks: 37
- Open Issues: 8
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
- awesome-list - pingtop - like terminal UI. | laixintao | 361 | (Python)
README
pingtop
=======Ping multiple servers and show the result in a top like terminal UI.
|asciicast|
Install
-------::
pip install pingtop
** pingtop support Python3.8 Python3.8. **
There is a dependency (`blist `) not supporting Python3.9, so please pingtop can't support 3.9.
Usage
-----Then ping mutiple server:
::
pingtop baidu.com google.com twitter.com
This project is using
`click `__. Check help info
with ``pingtop -h``.::
~ pingtop --help
Usage: pingtop [OPTIONS] [HOST]...Options:
-s, --packetsize INTEGER specify the number of data bytes to be sent.
The default is 56, which translates into 64
ICMP data bytes when combined with the 8
bytes of ICMP header data. This option
cannot be used with ping sweeps. [default:
56]
-l, --logto PATH
-v, --log-level [DEBUG|INFO|WARNING|ERROR|CRITICAL]
--help Show this message and exit.Why do I get ``Permission denied`` ?
------------------------------------We use ICMP socket to send ping packet without ``sudo`` (See `this
post `__
by lilydjwg(in Chinese)), however, who(which group) can use this feature
is controled by a kernel parameter: ``net.ipv4.ping_group_range``.::
cat /proc/sys/net/ipv4/ping_group_range
1 0
The default value is ``1 0``, this means the whose group number from 1
to 0 can use this feature(which means nobody can use this), so you get a
Permission denied .To fix this, change this variable to a proper range include your group
id, like this:::
[vagrant@centos7 pingtop]$ id
uid=1000(vagrant) gid=1000(vagrant) groups=1000(vagrant) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023[vagrant@centos7 pingtop]$ sudo sysctl -w net.ipv4.ping_group_range='0 1001'
net.ipv4.ping_group_range = 0 1001Credits
-------- For the credits of ping.pyโs implementation please refer
`ping.py <./pingtop/ping.py>`__.
- The UI was built on `panwid `__
thanks to @tonycpsu.
- @\ `gzxultra `__ helped to solve the
permission issues... |CircleCI| image:: https://circleci.com/gh/laixintao/pingtop.svg?style=svg
:target: https://circleci.com/gh/laixintao/pingtop
.. |asciicast| image:: https://asciinema.org/a/onbBCmHzhltau7iqButUGx6yu.svg
:target: https://asciinema.org/a/onbBCmHzhltau7iqButUGx6yu