1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 23 /* Copyright (c) 1994 - 2001 by Sun Microsystems, Inc. */ 24 /* All rights reserved. */ 25 26 #ifndef _POWERD_H 27 #define _POWERD_H 28 29 #ifdef __cplusplus 30 extern "C" { 31 #endif 32 33 /* 34 * path shared by powerd and pmconfig 35 */ 36 #define PIDPATH "/var/run/powerd.pid" 37 38 /* 39 * AutoShutdown configuration data 40 */ 41 struct pwr_info { 42 int pd_flags; /* Status of powerd */ 43 int pd_idle_time; /* in minutes */ 44 int pd_start_time; /* in minutes since midnight */ 45 int pd_finish_time; /* in minutes since midnight */ 46 47 int pd_autoresume; /* Autoresume active */ 48 int pd_autoshutdown; /* Autoshutdown active */ 49 50 int pd_ttychars_idle; /* Tty chars idle time */ 51 int pd_ttychars_sum; /* Sum of tty chars */ 52 int pd_loadaverage_idle; /* Load average idle time */ 53 float pd_loadaverage; /* Load average */ 54 int pd_diskreads_idle; /* Disk reads idle time */ 55 int pd_diskreads_sum; /* Sum of disk reads */ 56 int pd_nfsreqs_idle; /* NFS requests idle time */ 57 int pd_nfsreqs_sum; /* Sum of NFS requests */ 58 }; 59 typedef struct pwr_info pwr_info_t; 60 61 /* Various status flags for pd_flags */ 62 #define PD_AC 0x02 63 #define PD_AUTORESUME 0x04 64 #define PD_RESUME_ON 0x08 65 66 #ifdef __cplusplus 67 } 68 #endif 69 70 #endif /* _POWERD_H */ 71