Skip to content
/ rgtping Public

ping(8) equivalent for GTPv1-U (3GPP TS 29.281)

License

Notifications You must be signed in to change notification settings

0x6b/rgtping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rgtping

ping(8) equivalent for GTPv1-U (3GPP TS 29.281).

Warning

Error handling is not really implemented. This is a toy project for my own learning. Not recommended for production monitoring.

Warning

If you are time-sensitive, please avoid using this multithreaded and asynchronous implementation of gtping. A large number of asynchronous events waiting to wake up can lead to inaccurate timing calculations. Instead, you can use the original gtping command directly.

Features

  • Send GTPv1-U Echo request to multiple endpoints simultaneously.
  • Output is an array of JSON objects, one for each endpoint e.g.
    [
      {
        "target": "192.168.205.10:2152", /// Gtping target IP address
        "epoch_ms": 1726372276714, /// Epoch time of the start of the command, in milliseconds
        "duration": 3026.165084, /// Total duration in milliseconds
        "sent": 3, /// Number of sent packets (including lost)
        "received": 3, /// Number of received packets
        "packet_loss_percentage": 0.0, /// Packet loss percentage
        "duplicate_packets": 0, /// Number of duplicate packets
        "refused_packets": 0, /// Number of refused packets
        "timed_out_packets": 0, /// Number of timed out packets
        "min": 0.0, /// Minimum RTT in milliseconds
        "max": 14.750917000000001, /// Maximum RTT in milliseconds
        "avg": 5.607903, /// Average RTT in milliseconds
        "mdev": 6.4650903803150355 /// Mean deviation of RTT in milliseconds
      }
      // ...
    ]

Usage

$ rgtping --help
ping(8) equivalent for GTPv1-U (3GPP TS 29.281).

Usage: rgtping [OPTIONS] [TARGET_IPS]...

Arguments:
  [TARGET_IPS]...  An array of IP addresses and port numbers (IP:port) to ping,
                   separated by spaces. If a port is not specified, it defaults to 2152

Options:
  -c, --count <COUNT>
          Number of pings to send [default: 5]
  -i, --interval-ms <INTERVAL_MS>
          Interval between pings in milliseconds [default: 1000]
  -W, --timeout-ms <TIMEOUT_MS>
          Time to wait for a response, in milliseconds. 0 means wait indefinitely
          [default: 10000]
  -f, --format <FORMAT>
          Output format, either "json" or "text" [default: json]
  -h, --help
          Print help
  -V, --version
          Print version

Acknowledgement

LICENSE

GPLv2, as the original gtping. See LICENSE for detail.

About

ping(8) equivalent for GTPv1-U (3GPP TS 29.281)

Resources

License

Stars

Watchers

Forks

Languages