tr200 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +29 -0
- package/README.md +529 -0
- package/WINDOWS/TR-200-MachineReport.ps1 +512 -0
- package/bin/tr200.js +128 -0
- package/machine_report.sh +683 -0
- package/package.json +47 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, ES Development LLC (https://emmetts.dev)
|
|
4
|
+
Based on original work Copyright (c) 2024, U.S. Graphics, LLC.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/README.md
ADDED
|
@@ -0,0 +1,529 @@
|
|
|
1
|
+
# TR-200 Machine Report
|
|
2
|
+
SKU: TR-200, filed under Technical Reports (TR).
|
|
3
|
+
|
|
4
|
+
## What is it?
|
|
5
|
+
A machine information report by **SHAUGHNESSY V DEVELOPMENT INC.** (originally from [United States Graphics Company](https://x.com/usgraphics))
|
|
6
|
+
|
|
7
|
+
"Machine Report" is similar to Neofetch, but very basic. It's a bash script (or PowerShell on Windows) that's linked in the user's login startup script (`.bashrc`, `.zshrc`, or PowerShell profile); it displays useful machine information right in the terminal session. The report automatically displays when a user logs in, opens a new terminal, or SSHs into the machine. See installation instructions below.
|
|
8
|
+
|
|
9
|
+
<img src="https://github.com/usgraphics/TR-200/assets/8161031/2a8412dd-09de-45ff-8dfb-e5c6b6f19212" width="500" />
|
|
10
|
+
|
|
11
|
+
## ๐ Key Features
|
|
12
|
+
|
|
13
|
+
This version includes major enhancements:
|
|
14
|
+
|
|
15
|
+
- โ
**Cross-Platform**: Linux, macOS, Windows (PowerShell), BSD (partial)
|
|
16
|
+
- โ
**Multi-Shell Support**: bash, zsh (macOS default), PowerShell
|
|
17
|
+
- โ
**Auto-Run Everywhere**: Boot, login, SSH, new terminal windows
|
|
18
|
+
- โ
**Clean Uninstall**: `uninstall` command removes all configurations
|
|
19
|
+
- โ
**lastlog2 Support**: Works with modern Debian/Raspberry Pi OS (Trixie+)
|
|
20
|
+
- โ
**Non-ZFS Support**: Works on standard ext4/APFS/NTFS/other filesystems
|
|
21
|
+
- โ
**Raspberry Pi Tested**: Fully working on ARM64 systems
|
|
22
|
+
|
|
23
|
+
### Status Update
|
|
24
|
+
|
|
25
|
+
~~โผ๏ธ*** WARNING ***โผ๏ธ~~
|
|
26
|
+
|
|
27
|
+
~~Alpha release, only compatible with Debian systems with ZFS root partition running as `root` user. This is not ready for public use *at all*.~~
|
|
28
|
+
|
|
29
|
+
**โ
This fork is stable and tested on:**
|
|
30
|
+
- Raspberry Pi OS (Debian Trixie)
|
|
31
|
+
- Standard Debian systems (with or without ZFS)
|
|
32
|
+
- Non-root user installations
|
|
33
|
+
- ARM64 and x86_64 architectures
|
|
34
|
+
|
|
35
|
+
## Software Philosophy
|
|
36
|
+
Since it is a bash script, you've got the source code. Just modify that for your needs. No need for any abstractions, directly edit the code. No modules, no DSL, no config files, none of it. Single file for easy deployment. Only abstraction that's acceptable is variables at the top of the script to customize the system, but it should stay minimal.
|
|
37
|
+
|
|
38
|
+
Problem with providing tools with a silver spoon is that you kill the creativity of the users. Remember MySpace? Let people customize the hell out of it and share it. Central theme as you'll see is this:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
ENCOURAGE USERS TO DIRECTLY EDIT THE SOURCE
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
When you build a templating engine, a config file, a bunch of switches, etc; it adds 1) bloat 2) complexity 3) limits customization because by definition, customization template engine is going to be less featureful than the source code itself. So let the users just edit the source. Keep it well organized.
|
|
45
|
+
|
|
46
|
+
Another consideration is to avoid abstracting the source code at the expense of direct 1:1 readability. For e.g., the section "Machine Report" at the end of the bash script prints the output using `printf`โa whole bunch load of `printf` statements. There is no need to add loops or functions returning functions. What you see is roughly what will print. 1:1 mapping is important here for visual ID.
|
|
47
|
+
|
|
48
|
+
## Design Philosophy
|
|
49
|
+
Tabular, short, clear and concise. The tool's job is to inform the user of the current state of the system they are logging in or are operating. No emojis (except for the one used as a warning sign). No colors (as default, might add an option to add colors).
|
|
50
|
+
|
|
51
|
+
## System Compatibility
|
|
52
|
+
|
|
53
|
+
### Originally Designed For
|
|
54
|
+
- AMD EPYC CPU
|
|
55
|
+
- Debian OS
|
|
56
|
+
- ZFS installed on root partition
|
|
57
|
+
- VMWare Hypervisor
|
|
58
|
+
|
|
59
|
+
### Now Also Works On
|
|
60
|
+
- **Raspberry Pi** (ARM64 Cortex-A72)
|
|
61
|
+
- **Standard Linux** filesystems (ext4, btrfs, xfs, etc.)
|
|
62
|
+
- **Bare metal** and virtualized systems
|
|
63
|
+
- **Non-root** user installations
|
|
64
|
+
|
|
65
|
+
## Dependencies
|
|
66
|
+
- `lscpu` (usually pre-installed)
|
|
67
|
+
- `lastlog2` (modern Debian/Raspberry Pi OS) **OR** `lastlog` (legacy systems)
|
|
68
|
+
|
|
69
|
+
If your system is different, things might break. Look up the offending line and you can try to fix it for your specific system.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
# Installation
|
|
74
|
+
|
|
75
|
+
## ๐ฆ npm Install (Recommended - All Platforms)
|
|
76
|
+
|
|
77
|
+
**The easiest way to install TR-200 on any platform:**
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npm install -g tr200
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**That's it!** Now you can run:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
tr200
|
|
87
|
+
# or
|
|
88
|
+
report
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Requirements:**
|
|
92
|
+
- Node.js 14.0.0 or later
|
|
93
|
+
- bash (Linux/macOS) or PowerShell (Windows)
|
|
94
|
+
|
|
95
|
+
**What this does:**
|
|
96
|
+
- Downloads the TR-200 package from npm
|
|
97
|
+
- Creates global `tr200` and `report` commands
|
|
98
|
+
- Automatically detects your OS and runs the appropriate script
|
|
99
|
+
|
|
100
|
+
**Note:** The npm version is for on-demand use. If you want TR-200 to auto-run on terminal startup, use one of the install scripts below instead.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## โก Super Quick Install (install.sh)
|
|
105
|
+
|
|
106
|
+
**Simplest method - fully automated!**
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
cd ~/git-projects && gh repo clone RealEmmettS/usgc-machine-report && \
|
|
110
|
+
cd RealEmmettS-usgc-machine-report && ./install.sh
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
The `install.sh` script handles everything:
|
|
114
|
+
- Detects your OS and architecture
|
|
115
|
+
- Installs dependencies (lastlog2)
|
|
116
|
+
- Backs up existing installations
|
|
117
|
+
- Copies and configures the script
|
|
118
|
+
- Tests everything works
|
|
119
|
+
- Sets up the `report` alias
|
|
120
|
+
|
|
121
|
+
**That's it! Type `report` or open a new terminal to see it in action.**
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## ๐งณ Downloadable Installer Bundle (GUI-friendly)
|
|
126
|
+
|
|
127
|
+
Prefer not to touch the terminal? Download the pre-packaged zip (hosted soon at a friendly URL like `https://โฆ/tr-200-machine-report.zip`), extract it anywhere, and double-click one of these launchers inside the extracted folder:
|
|
128
|
+
|
|
129
|
+
| Platform | Launcher | What it does |
|
|
130
|
+
| --- | --- | --- |
|
|
131
|
+
| Windows | `install_windows.exe` | Runs the PowerShell installer via the bundled ps2exe executable so it works from Explorer |
|
|
132
|
+
| macOS | `install_mac.command` | Opens Terminal automatically and runs `install.sh` with full macOS detection |
|
|
133
|
+
| Linux (Debian/Ubuntu/Arch/Fedora/etc.) | `install_linux.sh` | Finds your terminal emulator, launches it, and runs `install.sh` with all the existing distro detection |
|
|
134
|
+
|
|
135
|
+
Each launcher simply calls the same `install.sh`/`install_windows.ps1` logic already in this repo, so you get identical results without typing commands manually. Keep the extracted directory structure intact so the launchers can find the scripts.
|
|
136
|
+
|
|
137
|
+
### Building the zip yourself
|
|
138
|
+
|
|
139
|
+
Maintainers can regenerate the bundle with:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
./tools/package_release.sh
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
The script creates `dist/tr-200-machine-report.zip` containing the launchers, `machine_report.sh`, documentation, and the latest Windows assets. If `pwsh` + `ps2exe` are available it also builds `install_windows.exe` automatically; otherwise it leaves the PowerShell installer in place with a warning so you can build the executable later on Windows.
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## ๐ค Claude Code Automated Installation
|
|
150
|
+
|
|
151
|
+
**Best for:** Using with [Claude Code](https://claude.ai/code) AI assistant
|
|
152
|
+
|
|
153
|
+
Ask Claude Code:
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
Install usgc-machine-report from RealEmmettS/usgc-machine-report using install.sh
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Or provide these specific instructions:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
cd ~/git-projects && \
|
|
163
|
+
gh repo clone RealEmmettS/usgc-machine-report && \
|
|
164
|
+
cd RealEmmettS-usgc-machine-report && \
|
|
165
|
+
./install.sh
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Claude Code will automatically:
|
|
169
|
+
1. Clone this repository
|
|
170
|
+
2. Install `lastlog2` if on Debian/Raspberry Pi OS
|
|
171
|
+
3. Copy script to `~/.machine_report.sh`
|
|
172
|
+
4. Add to `.bashrc` with automatic run on login
|
|
173
|
+
5. Create convenient `report` alias
|
|
174
|
+
|
|
175
|
+
**Or provide these specific instructions to Claude Code:**
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
# 1. Clone the repository
|
|
179
|
+
cd ~/git-projects
|
|
180
|
+
gh repo clone RealEmmettS/usgc-machine-report
|
|
181
|
+
|
|
182
|
+
# 2. Install dependencies (Debian/Ubuntu/Raspberry Pi OS)
|
|
183
|
+
sudo apt install -y lastlog2
|
|
184
|
+
|
|
185
|
+
# 3. Install the script
|
|
186
|
+
cp ~/git-projects/RealEmmettS-usgc-machine-report/machine_report.sh ~/.machine_report.sh
|
|
187
|
+
chmod +x ~/.machine_report.sh
|
|
188
|
+
|
|
189
|
+
# 4. Add to .bashrc
|
|
190
|
+
cat >> ~/.bashrc << 'EOF'
|
|
191
|
+
|
|
192
|
+
# Machine Report alias - run anytime with 'report' command
|
|
193
|
+
alias report='~/.machine_report.sh'
|
|
194
|
+
|
|
195
|
+
# Run Machine Report only when in interactive mode
|
|
196
|
+
if [[ $- == *i* ]]; then
|
|
197
|
+
~/.machine_report.sh
|
|
198
|
+
fi
|
|
199
|
+
EOF
|
|
200
|
+
|
|
201
|
+
# 5. Test installation
|
|
202
|
+
~/.machine_report.sh
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## ๐ macOS Installation
|
|
208
|
+
|
|
209
|
+
**Requirements:**
|
|
210
|
+
- macOS 10.13 (High Sierra) or later
|
|
211
|
+
- Bash 4.0+ recommended (install via `brew install bash`)
|
|
212
|
+
|
|
213
|
+
**Quick Install:**
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
cd ~/git-projects && gh repo clone RealEmmettS/usgc-machine-report && \
|
|
217
|
+
cd RealEmmettS-usgc-machine-report && ./install.sh
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
**What works on macOS:**
|
|
221
|
+
- โ
OS version detection (via `sw_vers`)
|
|
222
|
+
- โ
CPU info (via `sysctl`)
|
|
223
|
+
- โ
Memory usage (via `vm_stat`)
|
|
224
|
+
- โ
Disk usage (via `df`)
|
|
225
|
+
- โ
Network info (via `scutil`)
|
|
226
|
+
- โ
System uptime (calculated from boot time)
|
|
227
|
+
- โ ๏ธ Last login may show "unavailable" (macOS limitation)
|
|
228
|
+
|
|
229
|
+
**macOS-Specific Notes:**
|
|
230
|
+
- No package installation needed - uses built-in commands
|
|
231
|
+
- Default Bash 3.2 works but Bash 4+ recommended
|
|
232
|
+
- To install newer Bash: `brew install bash`
|
|
233
|
+
- Script automatically detects macOS and uses appropriate commands
|
|
234
|
+
|
|
235
|
+
### ๐ zsh Installation (macOS Default Shell)
|
|
236
|
+
|
|
237
|
+
**Modern macOS (Catalina 10.15+) uses zsh by default**, not bash. If you're using zsh, follow these instructions:
|
|
238
|
+
|
|
239
|
+
**Quick Install for zsh:**
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
# Clone and install the script
|
|
243
|
+
cd ~/Downloads && git clone https://github.com/RealEmmettS/usgc-machine-report.git && \
|
|
244
|
+
cp ~/Downloads/usgc-machine-report/machine_report.sh ~/.machine_report.sh && \
|
|
245
|
+
chmod +x ~/.machine_report.sh
|
|
246
|
+
|
|
247
|
+
# Add to .zshrc (not .bashrc!)
|
|
248
|
+
cat >> ~/.zshrc << 'EOF'
|
|
249
|
+
|
|
250
|
+
# Machine Report alias - run anytime with 'report' command
|
|
251
|
+
alias report='~/.machine_report.sh'
|
|
252
|
+
|
|
253
|
+
# Run Machine Report only when in interactive mode
|
|
254
|
+
if [[ $- == *i* ]]; then
|
|
255
|
+
~/.machine_report.sh
|
|
256
|
+
fi
|
|
257
|
+
EOF
|
|
258
|
+
|
|
259
|
+
# Clean up cloned repo (optional)
|
|
260
|
+
rm -rf ~/Downloads/usgc-machine-report
|
|
261
|
+
|
|
262
|
+
echo "โ
Installation complete! Open a new terminal or type: source ~/.zshrc"
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
**Important zsh Notes:**
|
|
266
|
+
- โ
Use `~/.zshrc` instead of `~/.bashrc`
|
|
267
|
+
- โ
The script works identically in zsh - no code changes needed
|
|
268
|
+
- โ
Test with: `zsh -c "source ~/.zshrc && report"`
|
|
269
|
+
- โน๏ธ To check your shell: `echo $SHELL` (should show `/bin/zsh`)
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## ๐ฆ Quick Install (Manual - Raspberry Pi OS / Debian)
|
|
274
|
+
|
|
275
|
+
**One-liner installation:**
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
cd ~/git-projects && gh repo clone RealEmmettS/usgc-machine-report && \
|
|
279
|
+
sudo apt install -y lastlog2 && \
|
|
280
|
+
cp ~/git-projects/RealEmmettS-usgc-machine-report/machine_report.sh ~/.machine_report.sh && \
|
|
281
|
+
chmod +x ~/.machine_report.sh && \
|
|
282
|
+
cat >> ~/.bashrc << 'EOF'
|
|
283
|
+
|
|
284
|
+
# Machine Report alias - run anytime with 'report' command
|
|
285
|
+
alias report='~/.machine_report.sh'
|
|
286
|
+
|
|
287
|
+
# Run Machine Report only when in interactive mode
|
|
288
|
+
if [[ $- == *i* ]]; then
|
|
289
|
+
~/.machine_report.sh
|
|
290
|
+
fi
|
|
291
|
+
EOF
|
|
292
|
+
echo "โ
Installation complete! Type 'report' or open a new terminal."
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
**Step-by-step installation:**
|
|
296
|
+
|
|
297
|
+
1. **Clone the repository**:
|
|
298
|
+
```bash
|
|
299
|
+
cd ~/git-projects
|
|
300
|
+
gh repo clone RealEmmettS/usgc-machine-report
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
2. **Install dependencies** (for modern Debian/Raspberry Pi OS):
|
|
304
|
+
```bash
|
|
305
|
+
sudo apt install -y lastlog2
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
*Note: On systems with the legacy `lastlog` command, this step is optional. The script automatically detects and uses whichever is available.*
|
|
309
|
+
|
|
310
|
+
3. **Copy the script to your home directory**:
|
|
311
|
+
```bash
|
|
312
|
+
cp ~/git-projects/RealEmmettS-usgc-machine-report/machine_report.sh ~/.machine_report.sh
|
|
313
|
+
chmod +x ~/.machine_report.sh
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
4. **Add to `.bashrc` for automatic display on login**:
|
|
317
|
+
```bash
|
|
318
|
+
cat >> ~/.bashrc << 'EOF'
|
|
319
|
+
|
|
320
|
+
# Machine Report alias - run anytime with 'report' command
|
|
321
|
+
alias report='~/.machine_report.sh'
|
|
322
|
+
|
|
323
|
+
# Run Machine Report only when in interactive mode
|
|
324
|
+
if [[ $- == *i* ]]; then
|
|
325
|
+
~/.machine_report.sh
|
|
326
|
+
fi
|
|
327
|
+
EOF
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
5. **Test the installation**:
|
|
331
|
+
```bash
|
|
332
|
+
~/.machine_report.sh
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
---
|
|
336
|
+
|
|
337
|
+
## ๐ ๏ธ Manual Installation (Advanced)
|
|
338
|
+
|
|
339
|
+
For login sessions over ssh, reference the script `~/.machine_report.sh` in your `.bashrc` file. Make sure the script is executable by running `chmod +x ~/.machine_report.sh`.
|
|
340
|
+
|
|
341
|
+
Copy `machine_report.sh` from this repository and add it to `~/.machine_report.sh` ('.' for hidden file if you wish). Reference it in your `.bashrc` file as follows:
|
|
342
|
+
|
|
343
|
+
```bash
|
|
344
|
+
# This is your .bashrc file.
|
|
345
|
+
# Add the following lines anywhere in the file.
|
|
346
|
+
|
|
347
|
+
# Machine Report alias - run anytime with 'report' command
|
|
348
|
+
alias report='~/.machine_report.sh'
|
|
349
|
+
|
|
350
|
+
# Run Machine Report only when in interactive mode
|
|
351
|
+
if [[ $- == *i* ]]; then
|
|
352
|
+
~/.machine_report.sh
|
|
353
|
+
fi
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
---
|
|
357
|
+
|
|
358
|
+
## ๐ Using the Report Command
|
|
359
|
+
|
|
360
|
+
Once installed, you can run the machine report anytime with:
|
|
361
|
+
|
|
362
|
+
```bash
|
|
363
|
+
report
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
Or directly:
|
|
367
|
+
|
|
368
|
+
```bash
|
|
369
|
+
~/.machine_report.sh
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
**Automatic display:** Machine Report will automatically appear when you open a new terminal or SSH into the machine.
|
|
373
|
+
|
|
374
|
+
---
|
|
375
|
+
|
|
376
|
+
## ๐ง Customization
|
|
377
|
+
|
|
378
|
+
Following the project's philosophy, **directly edit the source** to customize:
|
|
379
|
+
|
|
380
|
+
```bash
|
|
381
|
+
nano ~/.machine_report.sh
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
**Common customizations:**
|
|
385
|
+
- Line 15: `report_title` - Change the header text
|
|
386
|
+
- Line 18: `zfs_filesystem` - Set your ZFS pool name
|
|
387
|
+
- Lines 6-11: Adjust column widths and padding
|
|
388
|
+
|
|
389
|
+
---
|
|
390
|
+
|
|
391
|
+
## โ
Compatibility Matrix
|
|
392
|
+
|
|
393
|
+
| System | Architecture | Filesystem | Bash | Status |
|
|
394
|
+
|--------|-------------|------------|------|--------|
|
|
395
|
+
| **Raspberry Pi OS (Trixie)** | ARM64 | ext4 | 5.x | โ
**Tested** |
|
|
396
|
+
| **macOS Sonoma/Ventura** | ARM64/x86_64 | APFS | 4.0+ | โ
**Full Support** |
|
|
397
|
+
| macOS (default Bash 3.2) | ARM64/x86_64 | APFS | 3.2 | โ ๏ธ Works with warnings |
|
|
398
|
+
| Debian 13 (Trixie) | x86_64 | ext4/ZFS | 5.x | โ
Working |
|
|
399
|
+
| Debian 12 (Bookworm) | x86_64 | ext4/ZFS | 5.x | โ
Working |
|
|
400
|
+
| Ubuntu 24.04+ | x86_64 | ext4/ZFS | 5.x | โ
Should work |
|
|
401
|
+
| Fedora/RHEL 9 | x86_64 | ext4/xfs/btrfs | 5.x | โ
Should work |
|
|
402
|
+
| Arch/Manjaro | x86_64 | ext4/btrfs | 5.x | โ
Should work |
|
|
403
|
+
| Alpine Linux | x86_64 | ext4 | varies | โ ๏ธ May need tweaks |
|
|
404
|
+
| BSD (FreeBSD/OpenBSD) | x86_64 | UFS/ZFS | varies | โ ๏ธ Partial support |
|
|
405
|
+
|
|
406
|
+
---
|
|
407
|
+
|
|
408
|
+
## ๐ Troubleshooting
|
|
409
|
+
|
|
410
|
+
### lastlog command not found
|
|
411
|
+
|
|
412
|
+
**Solution:** Install `lastlog2` package:
|
|
413
|
+
```bash
|
|
414
|
+
sudo apt install -y lastlog2
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
This fork automatically handles both `lastlog2` (modern) and `lastlog` (legacy).
|
|
418
|
+
|
|
419
|
+
### CPU frequency shows blank
|
|
420
|
+
|
|
421
|
+
This is normal on some ARM systems where CPU frequency isn't exposed via `/proc/cpuinfo`. The script continues to work normally.
|
|
422
|
+
|
|
423
|
+
### Disk usage shows wrong partition
|
|
424
|
+
|
|
425
|
+
Edit `~/.machine_report.sh` and modify:
|
|
426
|
+
- Line 293: `root_partition="/"` to your desired partition
|
|
427
|
+
|
|
428
|
+
For ZFS systems, edit:
|
|
429
|
+
- Line 18: `zfs_filesystem="zroot/ROOT/os"` to your pool name
|
|
430
|
+
|
|
431
|
+
---
|
|
432
|
+
|
|
433
|
+
## ๐ Changelog (Fork-specific)
|
|
434
|
+
|
|
435
|
+
### v2.0.0 (2026-01-30) - **SHAUGHV REBRAND + NPM RELEASE**
|
|
436
|
+
**Complete Rebrand + Auto-Run Enhancements + npm Publishing**
|
|
437
|
+
|
|
438
|
+
- ๐ฆ **Published to npm**: Install globally with `npm install -g tr200`
|
|
439
|
+
- Package name: `tr200` (https://www.npmjs.com/package/tr200)
|
|
440
|
+
- Commands: `tr200` and `report` work globally after npm install
|
|
441
|
+
- Cross-platform Node.js wrapper auto-detects OS and runs appropriate script
|
|
442
|
+
- ๐จ **Rebranded to SHAUGHNESSY V DEVELOPMENT INC.**: New company branding throughout
|
|
443
|
+
- ๐จ **TR-200 MACHINE REPORT**: Updated product line designation
|
|
444
|
+
- ๐ **Copyright Updated**: Now under ES Development LLC (https://emmetts.dev)
|
|
445
|
+
- ๐ **`uninstall` Command**: Clean removal of all configurations on all platforms
|
|
446
|
+
- ๐ **zsh Support**: Full support for macOS default shell (Catalina+)
|
|
447
|
+
- ๐ **Login Shell Support**: Auto-runs on SSH/console login via `.profile`/`.zprofile`
|
|
448
|
+
- โก **Boot-Time Execution (Linux)**: systemd user service runs report at boot
|
|
449
|
+
- โก **Boot-Time Execution (macOS)**: LaunchAgent runs report at login
|
|
450
|
+
- โก **Boot-Time Execution (Windows)**: Task Scheduler runs report at login
|
|
451
|
+
- ๐งน **Clear Screen**: Screen cleared before auto-run for clean display
|
|
452
|
+
- ๐๏ธ **File Renames**: TR-100-MachineReport.ps1 โ TR-200-MachineReport.ps1
|
|
453
|
+
- ๐ **Install Directory**: Windows now uses `$HOME\TR200` instead of `$HOME\TR100`
|
|
454
|
+
- ๐ ๏ธ **Enhanced Windows Installer**: Task Scheduler integration, uninstall support
|
|
455
|
+
- ๐ค **GitHub Actions**: Automated npm publishing on GitHub release
|
|
456
|
+
|
|
457
|
+
**npm Packaging Details:**
|
|
458
|
+
- Node.js wrapper (`bin/tr200.js`) detects OS and spawns bash/PowerShell
|
|
459
|
+
- Package includes: `machine_report.sh`, `WINDOWS/TR-200-MachineReport.ps1`
|
|
460
|
+
- Requires Node.js 14+ (uses `child_process.spawn()` with `stdio: 'inherit'`)
|
|
461
|
+
- Supports: Windows, macOS, Linux, FreeBSD, OpenBSD
|
|
462
|
+
|
|
463
|
+
**Breaking Changes:**
|
|
464
|
+
- Windows install directory changed from `TR100` to `TR200`
|
|
465
|
+
- PowerShell function names changed from `Show-TR100Report` to `Show-TR200Report`
|
|
466
|
+
- Users upgrading should run `uninstall` first, then reinstall
|
|
467
|
+
|
|
468
|
+
**Tested On:**
|
|
469
|
+
- Windows 11 (PowerShell 7+)
|
|
470
|
+
- Raspberry Pi OS (Debian Trixie, ARM64)
|
|
471
|
+
- macOS (zsh and bash shells)
|
|
472
|
+
- Linux (bash and zsh shells)
|
|
473
|
+
|
|
474
|
+
---
|
|
475
|
+
|
|
476
|
+
### v1.2.0-RealEmmettS (2025-11-10) - **PRODUCTION READY**
|
|
477
|
+
**Cross-Platform Compatibility Release**
|
|
478
|
+
|
|
479
|
+
- โ
**Full macOS Support**: Native `sysctl`, `vm_stat`, `scutil` integration
|
|
480
|
+
- โ
**Multi-Linux Support**: Works on Debian, Ubuntu, Arch, Fedora, RHEL
|
|
481
|
+
- โ
**Robust Error Handling**: Graceful fallbacks, no crashes on missing commands
|
|
482
|
+
- โ
**Fixed ZFS Bug**: Correct disk percentage calculation
|
|
483
|
+
- โ
**ARM Improvements**: CPU frequency now displays on Raspberry Pi
|
|
484
|
+
- โ
**Bash 4.0+ Support**: With Bash 3.2 compatibility warnings
|
|
485
|
+
- โ
**Enhanced install.sh**: macOS detection, Bash version checking
|
|
486
|
+
- ๐ง **OS Detection Framework**: Automatic platform-specific command selection
|
|
487
|
+
- ๐ง **Helper Functions**: `command_exists`, `file_readable`, `is_ipv4`
|
|
488
|
+
- ๐ **Updated Documentation**: macOS installation guide, compatibility matrix
|
|
489
|
+
|
|
490
|
+
**Breaking Changes:** None - fully backward compatible
|
|
491
|
+
|
|
492
|
+
**Tested On:**
|
|
493
|
+
- Raspberry Pi OS (Debian Trixie, ARM64)
|
|
494
|
+
- macOS Sonoma (ARM64) - via analysis
|
|
495
|
+
- Compatible with Debian 12/13, Ubuntu 24.04+, Arch, Fedora, RHEL
|
|
496
|
+
|
|
497
|
+
### v1.1.0-RealEmmettS (2025-11-10)
|
|
498
|
+
- Added `lastlog2` support for modern Debian systems
|
|
499
|
+
- Added graceful fallback between `lastlog2` and `lastlog`
|
|
500
|
+
- Improved non-ZFS filesystem support
|
|
501
|
+
- Tested and verified on Raspberry Pi OS (ARM64)
|
|
502
|
+
- Added comprehensive installation documentation
|
|
503
|
+
- Added Claude Code optimized installation instructions
|
|
504
|
+
- Added `report` alias for convenient on-demand execution
|
|
505
|
+
|
|
506
|
+
### v1.0.0 (Original - US Graphics)
|
|
507
|
+
- Initial release
|
|
508
|
+
- Designed for Debian + ZFS + VMWare environments
|
|
509
|
+
|
|
510
|
+
---
|
|
511
|
+
|
|
512
|
+
## ๐ค Contributing
|
|
513
|
+
|
|
514
|
+
This project is maintained by **ES Development LLC** (https://emmetts.dev).
|
|
515
|
+
|
|
516
|
+
For the original upstream project, see: [usgraphics/usgc-machine-report](https://github.com/usgraphics/usgc-machine-report)
|
|
517
|
+
|
|
518
|
+
Feel free to:
|
|
519
|
+
- Fork this repository
|
|
520
|
+
- Submit issues
|
|
521
|
+
- Customize for your own needs (that's the philosophy!)
|
|
522
|
+
|
|
523
|
+
---
|
|
524
|
+
|
|
525
|
+
## ๐ License
|
|
526
|
+
|
|
527
|
+
BSD 3 Clause License. Copyright 2026, ES Development LLC (https://emmetts.dev). See [`LICENSE`](LICENSE) file for license information.
|
|
528
|
+
|
|
529
|
+
Based on original work by U.S. Graphics, LLC.
|