|
@@ -7,6 +7,7 @@ set -o nounset #>Forbid to use unse
|
|
|
declare -A Paths
|
|
|
Paths[sys]="$HOME"/lognconf_systeminfo.md
|
|
|
Paths[log]="$HOME"/lognconf_logging.md
|
|
|
+Paths[plot]="$HOME"/lognconf_plot.svg
|
|
|
Paths[url]="https://notabug.org/megavolt/random-scripts/raw/master/lognconf-report.sh"
|
|
|
|
|
|
if [[ ! -t 0 ]] ; then
|
|
@@ -117,7 +118,7 @@ function GetBlockDevices ()
|
|
|
|
|
|
function GetSystemJournals ()
|
|
|
{
|
|
|
- choice=$1
|
|
|
+ local choice=$1
|
|
|
if [[ -x "/usr/bin/journalctl" ]]; then
|
|
|
if [[ $choice == "current" ]]; then
|
|
|
journalctl --boot 0 --no-hostname --no-pager
|
|
@@ -127,27 +128,51 @@ function GetSystemJournals ()
|
|
|
fi
|
|
|
}
|
|
|
|
|
|
+function GetSystemLoadTime ()
|
|
|
+{
|
|
|
+ local choice=$1
|
|
|
+ if [[ -x "/usr/bin/systemd-analyze" ]]; then
|
|
|
+ if [[ $choice == "svg" ]]; then
|
|
|
+ systemd-analyze plot
|
|
|
+ elif [[ $choice == "blame" ]]; then
|
|
|
+ systemd-analyze blame
|
|
|
+ elif [[ $choice == "basic" ]]; then
|
|
|
+ systemd-analyze
|
|
|
+ fi
|
|
|
+ fi
|
|
|
+}
|
|
|
+
|
|
|
function upload ()
|
|
|
{
|
|
|
- local SYS=$(echo -e "${OutPut}" | curl -s -F'file=@-' https://0x0.st)
|
|
|
- local PLD=$(echo -e "${Logs}" | curl -s -F'file=@-' https://0x0.st)
|
|
|
- echo "Systeminfo: $SYS"
|
|
|
- echo "Logs: $PLD"
|
|
|
+ echo "Systeminfo: $(echo -e "${OutPut}" | curl -s -F'file=@-' https://0x0.st)"
|
|
|
+ echo "Logs: $(echo -e "${Logs}" | curl -s -F'file=@-' https://0x0.st)"
|
|
|
+ echo "Plot: $(echo -e "${Plot}" | curl -s -F'file=@-' https://0x0.st)"
|
|
|
}
|
|
|
|
|
|
function save ()
|
|
|
{
|
|
|
echo -e "${OutPut}" > "${Paths[sys]}"
|
|
|
echo -e "${Logs}" > "${Paths[log]}"
|
|
|
+ echo -e "${Plot}" > "${Paths[plot]}"
|
|
|
+ #cp /tmp/plot.svg "${Paths[plot]"
|
|
|
echo "The output was saved here:"
|
|
|
echo -e "Systeminfo -> ${Paths[sys]}"
|
|
|
echo -e "Logs -> ${Paths[log]}"
|
|
|
+ echo -e "Plot -> ${Paths[plot]}"
|
|
|
+
|
|
|
}
|
|
|
|
|
|
echo "Collecting INXI output..."
|
|
|
InPut="$(GetINXI)"
|
|
|
[[ -n "${InPut}" ]] && OutPut+="\n### INXI\n\n~~~\n${InPut}\n~~~\n\n"
|
|
|
|
|
|
+echo "Collecting System Load Time output..."
|
|
|
+InPut="$(GetSystemLoadTime basic)"
|
|
|
+[[ -n "${InPut}" ]] && OutPut+="\n### System Load Time\n\n~~~\n${InPut}\n~~~\n\n"
|
|
|
+InPut="$(GetSystemLoadTime blame)"
|
|
|
+[[ -n "${InPut}" ]] && OutPut+="\n#### Blamed Services\n\n~~~\n${InPut}\n~~~\n\n"
|
|
|
+Plot=$(GetSystemLoadTime svg)
|
|
|
+
|
|
|
echo "Collecting Manjaro Hardware Detection output..."
|
|
|
# Graphics
|
|
|
InPut="$(MHWDGetGPU list)"
|
|
@@ -169,6 +194,7 @@ InPut="$(GetBootConfigs)"
|
|
|
[[ -n "${InPut}" ]] && OutPut+="\n\n### Boot Configuration Files\n\n${InPut}\n\n"
|
|
|
|
|
|
Logs=""
|
|
|
+
|
|
|
echo "Collecting Xorg Logging Files..."
|
|
|
InPut="$(GetXorgLogs)"
|
|
|
[[ -n "${InPut}" ]] && Logs+="\n\n### Xorg Logging Files\n\n${InPut}\n\n"
|