From owner-cvs-all@FreeBSD.ORG Tue Apr 8 20:12:19 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B1E3037B401; Tue, 8 Apr 2003 20:12:19 -0700 (PDT) Received: from espresso.bsdmike.org (espresso.bsdmike.org [65.39.129.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0068043F93; Tue, 8 Apr 2003 20:12:19 -0700 (PDT) (envelope-from mike@espresso.bsdmike.org) Received: by espresso.bsdmike.org (Postfix, from userid 1002) id 83AB79C68; Tue, 8 Apr 2003 22:58:08 -0400 (EDT) Date: Tue, 8 Apr 2003 22:58:08 -0400 From: Mike Barcroft To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Message-ID: <20030408225808.A16782@espresso.bsdmike.org> References: <200304090304.h3934Csu028105@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200304090304.h3934Csu028105@repoman.freebsd.org>; from mike@FreeBSD.org on Tue, Apr 08, 2003 at 08:04:12PM -0700 Organization: The FreeBSD Project Subject: Re: cvs commit: src/usr.bin/killall killall.1 killall.c src/usr.sbin Makefile src/usr.sbin/jail jail.8 jail.c src/usr.sbin/jexec Makefile jexec.8 jexec.c src/usr.sbin/jls Makefile jls.8 jls.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2003 03:12:20 -0000 Mike Barcroft writes: > mike 2003/04/08 20:04:12 PDT > > FreeBSD src repository > > Modified files: > usr.bin/killall killall.1 killall.c > usr.sbin Makefile > usr.sbin/jail jail.8 jail.c > Added files: > usr.sbin/jexec Makefile jexec.8 jexec.c > usr.sbin/jls Makefile jls.8 jls.c > Log: > o Add jls(8) for listing active jails. > o Add jexec(8) to execute a command in an existing jail. > o Add -j option for killall(1) to kill all processes in a specified > jail. > o Add -i option to jail(8) to output jail ID of newly created jail. Here's what it looks like in use: %%% sol# jail /tmp/jail localhost 127.0.0.1 /bin/sh & [1] 19114 sol# jail /tmp/jail localhost 127.0.0.1 /bin/csh & [2] 19139 [1] + Suspended (tty input) jail /tmp/jail localhost 127.0.0.1 /bin/sh sol# jls JID IP Address Hostname Path 2 127.0.0.1 localhost /tmp/jail 1 127.0.0.1 localhost /tmp/jail [2] + Suspended (tty input) jail /tmp/jail localhost 127.0.0.1 /bin/csh sol# jexec 2 /bin/ps -auxww USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND 0 19139 0.0 0.1 1268 708 p4 TJ 3:09AM 0:00.03 /bin/csh 0 19217 0.8 0.1 640 312 p4 R+J 3:09AM 0:00.01 /bin/ps -auxww sol# jexec 1 /bin/csh %ps -auxww USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND 0 19114 0.0 0.1 872 444 p4 TJ 3:08AM 0:00.02 /bin/sh 0 19318 0.8 0.2 1504 1200 p4 SJ 3:09AM 0:00.04 /bin/csh 0 19331 0.0 0.1 640 440 p4 R+J 3:09AM 0:00.01 ps -auxww %exit sol# killall -KILL -j 2 [2] - Killed jail /tmp/jail localhost 127.0.0.1 /bin/csh sol# killall -KILL -j 1 [1] + Killed jail /tmp/jail localhost 127.0.0.1 /bin/sh sol# jls sol# %%% Best regards, Mike Barcroft