1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-12 19:22:24 +00:00

iiab-diagnostics output: Less spacing betw 6 sections

This commit is contained in:
root 2022-07-06 15:38:45 -04:00
parent 99d5debbf4
commit e8ee4400ea

View file

@ -130,7 +130,7 @@ echo -e "\nCompiling diagnostics..."
echo -e "\n 0. HW + SW Quick Summary"
echo "This is: $outfile" >> $outfile
echo >> $outfile
echo -e "\n\n\n\n0. HW + SW Quick Summary" >> $outfile
echo -e "\n\n\n0. HW + SW Quick Summary" >> $outfile
echo >> $outfile
/opt/iiab/iiab/scripts/iiab-summary >> $outfile
if [ -f /etc/rpi-issue ]; then
@ -147,7 +147,7 @@ if [ -s /tmp/iiab-apps-to-be-installed ]; then
fi
echo -e '\n 1. Files Specially Requested: (from "iiab-diagnostics PATH/FILE1 PATH/FILE2")\n'
echo -e '\n\n\n\n1. FILES SPECIALLY REQUESTED (FROM "iiab-diagnostics PATH/FILE1 PATH/FILE2")\n' >> $outfile
echo -e '\n\n\n1. FILES SPECIALLY REQUESTED (FROM "iiab-diagnostics PATH/FILE1 PATH/FILE2")\n' >> $outfile
for f in "$@"; do
cat_file $f
done
@ -157,7 +157,7 @@ if [ $# -eq 0 ]; then
else
echo -e "\n 2. Regular Files:\n"
fi
echo -e "\n\n\n\n2. REGULAR FILES\n" >> $outfile
echo -e "\n\n\n2. REGULAR FILES\n" >> $outfile
#cat_file /dev/sda # Device "file" test
#cat_file /nonsense # Non-existence test
#cat_file /opt/iiab/iiab # Directory test
@ -181,7 +181,7 @@ cat_file /library/www/html/home/menu.json
#cat_file /tmp/all-ansible-vars
echo -e "\n 3. Content of Directories: (1-level deep)\n"
echo -e "\n\n\n\n3. CONTENT OF DIRECTORIES (1-LEVEL DEEP)\n" >> $outfile
echo -e "\n\n\n3. CONTENT OF DIRECTORIES (1-LEVEL DEEP)\n" >> $outfile
cat_dir /etc/network/interfaces.d
cat_dir /etc/systemd/network
cat_dir /etc/NetworkManager/system-connections # Redacts most passwords above
@ -190,7 +190,7 @@ cat_dir /etc/netplan # Redacts most passwords above
#cat_dir /etc/network # Above file /etc/network/interfaces suffices
echo -e "\n 4. Output of Commands:\n"
echo -e "\n\n\n\n\n4. OUTPUT OF COMMANDS\n" >> $outfile
echo -e "\n\n\n\n4. OUTPUT OF COMMANDS\n" >> $outfile
cat_cmd 'uname -a' 'Linux kernel'
cat_cmd 'free' 'RAM memory'
cat_cmd 'lscpu' 'CPU details'
@ -226,12 +226,12 @@ cat_cmd 'journalctl -t IIAB-CMDSRV' 'Admin Console CMDSRV log'
#cat_cmd 'ansible localhost -m setup 2>/dev/null' 'All Ansible facts' # For cleaner scraping of Ansible vars, consider "./runrole all-vars /tmp/all-ansible-vars" 27-31 lines above?
echo -e "\n 5. Firewall Rules:\n"
echo -e "\n\n\n\n5. FIREWALL RULES\n" >> $outfile
echo -e "\n\n\n5. FIREWALL RULES\n" >> $outfile
#cat_file /usr/bin/iiab-gen-iptables
cat_cmd 'sudo iptables-save' 'Firewall rules'
echo -e "\n 6. Log Files: (e.g. last 100 lines of each)\n"
echo -e "\n\n\n\n6. LOG FILES (e.g. LAST 100 LINES OF EACH)\n" >> $outfile
echo -e "\n\n\n6. LOG FILES (e.g. LAST 100 LINES OF EACH)\n" >> $outfile
cat_cmd 'grep -B2 "SEE ERROR ABOVE" /opt/iiab/iiab/*.log' 'for skip_role_on_error'
cat_tail /opt/iiab/iiab/iiab-install.log 100
cat_tail /opt/iiab/iiab/iiab-configure.log 100