Now some command versions are dumped
This commit is contained in:
parent
55fe564b50
commit
9c17a82163
2 changed files with 24 additions and 13 deletions
29
README.md
29
README.md
|
@ -15,21 +15,24 @@ Explore a dump (require `jq`):
|
||||||
Explore specific entries of a dump:
|
Explore specific entries of a dump:
|
||||||
> ./sysdump.sh dump.json uname timezone
|
> ./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) |
|
||||||
|
|
||||||
# Notes
|
# Notes
|
||||||
- To get available entries see into `sysdump.sh`
|
- To get available entries see into `sysdump.sh`
|
||||||
- Some commands require root permissions.
|
- Some commands require root permissions.
|
||||||
If `sysdump.sh` is not run as root, these commands will not be executed.
|
If `sysdump.sh` is not run as root, these commands will not be executed.
|
||||||
|
- List available entries:
|
||||||
# Useful entries
|
> cat dump.json |grep -o ".*:"
|
||||||
Important note: Depending on the system, some entries may not be available.
|
- List available command versions:
|
||||||
|
> cat dump.json |grep -o "cmd_.*_version"
|
||||||
| 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 |
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -111,6 +111,14 @@ dump "lsfd" safecmd lsfd
|
||||||
dump "root_folder" safecmd ls -al /
|
dump "root_folder" safecmd ls -al /
|
||||||
dump "glxinfo" safecmd glxinfo -B
|
dump "glxinfo" safecmd glxinfo -B
|
||||||
dump "compgen" safecmd compgen -c
|
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
|
# safecmdroot
|
||||||
dump "dmidecode" safecmdroot dmidecode
|
dump "dmidecode" safecmdroot dmidecode
|
||||||
dump "iptables" safecmdroot iptables -L
|
dump "iptables" safecmdroot iptables -L
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue