2024-07-04 10:36:00 +02:00
|
|
|
# System dump script
|
|
|
|
|
2024-07-04 10:56:42 +02:00
|
|
|
Dump various system informations into base64 encoded values and print them as json.
|
2024-07-04 10:36:00 +02:00
|
|
|
|
|
|
|
# Usage
|
|
|
|
Run a dump:
|
2024-07-04 10:57:29 +02:00
|
|
|
> ./sysdump.sh > dump.json
|
2024-07-04 10:36:31 +02:00
|
|
|
|
2024-07-04 11:05:12 +02:00
|
|
|
Run a dump on a remote machine using ssh:
|
|
|
|
> cat sysdump.sh | ssh user@host /bin/bash > dump.json
|
2024-07-04 11:02:26 +02:00
|
|
|
|
2024-07-04 12:14:29 +02:00
|
|
|
Explore a dump (require `jq`):
|
2024-07-04 10:36:00 +02:00
|
|
|
> ./sysdump.sh dump.json
|
2024-07-04 12:12:34 +02:00
|
|
|
|
2024-07-04 12:14:29 +02:00
|
|
|
Explore specific entries of a dump:
|
2024-07-04 12:12:34 +02:00
|
|
|
> ./sysdump.sh dump.json uname timezone
|
2024-07-04 12:36:52 +02:00
|
|
|
|
|
|
|
# Notes
|
|
|
|
- To get available entries see into `sysdump.sh`
|
|
|
|
- Some commands require root permissions.
|
|
|
|
If `sysdump.sh` is not run as root, these commands will not be executed.
|
2024-07-04 14:27:19 +02:00
|
|
|
|
|
|
|
# Useful entries
|
2024-07-04 14:56:18 +02:00
|
|
|
Important note: Depending on the system, some entries may not be available.
|
|
|
|
|
2024-07-04 14:57:11 +02:00
|
|
|
| Entry | Description |
|
|
|
|
|-------------|----------------------------------------------|
|
|
|
|
| compgen | List all available commands in current shell |
|
|
|
|
| boot_folder | Recursive listing of /boot/ |
|
|
|
|
| root_folder | Content of / |
|
|
|
|
| home_folder | Content of $HOME |
|
2024-07-04 14:27:19 +02:00
|
|
|
|
2024-07-04 14:27:37 +02:00
|
|
|
|
|
|
|
|
2024-07-04 14:27:19 +02:00
|
|
|
|