Re: [systemd-devel] Is there any way to stop services in cgroup?

2014-01-06 Thread Tony Seo
 In my case, "PartOf " is the most proper among your suggestions.
 I wonder why "PartOf=.target" didn't work when I typed systemctl command.

 Thanks.




2014/1/3 Mantas Mikulėnas 

> On Thu, Jan 2, 2014 at 4:02 PM, Tony Seo  wrote:
> > Hello.
> > I wonder that systemd has a method to stop all services in specific
> cgroup.
> > Actually, I have looked for a method to stop all services as the same
> time.
> > I have searched many manual in systemd site.
> > I couldn't find any method to stop all services which I want to stop.
>
> If you're trying to stop all instances of a service, systemd-git
> recently had wildcard support added, so `systemctl stop
> sshd@*.service` will now work.
>
> Otherwise, use a .target and BindsTo.
>
>
> --
> Mantas Mikulėnas 
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Is there any way to stop services in cgroup?

2014-01-02 Thread Andrey Borzenkov
В Чт, 02/01/2014 в 17:43 +0200, Mantas Mikulėnas пишет:
> On Thu, Jan 2, 2014 at 4:02 PM, Tony Seo  wrote:
> > Hello.
> > I wonder that systemd has a method to stop all services in specific cgroup.
> > Actually, I have looked for a method to stop all services as the same time.
> > I have searched many manual in systemd site.
> > I couldn't find any method to stop all services which I want to stop.
> 
> If you're trying to stop all instances of a service, systemd-git
> recently had wildcard support added, so `systemctl stop
> sshd@*.service` will now work.
> 
> Otherwise, use a .target and BindsTo.
> 
> 

PartOf is probably more appropriate here. But the practical problem is
that both must be specified for each unit explicitly, which simply does
not scale for future unknown services.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Is there any way to stop services in cgroup?

2014-01-02 Thread Mantas Mikulėnas
On Thu, Jan 2, 2014 at 4:02 PM, Tony Seo  wrote:
> Hello.
> I wonder that systemd has a method to stop all services in specific cgroup.
> Actually, I have looked for a method to stop all services as the same time.
> I have searched many manual in systemd site.
> I couldn't find any method to stop all services which I want to stop.

If you're trying to stop all instances of a service, systemd-git
recently had wildcard support added, so `systemctl stop
sshd@*.service` will now work.

Otherwise, use a .target and BindsTo.


-- 
Mantas Mikulėnas 
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Is there any way to stop services in cgroup?

2014-01-02 Thread Jóhann B. Guðmundsson


On 01/02/2014 02:02 PM, Tony Seo wrote:

Hello.
I wonder that systemd has a method to stop all services in specific 
cgroup.
Actually, I have looked for a method to stop all services as the same 
time.

I have searched many manual in systemd site.
I couldn't find any method to stop all services which I want to stop.
I need some advices for solving this problem.


You would create a custom target and have all services bind to that 
target then you can simply run systemctl stop my-custom.target which 
would stop a.service b.service c.service that are bound to that target 
as opposed to having to run "systemctl stop a.service b.service c.service"


JBG
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Is there any way to stop services in cgroup?

2014-01-02 Thread Tony Seo
Hello.
I wonder that systemd has a method to stop all services in specific cgroup.
Actually, I have looked for a method to stop all services as the same time.
I have searched many manual in systemd site.
I couldn't find any method to stop all services which I want to stop.
I need some advices for solving this problem.

Thanks.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel