Copyright (c) 2001 Sun Microsystems, Inc. All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
th_manage name instance command
th_manage path command
th_manage applies the action specified by command to the instance specified by instance of the driver specified by name (or the driver instance specified by path). The driver instance must be running fault injection specifications (errdefs) defined by th_define(1M).
th_manage supports several commands that operate on the driver instance specified by name and instance (or path). The commands are: broadcast
Awaken all th_define processes, causing them to display their current status and exit if the errdef is now defunct (that is, if count, failcount , and acc_chk are all zero).
Awaken all th_define processes. If count and failcount are already zero, then set acc_chk to zero, so that th_define exits once it has displayed its status.
Awaken all th_define processes. count, failcount and acc_chk are all set to zero so that all th_define commands exit once they have displayed their status.
Awaken all th_define processes. If count is already zero, set failcount and acc_chk to zero, so that th_define exits once it has displayed its status.
List all the access handles.
Begin or resume execution of all errdefs.
Suspend all errdefs for this name and instance (or path).
Example 1 Useful Commands
To begin the tests, enter:
# th_manage foo 0 start
To check the status of the errdefs, enter:
# th_manage foo 0 broadcast
This causes each th_define process to print out its current status.
If the driver has reported a fatal error, you can take the driver offline using libdevice, clear the error condition by entering:
# th_manage foo 0 clear_acc_chk
or
# th_manage foo 0 clear_errors
and bring the driver online again using libdevice.
To terminate testing, enter:
# th_manage foo 0 clear_errdefs
th_define(1M)