From owner-freebsd-stable@FreeBSD.ORG Thu Dec 15 17:44:13 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0169016A41F for ; Thu, 15 Dec 2005 17:44:12 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0BE4C43D5A for ; Thu, 15 Dec 2005 17:44:11 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail02.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id jBFHi9PE007440 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Fri, 16 Dec 2005 04:44:10 +1100 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1]) by cirb503493.alcatel.com.au (8.12.10/8.12.10) with ESMTP id jBFHi9Hh081864 for ; Fri, 16 Dec 2005 04:44:09 +1100 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost) by cirb503493.alcatel.com.au (8.12.10/8.12.9/Submit) id jBFHi9X2081863 for freebsd-stable@freebsd.org; Fri, 16 Dec 2005 04:44:09 +1100 (EST) (envelope-from pjeremy) Date: Fri, 16 Dec 2005 04:44:09 +1100 From: Peter Jeremy To: freebsd-stable@freebsd.org Message-ID: <20051215174409.GN77268@cirb503493.alcatel.com.au> References: <20051215132556.GB74188@freenix.no> <200512151422.jBFEM4Ei058512@lurza.secnetix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200512151422.jBFEM4Ei058512@lurza.secnetix.de> User-Agent: Mutt/1.4.2.1i X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc Subject: Re: shmget errors X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2005 17:44:13 -0000 On Thu, 2005-Dec-15 15:22:04 +0100, Oliver Fromme wrote: >Also, the following shell snippet might be helpful: > >ipcs | awk '($1=="m"){print $2}' | xargs -n 1 -t ipcrm -m ipca -ma | awk '$9 == "0"{print $2}' | xargs -n 1 -t ipcrm -m has the advantage of only removing segments with no processes attached. >It removes _all_ shared memory segments. Be careful: >Don't do that while any programs are still running which >use SysV shared memory. As with deleting open files, the segment doesn't disappear immediately but only after the last process detaches (see IPC_RMID in shmctm(2)). > You can check that by looking at >the output of ``ipcs -p'': If the process IDs listed under >the CPID and LPID columns don't exist, chances are that the >memory segment isn't in use anymore. Looking at NATTACH in "ipcs -a" is a better approach. -- Peter Jeremy