Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

devreserv(1m) [opensolaris man page]

devreserv(1M)						  System Administration Commands					     devreserv(1M)

NAME
devreserv - reserve devices for exclusive use SYNOPSIS
devreserv [key [device-list]...] DESCRIPTION
devreserv reserves devices for exclusive use. When the device is no longer required, use devfree to release it. devreserv reserves at most one device per device-list. Each list is searched in linear order until the first available device is found. If a device cannot be reserved from each list, the entire reservation fails. When devreserv is invoked without arguments, it lists the devices that are currently reserved and shows to which key it was reserved. When devreserv is invoked with only the key argument, it lists the devices that are currently reserved to that key. OPERANDS
The following operands are supported: device-list Defines a list of devices that devreserv will search to find an available device. The list must be formatted as a single argument to the shell. key Designates a unique key on which the device will be reserved. The key must be a positive integer. EXAMPLES
Example 1 Reserving a Floppy Disk and a Cartridge Tape The following example reserves a floppy disk and a cartridge tape: $ key=$$ $ echo "The current Process ID is equal to: $key" The Current Process ID is equal to: 10658 $ devreserv $key diskette1 ctape1 Example 2 Listing All Devices Currently Reserved The following example lists all devices currently reserved: $ devreserv disk1 2423 diskette1 10658 ctape1 10658 Example 3 Listing All Devices Currently Reserved to a Particular Key The following example lists all devices currently reserved to a particular key: $ devreserv $key diskette1 ctape1 EXIT STATUS
The following exit values are returned: 0 Successful completion. 1 Command syntax was incorrect, an invalid was option used, or an internal error occurred. 2 Device table or device reservation table could not be opened for reading. 3 Device reservation request could not be fulfilled. FILES
/etc/device.tab /etc/devlkfile ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
devfree(1M), attributes(5) NOTES
The commands devreserv and devfree are used to manage the availability of devices on a system. Their use is on a participatory basis and they do not place any constraints on the actual access to the device. They serve as a centralized bookkeeping point for those who wish to use them. Devices which have been reserved cannot be used by processes which utilize the device reservation functions until the reserva- tion has been canceled. However, processes that do not use device reservation may use a device that has been reserved since such a process would not have checked for its reservation status. SunOS 5.11 5 Jul 1990 devreserv(1M)

Check Out this Related Man Page

getdgrp(1M)						  System Administration Commands					       getdgrp(1M)

NAME
getdgrp - lists device groups which contain devices that match criteria SYNOPSIS
/usr/sbin/getdgrp [-ael] [criteria...] [dgroup...] DESCRIPTION
getdgrp generates a list of device groups that contain devices matching the given criteria. The criteria is given in the form of expres- sions. OPTIONS
The following options are supported: -a Specifies that a device must match all criteria to be included in the list generated by this command. The option has no effect if no criteria are defined. -e Specifies that the list of device groups on the command line should be excluded from the list generated by this command. Without the -e option the named device groups are included in the generated list. The flag has no effect if no devices are defined. -l Specifies that all device groups (subject to the -e option and the dgroup list) should be listed even if they contain no valid device members. This option has no affect if criteria is specified on the command line. OPERANDS
The following operands are supported: criteria Defines criteria that a device must match before a device group to which it belongs can be included in the generated list. Specify criteria as an expression or a list of expressions which a device must meet for its group to be included in the list generated by getdgrp. If no criteria are given, all device groups are included in the list. Devices must satisfy at least one of the criteria in the list. However, the -a option can be used to define that a "logi- cal and" operation should be performed. Then, only those groups containing devices which match all of the criteria in a list will be included. There are four possible expressions types which the criteria specified in the criteria argument may follow: attribute=value Selects all device groups with a member whose attribute attribute is defined and is equal to value. attribute!=value Selects all device groups with a member whose attribute attribute is defined and does not equal value. attribute:* Selects all device groups with a member which has the attribute attribute defined. attribute!:* Selects all device groups with a member which does not have the attribute attribute defined. See putdev(1M) for a complete listing and description of available attributes. dgroup Defines a set of device groups which should be included in or excluded from the generated list. Device groups that are defined and which contain devices matching the criteria are included. If the -e option is used, this list defines a set of device groups to be excluded. When the -e option is used and crite- ria is also defined, the generated list will include device groups containing devices which match the criteria and are not in the command line list. EXIT STATUS
The following exit values are returned: 0 Successful completion of the task. 1 Command syntax was incorrect, invalid option was used, or an internal error occurred. 2 Device table or device group table could not be opened for reading. FILES
/etc/device.tab /etc/dgroup.tab ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
devattr(1M), getdev(1M), putdev(1M), putdgrp(1M), attributes(5) SunOS 5.10 5 Jul 1990 getdgrp(1M)
Man Page