From owner-freebsd-questions@freebsd.org Thu Jan 25 11:13:01 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C284BED05C4 for ; Thu, 25 Jan 2018 11:13:01 +0000 (UTC) (envelope-from frank2@fjl.co.uk) Received: from bs1.fjl.org.uk (bs1.fjl.org.uk [84.45.41.196]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "bs1.fjl.org.uk", Issuer "bs1.fjl.org.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2CE3276C91 for ; Thu, 25 Jan 2018 11:13:00 +0000 (UTC) (envelope-from frank2@fjl.co.uk) Received: from roundcube.fjl.org.uk (localhost [127.0.0.1]) by bs1.fjl.org.uk (8.14.4/8.14.4) with ESMTP id w0PAlfha021507 for ; Thu, 25 Jan 2018 10:47:41 GMT (envelope-from frank2@fjl.co.uk) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 25 Jan 2018 10:47:41 +0000 From: Frank Leonhardt To: freebsd-questions@freebsd.org Subject: Re: Limit resources for a given program Organization: FJL Microsystems In-Reply-To: References: Message-ID: <2014529083ae48e21732fa60a4062356@roundcube.fjl.org.uk> X-Sender: frank2@fjl.co.uk User-Agent: Roundcube Webmail/0.9.2 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jan 2018 11:13:01 -0000 On 2018-01-23 05:40, Olivier wrote: > Is there a way, in FreeBSD, to limit the clocktime for a given command? > > I use LibreOffice to automatically convert many types of documents to > PDF. When it is an HTML document with external links, it will run > indefinitely, trying to access the external resources. It will not use > much CPU but mostly sits idled, so limits(8) -t is not the solution, > nor > is rctl(8) that needs a process ID (but I only have the command name) > or > a user ID (but I don't want to limit a user, just that program). I'm a bit confused about what your problem is? What exactly do you mean by "clocktime" - do you mean wall time (i.e. time elapsed)? You say it's not using a lot of resource, so what's the problem? Or do you just want to kill it when it gets stuck?