Skip to content

TarangJ/Network-Statistics-Bash-Script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Network-Statistics-Bash-Script

This is a simple Bash script that gathers and displays various network-related information on a Linux system.

Features

The script provides the following network statistics:

  1. Default Gateway: Retrieves the default gateway IP address.
  2. Primary DNS Server: Retrieves the primary DNS server IP address.
  3. External IP Address: Retrieves the external IP address of the system using an online API.
  4. Network Interfaces: Lists all network interfaces and their associated IP addresses.
  5. Network Statistics: Displays the total bytes received/transmitted and total packets received/transmitted across all network interfaces.

Usage

  1. Save the script to a file, e.g., network_stats.sh.
  2. Make the script executable with chmod +x network_stats.sh.
  3. Run the script with ./network_stats.sh.

Example Output

image

Contributing

If you have any suggestions or improvements, feel free to submit a pull request. I'd be happy to review and incorporate your changes.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages