aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoïc Guégan <loic.guegan@mailbox.org>2024-07-04 15:47:07 +0200
committerLoïc Guégan <loic.guegan@mailbox.org>2024-07-04 15:47:07 +0200
commit9c17a82163507ad7fc330ade89acbc31666dd88c (patch)
tree51bd0bc434e687a64607364c291f9d65b61fa024
parent55fe564b50fe9f1ba951aa0c235ea801f05d6dee (diff)
Now some command versions are dumped
-rw-r--r--README.md29
-rwxr-xr-xsysdump.sh8
2 files changed, 24 insertions, 13 deletions
diff --git a/README.md b/README.md
index b2adfb1..d1f5f49 100644
--- a/README.md
+++ b/README.md
@@ -15,21 +15,24 @@ Explore a dump (require `jq`):
Explore specific entries of a dump:
> ./sysdump.sh dump.json uname timezone
-# 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.
-
# Useful entries
Important note: Depending on the system, some entries may not be available.
-| 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 |
-
-
+| 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) |
+# 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.
+- List available entries:
+> cat dump.json |grep -o ".*:"
+- List available command versions:
+> cat dump.json |grep -o "cmd_.*_version"
diff --git a/sysdump.sh b/sysdump.sh
index f9762ea..4237bc5 100755
--- a/sysdump.sh
+++ b/sysdump.sh
@@ -111,6 +111,14 @@ dump "lsfd" safecmd lsfd
dump "root_folder" safecmd ls -al /
dump "glxinfo" safecmd glxinfo -B
dump "compgen" safecmd compgen -c
+dump "openssl" safecmd openssl
+dump "ping" safecmd ping -c 2 -W 2 4.2.2.2
+for cmd in bash gcc ld python3 cmake make tar zip gzip bzip2 xz cpio wget rsync curl node pip apt cat systemctl gpg R ruby awk grep sshfs
+do
+ dump "cmd_${cmd}_version" safecmd $cmd --version
+done
+dump "cmd_ssh_version" safecmd sshd -V
+dump "cmd_tmux_version" safecmd tmux -V
# safecmdroot
dump "dmidecode" safecmdroot dmidecode
dump "iptables" safecmdroot iptables -L