LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > LinuxQuestions.org > LQ Suggestions & Feedback
User Name
Password
LQ Suggestions & Feedback Do you have a suggestion for this site or an idea that will make the site better? This forum is for you.
PLEASE READ THIS FORUM - Information and status updates will also be posted here.

Notices


Reply
  Search this Thread
Old 12-13-2016, 02:23 PM   #1
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Basic LQ troubleshooting list or tool


Have we ever discussed having a troubleshooting tool that we could refer users to?

Something like:

./lqdebug.sh --samba-setup

to grab the same four command outputs that we always ask for? Dell and Atlassian have that sort of thing for their products. But a general tool might be nice for the forum.

Last edited by szboardstretcher; 12-13-2016 at 02:36 PM. Reason: removed guide idea as we already discussed it
 
Old 12-13-2016, 07:50 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
I've got a lot of experience putting together troubleshooting flow charts and other job aids for training classes. I would be happy to work with a person or team interesting in putting together some troubleshooting aids.
 
Old 12-14-2016, 10:25 AM   #3
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Original Poster
Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Very interesting. I'll mock up a basic idea and add it to github. I'll link back when I have something concrete. From there if you are interested, you may freely contribute.
 
Old 12-14-2016, 11:02 AM   #4
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Original Poster
Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
A very simple mockup is available here: https://github.com/boardstretcher/ldebug

The idea is this,.. "User: I have a problem with my mount point not mounting" "Me: run 'ldebug.sh -s' and copy and paste the contents here."

The contents would have for example, /etc/fstab, /proc/mounts, lvs, pvs, blkid, fdisk -l, and that sort of thing. Very simple and very centralized for anyone to be able to easily run:

Code:
wget https://whatever/ldebug.sh; ./ldebug.sh -s;
Done. Rather than posting 4 different times to get the information that we will eventually need anyway, I'd like to get a complete picture right off the rip.

Thoughts? I figure 'storage' would be the first area. Then maybe 'generalsystem'. Then maybe 'networking'. Maybe 'packagemanager'. Anyway, hope its interesting enough to warrant some collaboration and effort.

Last edited by szboardstretcher; 12-14-2016 at 11:05 AM.
 
2 members found this post helpful.
Old 12-15-2016, 03:38 PM   #5
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
I'm afraid scripts are not my strong point. I did download this and try to run it in one of my VMs and got

Code:
$ sh ldebug.sh -s
ldebug.sh: line 5: syntax error near unexpected token `newline'
ldebug.sh: line 5: `<!DOCTYPE html>'
but I like the idea. I might take a whirl at a simple one to collect information about wireless chipsets, since that bugs a lot of people.

Guess I'd better read up on how to use Github, too, to do something other than download!
 
Old 12-15-2016, 07:40 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
You pulled the webpage, not the script. This is a problem with this sort of thing - seen similar when directing users to download bootinfoscript.
One needs to be very specific with instructions.
 
1 members found this post helpful.
Old 12-15-2016, 08:18 PM   #7
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
Quote:
You pulled the webpage, not the script
(Grin) I said I'm not very experienced with Github. I'll try to educate myself tomorrow.

Oddly enough, when I saw the doctype, I tried to open the file from Firefox and the file-open dialog told me I was trying to open a script and pointed me towards Gedit. I am guessing that was based on the file name. (Moments later) I just verified my guess by copying the file to one with an html extension and opening it in Firefox.

Thanks for teaching me something.
 
Old 12-15-2016, 10:19 PM   #8
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Original Poster
Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
No prob. The link to the actual script im working on is:

https://raw.githubusercontent.com/bo...ster/ldebug.sh

Just a hobby project. Not serious. Maybe it will be useful eventually. Feel free to suggest additions or get on github and offer code.
 
Old 12-16-2016, 08:27 PM   #9
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
I found the script on my own. It seems to run quite nicely. I do have some ideas for some other information to automate the seeking of which, he said ungrammatically; I think I will work on them and then run them by you. Let me know the best way to do that.

I'll have to bone up on scripting, though; fortunately, I have my Garrels book on scripting on the bookshelf. It's been a while since I wrote anything more complex than my Fluxbox wallpaper script:

Code:
#!/bin/sh

while true; do
#       fbsetbg -f -R ~/wallpapers
       fbsetbg -f -R ~/Christmas
	sleep 30m
 
Old 12-16-2016, 11:59 PM   #10
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Original Poster
Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Cool. If you haven't used github, it might be worth it to grab an account and learn to use the pull request system. Basically you press 'fork' on this script, make your changes to your own copy of it, then do a pull request which essentially comes back to me and says 'would you like these changes added to the script?'

Its a good way for many of us to work on it.

Or you can suggest them here. Up to you. If there get to be lots of ideas and input we would have to go the github route.

Now,. on the scripting front. If you aren't up to speed on scripting, then you could offer command collections - Since we are really just looking to quickly display relevant information. For example:

Quote:
You: Hey I have some information gathering commands all related to the category "Programs and Packages" here are the commands:

rpm -qa
yum repolist
And I could just add it to a 'Programs and packages' section of the script. Any help is certainly appreciated. Have fun!
 
Old 12-17-2016, 09:43 PM   #11
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
I think I shall open a git-hub account and check out some tutorials. I'm sure I'll have questions.

This would be a great opportunity for me to learn more about scripting; I've found one learns best when one has a goal. If I'm not satisfied with my progress, I'll post my suggestions here.

Thanks for the encouragement.

Last edited by frankbell; 12-17-2016 at 09:48 PM.
 
Old 12-17-2016, 11:11 PM   #12
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Original Poster
Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Any time. Im not an expert, but I enjoy the process. Looking forward to your collaboration.
 
Old 12-18-2016, 08:09 PM   #13
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
I look forward to working on this also and to learning stuff.

I was poking at your script today and reading up on functions when I ran into this:

It runs just fine on Slackware and CentOS v. 7 (in a VM), but when I run it in Mint v. 17 or Debian v. 8, I get this:

Code:
# sh ldebug.sh
ldebug.sh: 44: ldebug.sh: Syntax error: "(" unexpected
I admit this has me baffled. If you count empty and remarked out lines, line 44 is this:

Code:
function get_general(){
(If you don't count empty and remarked out lines, line 44 would be line 63, which is blank, if I counted correctly.)

I tried a shot in the dark, based on something in Garrels Intro to BASH Scripting, and added a space before the first paren, but still got the error.

In the meantime, I'll keep poking at a wireless information collection script. I'm hoping to have a not-too-incompetent draft by midweek.

Last edited by frankbell; 12-18-2016 at 08:10 PM.
 
Old 12-18-2016, 11:23 PM   #14
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Original Poster
Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Good catch! Hmmm. I wonder if debian wants the () removed completely... I will spin up a debian instance to test on as well so I can cover Centos/Debian variants at least.

I've also updated the script to remove the wordiness of the $(which) stuff I was doing. Created a tmpfile.. And also added a way to automatically send the output to a pastebin online the -Z switch in the newest version. So running './ldebug.sh -lZ' gets regular output, sends it to a pastebin, and outputs this line:

Copy, Paste and Share this pastebin URL:
http://sprunge.us/MaGC

Which i think is nice.

Last edited by szboardstretcher; 12-18-2016 at 11:24 PM.
 
Old 12-19-2016, 08:17 PM   #15
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
Quote:
I've also updated the script to remove the wordiness of the $(which) stuff I was doing.
I will be testing on it and, I am confident, learning from it tomorrow. Thanks.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Basic troubleshooting AIO RDO Havana Instance on CentOS 6.5 LXer Syndicated Linux News 0 04-29-2014 09:41 AM
Performance troubleshooting tool amoralejo Linux - Server 4 02-01-2009 12:26 PM
LXer: Basic Veritas Cluster Server Troubleshooting http LXer Syndicated Linux News 0 11-14-2008 11:20 AM
LXer: traceroute - a very useful troubleshooting tool which reveals the bottlenecks on the Internet LXer Syndicated Linux News 0 01-18-2007 12:33 PM
Basic Sound troubleshooting steps? penguinlnx Linux - Software 3 03-16-2005 12:49 AM

LinuxQuestions.org > Forums > LinuxQuestions.org > LQ Suggestions & Feedback

All times are GMT -5. The time now is 07:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration