Skip to content

Commit

Permalink
update debugging script for fpaste url
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhbir-singh committed Aug 9, 2019
1 parent ef552bf commit 975b8cd
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 32 deletions.
2 changes: 1 addition & 1 deletion app/views/disk_wizard/done.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ css:
label.control-label for="fpaste_url"
| URL:
span.glyphicon.glyphicon-globe
input#fpaste_url.form-control autocomplete="off" data-placement="top" data-toggle="tooltip" onclick="$(this).select();" placeholder=("Generating URL..") style=("width: 375px;") title=("Press Ctrl+c to coppy URL to clipboard") type="text" /
input#fpaste_url.form-control autocomplete="off" data-placement="top" data-toggle="tooltip" onclick="$(this).select();" placeholder=("Generating URL..") style=("width: 375px; font-size:14px;") title=("Press Ctrl+C to copy URL to clipboard") type="text" /
span.glyphicon.glyphicon-ok.form-control-feedback
.panel-body.text-left
p.text-primary
Expand Down
72 changes: 41 additions & 31 deletions vendor/bash/debug_info.sh
Original file line number Diff line number Diff line change
@@ -1,36 +1,46 @@
#!/bin/bash
echo "Disk-Wizard Debug information fetcher"

echo -e "\n------------This Debug Information was Generated on $(date +"%B-%d-%Y %r")------------\n" > /var/log/debug_info.tmp
output=/tmp/dw_debug_$$.tmp

#exec > $output 2>&1

echo -e "\n------------This Debug Information was Generated on $(date +"%B-%d-%Y %r")------------\n"

printf "\n/*===*dsw.log wrapper script log (tail -n 50)===*/\n"

printf "\n/*===*dsw.log wrapper script log (tail -n 50)===*/\n" >> /var/log/debug_info.tmp
if [ ! -f /var/hda/apps/520ut3lo6w/elevated/dsw.log ]; then
echo "File not found!" >> /var/log/debug_info.tmp
else
tail -n 50 /var/hda/apps/520ut3lo6w/elevated/dsw.log >> /var/log/debug_info.tmp
fi

printf "\n/*=== *Current mounted partitions ===*/\n" >> /var/log/debug_info.tmp
sudo mount -l >> /var/log/debug_info.tmp 2>&1

printf "\n/*=== *list disk/partitions details with parted ===*/\n" >> /var/log/debug_info.tmp
parted -sl print all >> /var/log/debug_info.tmp 2>&1

printf "\n/*=== *List all logical volumes ===*/\n" >> /var/log/debug_info.tmp
lvdisplay -av >> /var/log/debug_info.tmp 2>&1

printf "\n/*=== *dsk-wz.sh wrapper script ===*/\n" >> /var/log/debug_info.tmp
if [ ! -f /var/hda/apps/520ut3lo6w/elevated/dsk-wz.sh ]; then
echo "File not found!" >> /var/log/debug_info.tmp
else
cat /var/hda/apps/520ut3lo6w/elevated/dsk-wz.sh >> /var/log/debug_info.tmp
fi

printf "\n/*=== *disk-wizard rails log file(tail -n 50)===*/\n" >> /var/log/debug_info.tmp
if [ ! -f /var/hda/platform/html/log/dw_debug.log ]; then
echo "File not found!" >> /var/log/debug_info.tmp
else
tail -n 50 /var/hda/platform/html/log/dw_debug.log >> /var/log/debug_info.tmp
fi

fpaste -l bash /var/log/debug_info.tmp
echo "File not found!"
else
tail -n 50 /var/hda/apps/520ut3lo6w/elevated/dsw.log
fi

printf "\n/*=== *Current mounted partitions ===*/\n"
sudo mount -l

printf "\n/*=== *list disk/partitions details with parted ===*/\n"
parted -sl print all

printf "\n/*=== *List all logical volumes ===*/\n"
lvdisplay -av

printf "\n/*=== *dsk-wz.sh wrapper script ===*/\n"

if [ ! -f /var/hda/apps/520ut3lo6w/elevated/dsk-wz.sh ]; then
echo "File not found!"
else
cat /var/hda/apps/520ut3lo6w/elevated/dsk-wz.sh
fi

printf "\n/*=== *disk-wizard rails log file(tail -n 50)===*/\n"

if [ ! -f /var/hda/platform/html/log/dw_debug.log ]; then
echo "File not found!"
else
tail -n 50 /var/hda/platform/html/log/dw_debug.log
fi

#fpaste -l "shell" /var/log/debug_info.tmp

tail -n 600 /var/hda/platform/html/log/dw_debug.log > temp_file && fpaste temp_file

0 comments on commit 975b8cd

Please sign in to comment.