Top Related Projects
Interactive Redis: A Terminal Client for Redis with AutoCompletion and Syntax Highlighting.
Linux/OSX/FreeBSD resource monitor
Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.
Linux Kernel Manager and Activity Monitor 🐧💻
Quick Overview
gping is a ping utility with a graph-like output, providing a visual representation of network latency over time. It's designed to be a more intuitive and informative alternative to the traditional ping command, allowing users to easily monitor network performance in real-time.
Pros
- Visual representation of ping results, making it easier to spot trends and anomalies
- Supports pinging multiple hosts simultaneously
- Cross-platform compatibility (Windows, macOS, Linux)
- Written in Rust, offering good performance and memory safety
Cons
- May require additional system resources compared to the standard ping command
- Learning curve for users accustomed to traditional ping output
- Limited customization options compared to some advanced network monitoring tools
Getting Started
To install gping, you can use one of the following methods:
- Using Homebrew (macOS and Linux):
brew install gping
- Using Scoop (Windows):
scoop install gping
- Using Cargo (Rust package manager):
cargo install gping
Once installed, you can start using gping by running:
gping example.com
To ping multiple hosts:
gping example.com google.com
For more options and usage information, run:
gping --help
Competitor Comparisons
Interactive Redis: A Terminal Client for Redis with AutoCompletion and Syntax Highlighting.
Pros of iredis
- iredis provides a more comprehensive set of features for interacting with Redis, including support for various Redis data structures and commands.
- iredis has a more intuitive and user-friendly command-line interface, making it easier for users to navigate and execute Redis operations.
- iredis includes built-in support for syntax highlighting and auto-completion, enhancing the overall user experience.
Cons of iredis
- iredis is a Python-based tool, which may not be as performant as a compiled language like Rust used in gping.
- iredis may have a larger memory footprint compared to gping, as it is a full-fledged application rather than a lightweight utility.
- iredis may have a steeper learning curve for users who are more familiar with command-line tools written in Rust or other lower-level languages.
Code Comparison
iredis:
import iredis
r = iredis.Redis()
r.set('key', 'value')
print(r.get('key'))
gping:
use gping::Pinger;
fn main() {
let mut pinger = Pinger::new("google.com").unwrap();
let res = pinger.ping().unwrap();
println!("RTT: {:?}", res.min_rtt);
}
Linux/OSX/FreeBSD resource monitor
Pros of bpytop
- Comprehensive system monitoring with CPU, memory, network, and processes
- Highly customizable interface with themes and color schemes
- More visually appealing with graphs and charts
Cons of bpytop
- Higher resource usage due to its comprehensive nature
- Steeper learning curve with more features and options
- Requires Python and additional dependencies
Code Comparison
bpytop (Python):
def get_cpu_freq():
freq = {}
try:
with open("/proc/cpuinfo", "r") as f:
for line in f:
if "cpu MHz" in line:
freq[psutil.Process().cpu_num()] = float(line.split(":")[1].strip())
except:
pass
return freq
gping (Rust):
fn ping(host: &str) -> Result<Duration, Error> {
let mut pinger = Pinger::new()?;
pinger.ping(host, 1, 64)?;
let mut iter = pinger.iter_recv();
let (_packet, duration) = iter.next().ok_or(Error::Timeout)??;
Ok(duration)
}
bpytop offers a more comprehensive system monitoring solution with a rich interface, while gping focuses specifically on ping functionality with a graphical representation. bpytop is written in Python, making it more accessible for customization but potentially slower, whereas gping is implemented in Rust, offering better performance for its specific use case.
Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.
Pros of Glances
- Comprehensive system monitoring with a wide range of metrics (CPU, memory, network, processes, etc.)
- Cross-platform support (Linux, macOS, Windows)
- Web-based interface and REST API for remote monitoring
Cons of Glances
- More complex setup and configuration compared to gping
- Higher resource usage due to its comprehensive monitoring capabilities
- Steeper learning curve for users who only need simple ping functionality
Code Comparison
Glances (Python):
from glances_api import GlancesApi
glances = GlancesApi(host='localhost', port=61208)
cpu_percent = glances.getCpu()['total']
print(f"CPU usage: {cpu_percent}%")
gping (Rust):
use gping::ping;
let result = ping("example.com", None).unwrap();
println!("Ping time: {} ms", result.time.as_millis());
While Glances offers a more comprehensive API for system monitoring, gping focuses specifically on ping functionality with a simpler interface. Glances is better suited for users needing extensive system monitoring, while gping is ideal for those primarily interested in network latency measurements.
Linux Kernel Manager and Activity Monitor 🐧💻
Pros of kmon
- Provides a more comprehensive system monitoring solution, including CPU, memory, and network usage
- Offers a customizable interface with color-coded information and real-time updates
- Includes kernel module management features, allowing users to load/unload modules
Cons of kmon
- May be more resource-intensive due to its broader monitoring scope
- Has a steeper learning curve for users unfamiliar with kernel module management
- Less focused on network latency monitoring compared to gping
Code Comparison
kmon:
pub fn new() -> Result<Kernel> {
Ok(Kernel {
modules: KernelModules::new()?,
info: KernelInfo::new()?,
})
}
gping:
pub fn new(host: String) -> Ping {
Ping {
host,
history: VecDeque::with_capacity(60),
}
}
Both projects use Rust and implement a new()
function for their main structures. kmon's implementation is more complex, initializing multiple components, while gping's is simpler, focusing on a single host and ping history.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
gping ð
Ping, but with a graph.
Comes with the following super-powers:
- Graph the ping time for multiple hosts
- Graph the execution time for commands via the
--cmd
flag - Custom colours
- Windows, Mac and Linux support
Table of Contents
Install :cd:
- macOS
- Linux (Homebrew):
brew install gping
- CentOS (and other distributions with an old glibc): Download the MUSL build from the latest release
- Windows/ARM:
- Scoop:
scoop install gping
- Chocolatey:
choco install gping
- Download the latest release from the github releases page
- Scoop:
- Fedora (COPR):
sudo dnf copr enable atim/gping -y && sudo dnf install gping
- Cargo (This requires
rustc
version 1.67.0 or greater):cargo install gping
- Arch Linux:
pacman -S gping
- Alpine linux:
apk add gping
- Ubuntu >23.10/Debian >13:
apt install gping
- Ubuntu/Debian (Azlux's repo):
echo 'deb [signed-by=/usr/share/keyrings/azlux.gpg] https://packages.azlux.fr/debian/ bookworm main' | sudo tee /etc/apt/sources.list.d/azlux.list
sudo apt install gpg
curl -s https://azlux.fr/repo.gpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/azlux.gpg > /dev/null
sudo apt update
sudo apt install gping
- Gentoo (dm9pZCAq overlay):
sudo eselect repository enable dm9pZCAq
sudo emerge --sync dm9pZCAq
sudo emerge net-misc/gping::dm9pZCAq
# Check all options
docker run --rm -ti --network host ghcr.io/orf/gping:gping-v1.15.1 --help
# Ping google.com
docker run --rm -ti --network host ghcr.io/orf/gping:gping-v1.15.1 google.com
- Flox:
# Inside of a Flox environment
flox install gping
Usage :saxophone:
Just run gping [host]
. host
can be a command like curl google.com
if the --cmd
flag is used. You can also use
shorthands like aws:eu-west-1
or aws:ca-central-1
to ping specific cloud regions. Only aws
is currently supported.
$ gping --help
Ping, but with a graph.
Usage: gping [OPTIONS] [HOSTS_OR_COMMANDS]...
Arguments:
[HOSTS_OR_COMMANDS]... Hosts or IPs to ping, or commands to run if --cmd is provided. Can use cloud shorthands like aws:eu-west-1.
Options:
--cmd
Graph the execution time for a list of commands rather than pinging hosts
-n, --watch-interval <WATCH_INTERVAL>
Watch interval seconds (provide partial seconds like '0.5'). Default for ping is 0.2, default for cmd is 0.5.
-b, --buffer <BUFFER>
Determines the number of seconds to display in the graph. [default: 30]
-4
Resolve ping targets to IPv4 address
-6
Resolve ping targets to IPv6 address
-i, --interface <INTERFACE>
Interface to use when pinging
-s, --simple-graphics
Uses dot characters instead of braille
--vertical-margin <VERTICAL_MARGIN>
Vertical margin around the graph (top and bottom) [default: 1]
--horizontal-margin <HORIZONTAL_MARGIN>
Horizontal margin around the graph (left and right) [default: 0]
-c, --color <color>
Assign color to a graph entry. This option can be defined more than once as a comma separated string, and the order which the colors are provided will be matched against the hosts or commands passed to gping. Hexadecimal RGB color codes are accepted in the form of '#RRGGBB' or the following color names: 'black', 'red', 'green', 'yellow', 'blue', 'magenta','cyan', 'gray', 'dark-gray', 'light-red', 'light-green', 'light-yellow', 'light-blue', 'light-magenta', 'light-cyan', and 'white'
-h, --help
Print help information
-V, --version
Print version information
--clear
Clear the graph from the terminal after closing the program
Top Related Projects
Interactive Redis: A Terminal Client for Redis with AutoCompletion and Syntax Highlighting.
Linux/OSX/FreeBSD resource monitor
Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.
Linux Kernel Manager and Activity Monitor 🐧💻
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot