12/30/92	Version 0.02 	Vlad

Fixed minor output bugs. Made ipcs work with SVR3 compatible
shared memory and message queues. Semaphore part is still working
with old 286 semaphores. Output layaout for semaphores may be wrong.

shmemul.c is included because the proper interface was not
included in libc.a. It should be removed as soon as libc.a will
be fixed.


09/22/92:	Version 0.01

This ipcs command does not yet support the Corefile option.

ipcs will grok /autoboot by default for the symbols NSEMID, NSHMID and
NMSQID, which are the max allowable semaphores, shared memory segments
and message queues. It does not touch /dev/kmem. I see no reason for this.

Next, it will then perform msgctl()s, semctl()s and/or shmctl()s as necessary
to get the stats for any active message queues, semaphores and
shared memory segments.

It will then print out the information based upon the arguments passed
on the command line.

This ipcs has on flag that is not part of SV, the 'V' or 'version'
flag, which will print the internal version number of the ipcs command.

Warning: when requesting information on active message queues, the command
will run noticeably slower. This is due to the message queue sequence
numbering scheme used by our message driver. Vlad is working on a new
message driver, and ipcs will be updated to snarf msg information
more quickly when the new driver is available.


Docs:

ipcs [ options ]

ipcs prints certain information about active message queues, semaphores
and shared memory segments. The information printed is based upon the
options passed to the command. The options are:

-q	print info about active message queues
-m	print info about active shared memory segments
-s	print info about active semaphores

If none of the above options are specified, information about each active
ipc driver will be printed.

-b	message queues:	 max. allowable bytes on message queue
	shared memory:	 size of shared memory segment
	semaphores:	 number of semaphores in each set

-c	(all):		 print creator's login name and group

-o	message queues:	 number of messages, total bytes in messages on
			 queue.
-p	message queues:	 last process to send message, last process
			 to receive message.
	shared memory:	 id of creating process, last process
			 to attach or detach (Not available)
-t	message queues:	 time of last msgsend() and msgrcv()
	shared memory:	 time of last shmat() or shmdt() (Not available)
	semaphores:	 time of last semop()

-a	use all print (above) options 

-C corefile:		specify corefile to use in place of /autoboot
-N namelist:		specify name of alternate kernel (/autoboot default)



ipcs column headings:

T	type of facility:	q = message queue
				m = shared memory segment
				s = semaphore segment

ID	Identifier for facility entry. This is the 'id' argument
	passed from shmctl(), msgctl() or semctl() a user program
	would use to access the facility.

KEY	This is the key used by msgget(), semget() or shmget() to
	create the facility.

MODE	The permissions associated with the shared memory segment, message
	queue or semaphore. This field may contain additional characters
	when printing the statistics of a message queue:
		R	A process is waiting on a msgrcv()
		W	A process is waiting on a msgsnd()
		-	msgrcv()/msgsnd() flag is not set

	The octal number in this field represents the permissions. Please
	refer to the lexicon article on chmod for information on the
	values in this field.

OWNER	The login name if the person who owns the facility

GROUP	The group that the owner belongs to

CREATOR	The login name of the creator of the facility

CGROUP	The group that the creator of the facility belongs to

CBYTES	The number of bytes currently used in the message queue

QNUM	The number of messages in the message queue

QBYTES	The maximimum number of bytes in the message queue

LSPID	The process id of the last process to send a message to the queue

LRPID	The process id of the last process to reveive a message from the queue

STIME	The last time a message was sent to the message queue

RTIME	The last time a messge was received from the message queue

CTIME	(shared memory and message queues) The time the shared memory segement
	or message queue was created or last modified.

NATTCH	Number of processes attached to the associated shared memory segment
	(Not available)

SEGSZ	Size of the shared memory segment

CPID	The process id that created the shared memory segment

LPID	The process id of the last attach or detach from the
	shared memory segment (Not available)

ATIME	Time of last attach to the shared memory segment (Not available)

DTIME	Time of last detach from the shared memory segment (Not available)

NSEMS	The number of semaphore elements in the semaphore

OTIME	The time that the semaphore was created or last modified
