2019-06-22 20:38:00 +00:00
## Objective
2019-06-23 08:03:11 +00:00
To streamline troubleshooting of remote Internet-in-a-Box (IIAB) installations, we bundle up common machine/software diagnostics, all together in 1 human-readable small file, that can be easily circulated online AND offline.
2020-04-15 13:47:50 +00:00
Passwords (including Wi-Fi passwords) are auto-redacted from this file, to protect your community confidentiality.
The ``pastebinit`` command can then be used to auto-upload this file, creating a short URL that makes it much easier to circulate among [volunteers ](http://internet-in-a-box.org/pages/contributing.html ).
2019-06-23 08:03:11 +00:00
2019-10-13 16:21:23 +00:00
But first off, the file is compiled by harvesting 1 + 6 kinds of things:
2019-10-13 16:45:57 +00:00
0. Filename Header + Git Hashes + Raspberry Pi Model + OS
2019-06-23 08:03:11 +00:00
2019-06-23 08:35:53 +00:00
1. Files specially requested (if you run ``sudo iiab-diagnostics PATH/FILE1 PATH/FILE2``)
2019-06-23 08:03:11 +00:00
2. Regular Files
2019-10-13 16:21:23 +00:00
3. Content of Directories (1-level deep)
4. Output of Commands
2019-06-23 08:03:11 +00:00
2019-10-13 16:21:23 +00:00
5. Firewall Rules
2019-06-23 08:03:11 +00:00
2019-10-13 16:21:23 +00:00
6. Log Files (last 100 lines of each)
2019-06-23 08:03:11 +00:00
## Usage
1. Run it as follows:
2019-06-22 20:38:00 +00:00
2019-10-12 23:34:38 +00:00
```
iiab-diagnostics
```
Better yet, for [more complete results ](https://github.com/iiab/iiab/pull/2000#issue-327506999 ), run it as root:
2019-06-22 20:38:00 +00:00
```
sudo iiab-diagnostics
```
2019-10-12 23:34:38 +00:00
To bundle in yet more files, run:
2019-06-23 08:03:11 +00:00
```
2019-06-23 08:35:53 +00:00
sudo iiab-diagnostics PATH/FILE1 PATH/FILE2 ...
2019-06-23 08:03:11 +00:00
```
2019-06-23 08:35:53 +00:00
( All diagnostics will be bundled up into a single human-readable file, placed in: /etc/iiab/diag/ )
2019-06-22 20:38:00 +00:00
2019-10-12 23:34:38 +00:00
2. Make sure you're online, as you will be prompted to auto-publish your newly-compiled diagnostics file to a web pastebin.
Or, you can later/manually upload it using the ``pastebinit`` command:
2019-06-22 20:38:00 +00:00
```
2020-08-05 20:23:24 +00:00
pastebinit -b sprunge.us < /etc/iiab/diag/NEW-FILE-NAME
2019-06-22 20:38:00 +00:00
```
2019-10-12 23:34:38 +00:00
Either way, this will generate an actual web link (URL).
2019-06-22 20:38:00 +00:00
2019-06-23 08:35:53 +00:00
3. Post this link (URL) to a "New issue" at https://github.com/iiab/iiab/issues
2019-06-22 20:38:00 +00:00
Include a description of the symptoms, and how to reproduce the problem.
4. If you don't understand Step 3, email everything to bugs@iiab.io instead.
2019-06-23 08:03:11 +00:00
## Source Code
2020-06-07 07:29:36 +00:00
Please look over the bottom of [iiab-diagnostics ](iiab-diagnostics ) (lines 105-218 especially) to learn more about which common IIAB files and commands make this rapid troubleshooting possible.