LinHES Forums http://forums.linhes.org/ |
|
Stop Mythbackend http://forums.linhes.org/viewtopic.php?f=25&t=22731 |
Page 1 of 1 |
Author: | sparks [ Sat Aug 25, 2012 9:46 am ] |
Post subject: | Stop Mythbackend |
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 |
Author: | nbdwt73 [ Sat Aug 25, 2012 11:27 am ] |
Post subject: | Re: Stop Mythbackend |
alt-2 = stop backend alt-1 = start backend alt-3 = restart backend |
Author: | sparks [ Sat Aug 25, 2012 11:49 am ] |
Post subject: | Re: Stop Mythbackend |
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. 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. |
Author: | brfransen [ Sat Aug 25, 2012 12:08 pm ] |
Post subject: | Re: Stop Mythbackend |
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? |
Author: | sparks [ Sat Aug 25, 2012 1:11 pm ] |
Post subject: | Re: Stop Mythbackend |
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 |
Author: | sparks [ Sat Aug 25, 2012 1:23 pm ] |
Post subject: | Re: Stop Mythbackend |
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 |
Author: | brfransen [ Sat Aug 25, 2012 2:00 pm ] |
Post subject: | Re: Stop Mythbackend |
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 The mythbackend is pid 20091.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 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 |
Author: | sparks [ Sat Aug 25, 2012 5:01 pm ] |
Post subject: | Re: Stop Mythbackend |
Thanks for setting me straight. Sometimes I problems with the simplest things. <*sigh*> s |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |