Commit Graph

47 Commits

Author SHA1 Message Date
edwin
3919ec2a10 Add the ability to clean up all shared memory segments which are
unused in one go.

From the original PR:

	I've observed that linux apps running under the linuxulator
	have a habit of leaving behind shared memory segments which
	are unused, but which eventually cause the system to run
	out of free segments and these apps will stop working.
	ipcrm(1) currently only allows removal of unused message
	queues, shared memory segments and semaphores on an individual
	basis, or those having a matching (non-zero) key. However
	it would often be convenient to just do a complete cleanup
	of everything, usually as root.

PR:		bin/118292
Submitted by:	Callum Gibson <callumgibson@optusnet.com.au>
Not reviewed by:	grog@
Approved by:	grog@
2007-12-25 00:52:24 +00:00
edwin
75ddc3d235 Stylify ipcs/ipcs.c and ipcrm/ipcrm in preparation of the upcoming
changes as proposed in bin/118292.

Feel free to mention any I have missed, there is much to learn with
regarding to style(9).

Approved by:	grog@
2007-12-18 09:39:47 +00:00
maxim
56aa973128 o Fix typo in a comment.
PR:		bin/97292
Submitted by:	clsung
MFC after:	3 days
2006-05-15 08:20:38 +00:00
csjp
8d2abe7f00 Change the data type of the upper shared memory limits from a signed
integer to an unsigned long. This lifts variables like the maximum
number of pages available for shared memory from 2^31 to 2^32 on 32
bit architectures, and from 2^31 to 2^64 on 64 bit architectures.

It should be noted that this changes breaks ABI on 64 bit architectures
because the size of the shmmax, shmmin, shmmni, shmseg and shmall members
of the shminfo structure has changed.

Silence on:	current@
2005-08-06 07:20:18 +00:00
csjp
377408df64 If sysctlbyname fails for kernel related reasons, tag the errno
string to the end of the error message. I think we used errx()
there when we really wanted an err().

MFC after:	1 week
2005-05-24 23:42:09 +00:00
keramida
891dde82bd Use 12 columns for (int) values, 20 columns for (long) and align
headers properly (right justified for numbers, left justified for
everything else).

This fixes the alignment of the fields on i386, sparc64 and amd64
today but does not dynamically assign column widths or bear in mind
that some of the values may be 64-bit in the future.

Reviewed by:	alfred
2005-03-08 13:14:46 +00:00
stefanf
7b37822a69 Turn K&R functions into prototypes. 2005-02-10 09:13:20 +00:00
ru
7f3c7f0d46 Sort sections. 2005-01-18 13:43:56 +00:00
rwatson
1cba4e2961 third of several commits to allow kernel System V IPC data structures
to be modified and extended without breaking the user space ABI:

Make the "ipcs" tool, which grubs around in kernel memory to report
status relating to System V IPC, use the _kernel variants on the
System V IPC data structures.

Submitted by:	Dandekar Hrishikesh <rishi_dandekar at sbcglobal dot net>
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, SPAWAR, McAfee Research
2004-11-12 13:33:55 +00:00
ru
fb1d8b3724 Mechanically kill hard sentence breaks. 2004-07-02 22:22:35 +00:00
ru
85d438d814 Added -u to the SYNOPSIS. 2004-05-18 20:40:37 +00:00
ru
a79688fc3a Bump document date on behalf of the -u option. 2004-05-18 20:38:43 +00:00
bmilekic
c9d98abb97 Add -u option to ipcs(1) and document it in ipcs.1
It allows you to list IPC facilities owned by username/uid.

Submitted by: Christian S.J. Peron <maneo@bsdpro.com>
PR: bin/63463
2004-03-24 04:01:43 +00:00
ru
743cc6d002 Fixed style of DPADD and LDADD assignments as per style.Makefile(5). 2004-02-05 22:44:25 +00:00
iwasaki
5b0a8ffac4 Cosmetic fix on some TIME related columns. 2003-10-30 16:52:14 +00:00
ru
080c619b2e Markup bits.
Approved by:	re (blanket)
2003-05-21 21:07:28 +00:00
tjr
0c9bec33f5 The descriptions of the -C and -M options were around the wrong way;
fix this.

PR:		49968
MFC after:	2 weeks
2003-03-24 10:45:12 +00:00
tjr
da889e2a7f Add -M, -Q, -S, and -T to the usage message. 2003-03-24 10:40:24 +00:00
obrien
bc61fc95d8 Consistently use FBSDID 2002-06-30 05:25:07 +00:00
joe
36c976074e Replace /kernel with /boot/kernel/kernel.
PR:		docs/37757
Submitted by:	Hiten Pandya <hiten@uk.FreeBSD.org>
2002-05-09 11:47:42 +00:00
charnier
ad8a79e6a5 Use `The .Nm utility' 2002-04-20 12:18:28 +00:00
dwmalone
e1a6bcf77d 1) Add missing prototypes for fmt_perm and cvt_time.
2) Move a break outside a #if block to keep gcc3 from seeing a "default:"
   at the end of a block.
3) Fix some format warnings. Some remain which can be fixed more easily
   when we have a full C99 printf.
2002-03-30 16:46:04 +00:00
imp
74d826c7a6 remove __P 2002-03-22 01:22:50 +00:00
imp
60cc340d82 Fixed divots that I created when I moved prototypes of group_from_gid
and user_from_uid to grp.h and pwd.h.  Update the man pages.

Submitted by: David Malone
Pointy hat to: imp
2002-02-19 00:05:59 +00:00
dd
dc0185a459 Include missing header files which define functions for which gcc has
builtins (e.g., exit, strcmp).
2001-06-24 19:50:42 +00:00
dd
afa7c3de74 Don't install setgid kmem. 2001-06-01 01:14:28 +00:00
dd
5d0075dbe1 Convert to use the sysctl interface to obtain the data when operating
on a running system.  Using kvm is still supported, primarily for
postmortem analysis.

Reviewed by:	tmm
2001-05-31 22:30:39 +00:00
ru
c23c39b3a4 mdoc(7) police: removed history info from the .Os FreeBSD call. 2000-12-14 11:52:05 +00:00
ru
0d1334ca0c mdoc(7) police: use the new features of the Nm macro. 2000-11-20 19:21:22 +00:00
peter
2af5c3f860 Remove the undocumented semconfig() system calls. These cause more trouble
than they are worth.
2000-05-01 10:49:41 +00:00
nectar
2bfd3498b2 Instead of checking for a non-zero return value from kvm_read, check
whether we read as many bytes as we expected.
2000-03-31 15:02:10 +00:00
peter
d53e4c1d80 Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"
is an application space macro and the applications are supposed to be free
to use it as they please (but cannot).  This is consistant with the other
BSD's who made this change quite some time ago.  More commits to come.
1999-12-29 05:07:58 +00:00
peter
3b842d34e8 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
charnier
409a50cddf .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq. 1998-03-23 07:48:45 +00:00
charnier
783e86e99e Add rcsid, Remove unused vars. 1997-07-15 09:55:59 +00:00
eivind
5947fe7914 From the PR:
ipcs -T' shows system information about shared memory,
	message queues and semaphores. But the manual description does
	not mention semapores.

Now it does.
PR:		docs/3489
Submitted by:	k-horik@yk.rim.or.jp
1997-05-04 20:17:54 +00:00
imp
141381e1cb compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 04:34:07 +00:00
peter
f390c26dd9 Revert $FreeBSD$ to $Id$ 1997-02-22 19:58:13 +00:00
jkh
808a36ef65 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
wosch
000fb64288 delete doubled words, e.g.: "the the" -> "the" 1996-10-05 22:27:30 +00:00
joerg
81a254ffb3 s/msg/shm/ for one variable.
Submitted by:	jin@george.lbl.gov (Jin Guojun[ITG])
1996-07-18 20:42:48 +00:00
pst
9d48774924 Drop privileges if we're not reading standard kernel file or namelist.
Submitted by:	smpatel (Sujal Patel)
1996-05-30 02:18:44 +00:00
bde
9bdc2db62d Instantiate our own variables instead of depending on bogus common
declarations in system headers that will be fixed soon.
1995-07-12 19:10:17 +00:00
nate
b0e421ddac NetBSD -> FreeBSD
(Bring to 2.0 please)
1994-11-19 18:19:27 +00:00
dg
227775e50c Declared msginfo, shminfo, and seminfo structs. 1994-09-19 10:24:38 +00:00
dfr
6294a52660 Imported the NetBSD version which acts a lot more like the SYSV program.
Obtained from: NetBSD
1994-09-13 16:59:29 +00:00
dfr
8d5f738b88 Added from FreeBSD-1.1.5 with some additions to list shared memory segments. 1994-09-13 15:27:02 +00:00