Limiting Processes

Shane Hale merlyn at
Mon Apr 28 14:40:31 PDT 2003

It's not so much a load issue.  I don't want these users constantly
connected, as they treat it like a bot service, which we are far from.
We have edited the login.conf but to no luck.


-----Original Message-----
From: Dan Nelson [mailto:dnelson at] 
Sent: Monday, April 28, 2003 5:11 PM
To: Shane Hale
Cc: freebsd-questions at
Subject: Re: Limiting Processes

In the last episode (Apr 28), Shane Hale said:
> I'm trying to limit the amount of time a process will run in userland.

> Some of the users on my the network decide to keep BitchX and IRC 
> processes running for eons and I'm wondering if there is a way to stop

> this.

You can set per-process cpu limits in /etc/login.conf (the cputime
capability).  Although you may be misreading the CPU column.  It's in
minutes:seconds.fractions, so for example
> beastah 29501  0.0  1.2  3324 1460  p3  Ss+  11Apr03   2:37.11 BitchX
-n BeAsTaH (BitchX-1.0c19)

This user started a session on the 11th, and it has consumed 2 minutes
of CPU time.  Not all that much for 17 days of real time.  If you have a
CPU load issue it's probably someplace else.

If you just want to kill long-running processes on principle, the idled
utility in ports/sysutils/idled might have a way to do that.

	Dan Nelson
	dnelson at

More information about the freebsd-questions mailing list