Jeff Bailey on 15 Jan 2014 09:44:48 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] debugging an init script


I'm not super familiar with these things, but nothing in dmesg or sys.log?
 
 
On 01/15/14, Carl Johnson<cjohnson19791979@gmail.com> wrote:
 
In this case it's the vboxweb script that comes in the latest virtualbox rpm. I don't see anything like that that I could modify in it.

"Eric at Lucii.org" <eric@lucii.org> wrote:
>On 01/15/2014 11:46 AM, Carl Johnson wrote:
>> Can someone in PLUG can help me out? My google-fu isn't that strong
>today.
>>
>> I've a Centos 6.5 box that has a service that won't start. Every time
>I run "service <script name> start" I get a red "[FAILED] message.
>>
>> Does anyone have any idea how I can log/watch/debug this script to
>see why/where it's failing as it runs? Can I redirect the sub-shell
>output to a logfile somehow? Is there a way to make it send all output
>to stdout?
>>
>> All I know right now is that it's failing. The script doesn't have
>the logic in it to tell me "xyz.conf is missing....... [FAILED] or that
>it's failing because it can't write a PID to /var/run" or something
>like that.
>
>When I (infrequently) do this I look in the script and find the command
>that it's executing to start the
>service (99% of the init.d scripts are boilerplate.) Research that
>command and find out how to increase the
>verbosity of it's logs. Make that change to the file (just comment out
>the actual line and replace it with
>your debug line.
>
>For example, replace:
> fooserver ${OPTS}
>with:
> fooserver -v ${OPTS}
>or:
> fooserver -d 2 ${OPTS}
>Whatever.
>
>Then start it.... it still breaks.
>Then look in the logs.
>
>Hope that helps... it's worked for me in the past.
>Eric





Sent from my Motorola DynaTAC8000X
___________________________________________________________________________
Philadelphia Linux Users Group -- http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug