README.md in netchk-0.0.1.beta vs README.md in netchk-0.0.1
- old
+ new
@@ -1,40 +1,68 @@
# Netchk
-Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/netchk`. To experiment with that code, run `bin/console` for an interactive prompt.
+Simple tool to troubleshoot internet connectivity issues. This tool verifies:
-TODO: Delete this and the text above, and describe your gem
+- your computer has at least one IP address
+- you have at least one DNS configured
+- you can reach the configured nameservers
+- the nameservers can resolve hosts
+Finally, some ICMP ping statistics are presented with average durations and error rates.
+
## Installation
-Add this line to your application's Gemfile:
-
-```ruby
-gem 'netchk'
+```sh
+gem install netchk
```
-And then execute:
+## Usage
- $ bundle install
+Just run `netchk` from your terminal and basic diagnosis will start showing you progress and
+any error if present.
-Or install it yourself as:
+Note: On Linux system, this gem requires `sudo` to perform the ICMP ping operations. On macOS, this is not needed.
- $ gem install netchk
+You also can configure how netchk verifies your connections by configuring a `~/.netchk.yaml` or `~/.netchk.yml` file
+like below.
-## Usage
+```yaml
+# Settings to test DNS server connectivity.
+dns:
+ # Path to resolv.conf file to check presence and connectivity of DNS.
+ # Path should be absolute to avoid issues when running netchk
+ # from different directories.
+ resolv.conf: /etc/resolv.conf
-TODO: Write usage instructions here
+# Settings to test DNS resolution.
+resolv:
+ # Path to resolv.conf file to use for testing DNS resolution.
+ # Path should be absolute to avoid issues when running netchk
+ # from different directories. It is advised to be the same
+ # as dns.resolv.conf.
+ resolv.conf: /etc/resolv.conf
+ # The list of domains to test for DNS resolution.
+ domains:
+ - google.com
+ - youtube.com
+ - facebook.com
-## Development
+# Settings to test icmp ping.
+icmp:
+ # A list of hosts to ping with ICMP. It is advised to use
+ # IP addresses instead of domains to rule out any issues with
+ # DNS resolution, which is tested separately.
+ hosts:
+ - 1.1.1.1
+ - 8.8.8.8
+ # The number of ping to issue each host.
+ count: 20
+ # The duration in seconds to wait between each ping.
+ # Setting this value too low might cause timeouts.
+ interval: 0.2
+```
-After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
+Each value is optional. If one is missing the default value will be used. The file above shows the default values.
-To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
-
## Contributing
-Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/netchk.
-
-
-## License
-
-The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
+Bug reports and pull requests are welcome on GitHub at https://github.com/moray95/netchk.