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. |
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.
|
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.
|
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: 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. |
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 Guess I'd better read up on how to use Github, too, to do something other than download! |
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. |
Quote:
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. |
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. |
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 |
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:
|
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. |
Any time. Im not an expert, but I enjoy the process. Looking forward to your collaboration.
|
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 Code:
function get_general(){ 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. |
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. |
Quote:
|
All times are GMT -5. The time now is 05:27 PM. |