HPUX havedisk[3n]






 rstat(3N)                                                         rstat(3N)





 NAME
      rstat(), havedisk() - get performance data from remote kernel

 SYNOPSIS
      #include <time.h>
      #include <rpcsvc/rstat.h>

      int havedisk(char *host);

      int rstat(char *host, struct statstime *statp);

 DESCRIPTION
      havedisk() returns 1 if host has a disk, 0 if it does not, and -1 if
      this cannot be determined.  The host string is either the official
      name of the host or an alias for it.  See hosts(4) for more
      information regarding host names.

      rstat() fills in the statstime structure for host, and returns 0 if it
      was successful.  The relevant structures are:

           struct stats {               /* RSTATVERS_ORIG */
               int cp_time[CPUSTATES];  /* the time spent in each CPU state */
               int dk_xfer[DK_NDRIVE];  /* total number of disk transfers
                                           on each of the disk interfaces */
               unsigned v_pgpgin;       /* total VM pages paged in */
               unsigned v_pgpgout;      /* total VM pages paged out */
               unsigned v_pswpin;       /* total VM pages paged swapped in */
               unsigned v_pswpout;      /* total VM pages paged swapped out */
               unsigned v_intr;         /* total interrupts */
               int if_ipackets;         /* inbound packets on all interfaces */
               int if_ierrors;          /* inbound errors on all interfaces */
               int if_opackets;         /* outbound packets on all interfaces */
               int if_oerrors;          /* outbound errors on all interfaces */
               int if_collisions;       /* collisions seen on all interfaces */
           };

           struct statsswtch {          /* RSTATVERS_SWTCH */
               int cp_time[CPUSTATES];  /* the time spent in each CPU state */
               int dk_xfer[DK_NDRIVE];  /* total number of disk transfers
                                           on each of the disk interfaces */
               unsigned v_pgpgin;       /* total VM pages paged in */
               unsigned v_pgpgout;      /* total VM pages paged out */
               unsigned v_pswpin;       /* total VM pages paged swapped in */
               unsigned v_pswpout;      /* total VM pages paged swapped out */
               unsigned v_intr;         /* total interrupts */
               int if_ipackets;         /* inbound packets on all interfaces */
               int if_ierrors;          /* inbound errors on all interfaces */
               int if_opackets;         /* outbound packets on all interfaces */
               int if_oerrors;          /* outbound errors on all interfaces */
               int if_collisions;       /* collisions seen on all interfaces */
               unsigned v_swtch;        /* total context switches */



 Hewlett-Packard Company            - 1 -     HP-UX Release 9.0: August 1992






 rstat(3N)                                                         rstat(3N)





               long avenrun[3];         /* average number of running jobs */
               struct timeval boottime; /* time of last boot */
           };

           struct statstime {           /* RSTATVERS_TIME */
               int cp_time[CPUSTATES];  /* the time spent in each CPU state */
               int dk_xfer[DK_NDRIVE];  /* total number of disk transfers
                                           on each of the disk interfaces */
               unsigned v_pgpgin;       /* total VM pages paged in */
               unsigned v_pgpgout;      /* total VM pages paged out */
               unsigned v_pswpin;       /* total VM pages paged swapped in */
               unsigned v_pswpout;      /* total VM pages paged swapped out */
                unsigned v_intr;         /* total interrupts */
                int if_ipackets;         /* inbound packets on all interfaces */
                int if_ierrors;          /* inbound errors on all interfaces */
                int if_opackets;         /* outbound packets on all interfaces */
                int if_oerrors;          /* outbound errors on all interfaces */
                int if_collisions;       /* collisions seen on all interfaces */
                unsigned v_swtch;        /* total context switches */
                long avenrun[3];         /* average number of running jobs */
                struct timeval boottime; /* time of last boot */
                struct timeval curtime;  /* current system time */
           };

    RPC Info
           program number:
                RSTATPROG

           xdr routines:
                int xdr_stats(xdrs, stat)
                     XDR *xdrs;
                     struct stats *stat;
                int xdr_statsswtch(xdrs, stat)
                     XDR *xdrs;
                     struct statsswtch *stat;
                int xdr_statstime(xdrs, stat)
                     XDR *xdrs;
                     struct statstime *stat;
                int xdr_timeval(xdrs, tv)
                     XDR *xdrs;
                     struct timeval *tv;

           procs:
                RSTATPROC_HAVEDISK
                     Takes no arguments, returns long
                     which is true if remote host has a disk.
                RSTATPROC_STATS
                     Takes no arguments, return struct statsxxx,
                     depending on version.
           versions:
                RSTATVERS_ORIG



 Hewlett-Packard Company            - 2 -     HP-UX Release 9.0: August 1992






 rstat(3N)                                                         rstat(3N)





                RSTATVERS_SWTCH
                RSTATVERS_TIME

 WARNING
      User applications that call this routine must be linked with
      /usr/include/librpcsvc.a.  For example,

           cc my_source.c -lrpcsvc

 AUTHOR
      rstat() was developed by Sun Microsystems, Inc.

 SEE ALSO
      rup(1), rstatd(1M).








































 Hewlett-Packard Company            - 3 -     HP-UX Release 9.0: August 1992