View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 8 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: Stop Mythbackend
PostPosted: Sat Aug 25, 2012 9:46 am 
Offline
Joined: Sun Nov 13, 2005 5:56 pm
Posts: 97
This question also applies to most any daemon since I have run into the problem with mythexport and mysql too. Simply put, how do i shut down a service in LinHES? At times when I am trying to do various maintenance work I would like the backend shutdown. I have tried:

sudo sv stop mythbackend
sudo sv exit mythbackend
sudo sv force-stop mythbackend


I get something like
ok: down: mythbackend: 80s, normally up
which doesn't mean a whole to me. A check of running processes show the backend still running. If I issue a kill command, the service stops but is back up and running very shortly which is, I guess, the whole point of runsv. So my experience is good when I want something to keep running and bad if if I want to stop it. How do I administrate services?

s


Top
 Profile  
 
 Post subject: Re: Stop Mythbackend
PostPosted: Sat Aug 25, 2012 11:27 am 
Offline
Joined: Wed Jan 07, 2004 12:14 pm
Posts: 404
Location: Charlotte, NC
alt-2 = stop backend
alt-1 = start backend
alt-3 = restart backend

_________________
Backend server - 4.0 TB 3.0ghz dual core 6 gig RAM, nVidia 9400, Gigabyte GA-870A-UD3 MB, 2 HD-5500, 2 HD Homerun dual tuners, 3 frontend machines - LinHES 8.5


Top
 Profile  
 
 Post subject: Re: Stop Mythbackend
PostPosted: Sat Aug 25, 2012 11:49 am 
Offline
Joined: Sun Nov 13, 2005 5:56 pm
Posts: 97
1) This doesn't address how to deal with other services

2) Alt+2 has the same effect as working from the command line. I could see the stop command running in the list of processes but the backend is still kept running. :cry:

I guess I should mention that this is a stock install of 7.4. I haven't made any changes except for copying non-system files (recordings, files to the home directory, etc). I have had this problem since the switch was made to the archlinux platform. I switch to mythbuntu about 15 months ago but decided to try LinHES again. Now that I am back, I thought it was time to get to the bottom of this.


Top
 Profile  
 
 Post subject: Re: Stop Mythbackend
PostPosted: Sat Aug 25, 2012 12:08 pm 
Offline
Joined: Fri Jul 21, 2006 11:12 pm
Posts: 1175
Location: SC
sudo sv stop mythbackend is exactly what Alt-2 does. Here is an output using pidof to show if mythbackend is running:
Code:
[mythtv@mythtv ~]$ pidof mythbackend
19915
[mythtv@mythtv ~]$ sudo sv stop mythbackend
ok: down: mythbackend: 0s, normally up
[mythtv@mythtv ~]$ pidof mythbackend
[mythtv@mythtv ~]$ sudo sv start mythbackend
ok: run: mythbackend: (pid 20047) 0s
[mythtv@mythtv ~]$ pidof mythbackend
20091


What does ps aux | grep mythbackend show before and after sudo sv stop mythbackend?


Top
 Profile  
 
 Post subject: Re: Stop Mythbackend
PostPosted: Sat Aug 25, 2012 1:11 pm 
Offline
Joined: Sun Nov 13, 2005 5:56 pm
Posts: 97
It shows the backend running with the same pid before and after the command. If I issue a kill command the after shows the backend running but with, of course, a different pid.

I will add that I see nothing in the logs except that I ran the command using sudo. Nothing about the disposition of the execution failing or succeeding.

s


Top
 Profile  
 
 Post subject: Re: Stop Mythbackend
PostPosted: Sat Aug 25, 2012 1:23 pm 
Offline
Joined: Sun Nov 13, 2005 5:56 pm
Posts: 97
Maybe I've got this all wrong. If I do a ps ax | grep mythback I get a line that says runsv mythbackend is running. I thought this was the backend process but now I think that it is the runsv supervisor running and it's handling the backend service whether it is up or down. IOW, I would see a separate process for the backend when it is actually running. Is this true?

s


Top
 Profile  
 
 Post subject: Re: Stop Mythbackend
PostPosted: Sat Aug 25, 2012 2:00 pm 
Offline
Joined: Fri Jul 21, 2006 11:12 pm
Posts: 1175
Location: SC
That is correct, runsv should always be running. That is why I did a pidof mythbackend specifically.

With mythbackend running:
Code:
[mythtv@mythtv ~]$ ps aux | grep mythbackend
root      1182  0.0  0.0   1632   316 ?        Ss   05:45   0:00 runsv mythbackend
root     20047  0.0  0.0   4120   980 ?        S    13:22   0:00 su mythtv -c /usr/bin/mythbackend -q --syslog local6
mythtv   20091  0.4  2.9 458540 60760 ?        Sl   13:22   0:31 /usr/bin/mythbackend -q --syslog local6
mythtv   26371  0.0  0.0   4064   828 pts/2    S+   15:15   0:00 grep mythbackend
The mythbackend is pid 20091.

With mythbackend stopped:
Code:
[mythtv@mythtv ~]$ ps aux | grep mythbackend
root      1182  0.0  0.0   1632   316 ?        Ss   05:45   0:00 runsv mythbackend
mythtv   26499  0.0  0.0   4064   824 pts/2    S+   15:18   0:00 grep mythbackend


Top
 Profile  
 
 Post subject: Re: Stop Mythbackend
PostPosted: Sat Aug 25, 2012 5:01 pm 
Offline
Joined: Sun Nov 13, 2005 5:56 pm
Posts: 97
Thanks for setting me straight. Sometimes I problems with the simplest things. <*sigh*>

s


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu