/* $Id: machine.h,v 2.7 2006/03/31 01:28:28 jad Exp $ * tunes for iostat portability (I doubt that's going to work). (ksb) */ /* CONFIG: change sac.fedex.com to your domain * We use whittle (from mkcmd's lib) to strip off the common * domain part. The "*" is not a legal host character so it * always stops the match. */ #if !defined(TUNE_OUR_DOMAIN) #define TUNE_OUR_DOMAIN "*.sac.fedex.com" #endif /* CONFIG: link though op(8L) to get privs to run vxstat, or not */ #if !defined(USE_OP_FOR_VX) #define USE_OP_FOR_VX 1 #endif /* CONFIG: if we have a meta device tree (Solaris DiskSuite) this is the * root of the dsk/blah nodes. */ #if !defined(RRDISK_MD_ROOT) #define RRDISK_MD_ROOT "/dev/md" #endif /* Derived: figure out the output tpye of an iostat command and * which command line options it should get. */ #if !defined(USE_IOSTAT_TYPE) #if defined(SUN5) /* iostat -x ... * device r/s w/s kr/s kw/s wait actv svc_t %w %b * sd80 0.0 0.1 1.6 3.2 0.0 0.0 16.9 0 0 */ #define USE_IOSTAT_TYPE 'x' #else #if defined(IBMR2) || defined(AIX) /* iostat [-s] [-a] -d [disks] * * System: mem2tsm8 * Kbps tps Kb_read Kb_wrtn * 1.6 0.4 0 8 * * Adapter: Kbps tps Kb_read Kb_wrtn * fcs2 106.1 2.0 65962136 74032256 * * Disks: % tm_act Kbps tps Kb_read Kb_wrtn * hdisk20 0.1 26.7 0.5 28858488 6364892 * ... */ #define USE_IOSTAT_TYPE 'a' #else #if defined(HPUX9)||defined(HPUX10)||defined(HPUX11) #if defined(HPUX9) /* looney "/dev/*dsk/c2015d*s* /dev/*dsk/c2016d*s*" */ #define USE_IOSTAT_TYPE 'B' #else /* device bps sps msps * c1t2d0 0 0.0 1.0 * c2t2d0 0 0.0 1.0 */ #define USE_IOSTAT_TYPE 'h' #endif #else /* unknown at compile time */ /* FreeBSD, NetBSD, OpenBSD, LINUX */ #define USE_IOSTAT_TYPE '?' #endif /* iostat was from HPUX */ #endif /* iostat was from AIX */ #endif /* iostat was from Solaris */ #endif #if !defined(USE_STDARGS) #define USE_STDARGS (defined(FREEBSD)||defined(LINUX)||defined(NETBSD)||defined(OPENBSD)||defined(HPUX11)||(defined(SUN5)&&HOSTOS<20800)) #endif /* Derived: if "timezone" is a global variable we want to use it, if * gettimeofday(2|3) returns the timezone in a buffer pointed to by * the second parameter. */ #if !defined(GETTIMEOFDAY_HAS_ZONE) #define GETTIMEOFDAY_HAS_ZONE (defined(IBMR2)||defined(AIX)) #endif #if !USE_STDARGS #include #endif