Dump various system informations.
Find a file
2024-07-04 17:04:32 +02:00
.gitignore Init project 2024-07-04 10:36:00 +02:00
README.md Improve dump 2024-07-04 17:04:32 +02:00
sysdump.sh Improve dump 2024-07-04 17:04:32 +02:00

System dump script

Dump various system informations into base64 encoded values and print them as json.

Usage

Run a dump:

./sysdump.sh > dump.json

Run a dump on a remote machine using ssh:

cat sysdump.sh | ssh user@host /bin/bash > dump.json

Explore a dump (require jq):

./sysdump.sh dump.json

Explore specific entries of a dump:

./sysdump.sh dump.json uname timezone

Useful entries

Important note: Depending on the system, some entries may not be available.

Entry Description
compgen List all available commands in current shell
ping Check if ping succeed (internet is available)
boot_folder Recursive listing of /boot/
root_folder Content of /
home_folder Content of $HOME
cmd_<command>_version Get the version of some specific commands (e.g: gcc, python etc)
/proc/cmdline See kernel parameters
/boot/config-$(uname -r) Get kernel config
users List logged users
declare Get all shell define variables, functions etc

Notes

  • Some commands require root permissions. If sysdump.sh is not run as root, these commands will not be executed.
  • List available entries:

cat dump.json |grep -o ".*:"

  • List available command versions:

cat dump.json |grep -o "cmd_.*_version"

  • For more infos on what is actually dump see sysdump.sh