"Fossies" - the Fresh Open Source Software Archive

Member "xosview-1.23/linux/nfsmeter.h" (11 Jul 2020, 1191 Bytes) of package /linux/misc/xosview-1.23.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "nfsmeter.h" see the Fossies "Dox" file reference documentation.

    1 //
    2 //
    3 //  This file may be distributed under terms of the GPL
    4 //
    5 
    6 #ifndef _NFSMETER_H_
    7 #define _NFSMETER_H_
    8 
    9 #include "fieldmetergraph.h"
   10 #include "xosview.h"
   11 #include "timer.h"
   12 
   13 
   14 class NFSMeter : public FieldMeterGraph {
   15 public:
   16     NFSMeter(
   17         XOSView *parent,
   18         const char *name,
   19         int   nfields,
   20         const char *files,
   21         const char *statfile);
   22   ~NFSMeter( void );
   23 
   24   const char *name( void ) const { return _statname; }
   25   void checkResources( void );
   26   void starttimer(void) { return _timer.start(); };
   27   void stoptimer(void) { return _timer.stop(); };
   28   double usecs(void) { return _timer.report_usecs(); };
   29 
   30 protected:
   31   const char *_statname;
   32   const char *_statfile;
   33 
   34 private:
   35   Timer _timer;
   36 
   37 };
   38 
   39 class NFSStats : public NFSMeter {
   40 public:
   41   NFSStats(XOSView *parent);
   42   ~NFSStats(void);
   43 
   44   void checkevent( void );
   45 
   46   void checkResources( void );
   47 private:
   48     unsigned long _lastcalls, _lastretrns, _lastauthrefresh;
   49 };
   50 
   51 class NFSDStats : public NFSMeter {
   52 public:
   53   NFSDStats(XOSView *parent);
   54   ~NFSDStats(void);
   55 
   56   void checkevent( void );
   57 
   58   void checkResources( void );
   59 
   60 protected:
   61   float maxpackets_;
   62 
   63 private:
   64   unsigned long _lastTcp, _lastUdp, _lastNetCnt, _lastBad;
   65 };
   66 
   67 #endif