Hello,
I'm using an Thumper and want to switch off drives if there're idle for an
configured time. That's not a problem using the powerd of Solaris. But if I
want to find out the status of a drive like "idle time" or "power status" there
is no shell command available. The only thing I found was the man page of the
powermanagment of Solaris which gives me the following infos:
bash-3.00# man pm
DESCRIPTION
The Power Management ( pm) driver provides an interface for
applications to configure devices within the system for
Power Management. The interface is provided through ioctl(2)
commands. The pm driver may be accessed using /dev/pm.
.
.
Using the commands below, an application may take control of
the Power Management of a device from the Power Management
framework driver and manage the transition of device power
levels directly.
For this set of ioctl commands, arg (see ioctl(2)) points to
a structure of type pm_req defined in <sys/pm.h>:
typedef struct pm_req {
char *physpath; /* physical path of device to configure */
/* see libdevinfo(3LIB) */
int component; /* the component of the device */
int value; /* power level, threshold value, or count */
void *data; /* command-dependent variable sized data */
size_t datasize; /* size of data buffer */
} pm_req_t;
PM_GET_TIME_IDLE
PM_GET_TIME_IDLE returns the number of seconds that com-
ponent component of the device named by physpath has
been idle. If the device is not idle, then 0 is
returned.
My problem is that I have got only small knowledge of C-programming and I need
help to understand how to get access to the /dev/pm and request an information.
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code