Let's make scripts!



  • I would like to suggest making troubleshooting scripts for every major flavor of Linux, for FOG troubleshooting.

    The scripts should test every relevant service, maybe run basic diagnostics on those services… The scripts could even pull data from configuration files, and definitely the FOG install log.

    All the scripts should put all output into a single text file, for FOG users to post here.

    This should expedite trouble shooting, because we can say, Here, run this script, give us the output (or they themselves use it as a troubleshooting tool).

    We should make a WiKi section just for these.


    EDIT

    This project has been converted into a SourceForge project.

    Here is how you can get it:

    svn checkout svn://svn.code.sf.net/p/fog-troubleshoot-script/svn/ /svn/fog-troubleshoot-script
    

    Here’s a link to the project: https://sourceforge.net/projects/fog-troubleshoot-script/

    Many many thanks to everyone that was involved with improving this script. Hopefully people will continue to collaborate and help to improve this FOG side project. If you would like commit access, just ask me or @Tom-Elliott



  • Bumping this, just so everyone now knows it’s a source forge project. :-)


  • Moderator

    Hmm, I thought I did. I will re-upload when I get back to my laptop.

    —EDIT—
    Latest is attached.
    troubleshoot.zip



  • @cml Nice, can you upload a copy?


  • Moderator

    [troubleshoot.zip](uploading 100%)

    I added a function to add the revision number.



  • This post is deleted!


  • Can we get attachments working? I can’t grab the latest script.


  • Senior Developer

    I haven’t coded or tested it for all the specifications of different os’s so it’s not part of it yet…


  • Testers

    Where in the SVN is this being placed or is it not part of it then?


  • Senior Developer

    Probably?



  • I will work on integrating these.

    Tom, is the latest and greatest the last thing you’ve posted?


  • Moderator

    [quote=“Joseph Hales, post: 46929, member: 18131”]When I ran the latest version in this thread I got the following output in terminal.
    ./troubleshoot.sh: line 19: [: : integer expression expected
    rpcbind: unrecognized service
    nfs: unrecognized service
    iptables: unrecognized service
    Usage FOGMulticastManager {start|stop|restart}
    Usage FOGSnapinReplicator {start|stop|restart}
    Usage FOGImageReplicator {start|stop|restart}
    Usage FOGScheduler {start|stop|restart}
    Script Completed Wed May 6 16:10:25 CDT 2015
    Your logfile can be found in /home/jhales/test/FOGtroubleshoot.log[/quote]

    Hi,

    For the status of FOG services I have submit modifications here : [url]http://fogproject.org/forum/threads/add-the-status-of-fog-services-in-the-command-service.12912/[/url]

    Regards,
    Ch3i.


  • Moderator

    [quote=“Tom Elliott, post: 46119, member: 7271”]Here’s slightly more refined. Log items are somewhat nice now (more informative). Theres also a lot more checking.[/quote]

    Hi,

    Is it possible to had it in the web interface ?

    Regards,
    Ch3i.


  • Testers

    When I ran the latest version in this thread I got the following output in terminal.
    ./troubleshoot.sh: line 19: [: : integer expression expected
    rpcbind: unrecognized service
    nfs: unrecognized service
    iptables: unrecognized service
    Usage FOGMulticastManager {start|stop|restart}
    Usage FOGSnapinReplicator {start|stop|restart}
    Usage FOGImageReplicator {start|stop|restart}
    Usage FOGScheduler {start|stop|restart}
    Script Completed Wed May 6 16:10:25 CDT 2015
    Your logfile can be found in /home/jhales/test/FOGtroubleshoot.log

    [url="/_imported_xf_attachments/1/1977_FOGtroubleshoot.log.txt?:"]FOGtroubleshoot.log.txt[/url]


  • Testers

    Can we sticky this and add to the wikki.



  • Now that’s awesome. This is going to be a major help for troubleshooting!


  • Senior Developer

    Here’s slightly more refined. Log items are somewhat nice now (more informative). Theres also a lot more checking.

    troubleshoot.zip


  • Senior Developer

    Here’s a more refined version. This particular should work on CentOS/Redhat (in general e.g. 5,6,7) and Fedora.

    It also prints that the file is complete and where it can be located.

    [url="/_imported_xf_attachments/1/1911_troubleshoot.zip?:"]troubleshoot.zip[/url]



  • Tom helped with a command to convert the output file to windows-friendly text. I’ve added this at the very bottom of the script.

    Latest and greatest is attached.

    [url="/_imported_xf_attachments/1/1910_troubleshoot.zip?:"]troubleshoot.zip[/url]


  • Moderator

    Few changes.

    Ubuntu had to be run with sudo, so added a root check to the beginning of the file.
    Ubuntu also has UFW as a firewall, added a check for that.
    Changed the Debian/Ubuntu version check to ‘lsb_release -a’ to get more information.
    Pointed the log file to a variable that is $Distro-Fog.txt
    The script now overwrites the log if ran again.

    Script and Debian/Ubuntu logs attached.

    [url="/_imported_xf_attachments/1/1907_troubleshoot.zip?:"]troubleshoot.zip[/url]


 

455
Online

41.8k
Users

12.3k
Topics

116.1k
Posts