[Orca-users] Problem adding variables to orcallator.se (via p_vmstat_class.se)

Sean O'Neill soneill at oneill.dhs.org
Sun Apr 21 16:50:10 PDT 2002


This is a long email ... sorry.

Having a problem.  My original additions to orcallator.se were for
variables p_vmstat_class.se was already collecting but orcallator.se was
ignoring.  This worked fine.

Now I'm trying to "add" addition variables to orcallator.se by modifying
p_vmstat_class.se.  What's no apparently working are the variables for:

double pagerec; /* Page Reclaims (includes page out */
double pagefrec; /*Page Reclaims from free list */
double pageins; /* Page ins */
double pageouts; /* Page outs */
double min_fault; /* Minor page faults - this is supposed to be as_fault +
hat_fault - see below */
double maj_fault; /* Major page faults */

Well, these variables are always 0.  Seems my mods below to
p_vmstat_class.se aren't working but I'm not getting any errors
either.  The values are simply always 0.

Hoping someone knows what I'm missing or messed up.

I've modified p_vmstat_class.se as follows:

------

# diff -c p_vmstat_class.se-ORIG p_vmstat_class.se
*** p_vmstat_class.se-ORIG      Sun Apr 21 14:28:30 2002
--- p_vmstat_class.se   Sun Apr 21 16:49:36 2002
***************
*** 66,73 ****
--- 66,79 ----
     int freemem;

     /* these values are per second */
+   double pagerec;
+   double pagefrec;
+   double pageins;
     double pages_in;    /* pages paged in       */
+   double pageouts;
     double pages_out;   /* pages paged out      */
+   double min_fault;
+   double maj_fault;
     double swapins;     /* swap-in occurrences  */
     double swapouts;    /* swap-out occurrences */
     double scan;              /* pages scanned        */
***************
*** 174,181 ****
--- 180,193 ----
           wait_time        = CSIPCT(pvmGLOB_cpu_sysinfo[i].cpu[CPU_WAIT]);
           idle_time        = CSIPCT(pvmGLOB_cpu_sysinfo[i].cpu[CPU_IDLE]);

+         pagerec   = pvmGLOB_cpu_vminfo[i].pgrec/pvmGLOB_etime[i];
+         pagefrec  = pvmGLOB_cpu_vminfo[i].pgfrec/pvmGLOB_etime[i];
+         pageins   = pvmGLOB_cpu_vminfo[i].pgin/pvmGLOB_etime[i];
           pages_in  = pvmGLOB_cpu_vminfo[i].pgpgin/pvmGLOB_etime[i];
+         pageouts  = pvmGLOB_cpu_vminfo[i].pgout/pvmGLOB_etime[i];
           pages_out = pvmGLOB_cpu_vminfo[i].pgpgout/pvmGLOB_etime[i];
+         min_fault = (pvmGLOB_cpu_vminfo[i].hat_fault +
pvmGLOB_cpu_vminfo[i].as_fault)/pvmGLOB_etime[i];
+         maj_fault = pvmGLOB_cpu_vminfo[i].maj_fault/pvmGLOB_etime[i];
           swapins   = pvmGLOB_cpu_vminfo[i].swapin/pvmGLOB_etime[i];
           swapouts  = pvmGLOB_cpu_vminfo[i].swapout/pvmGLOB_etime[i];
           scan      = pvmGLOB_cpu_vminfo[i].scan/pvmGLOB_etime[i];
***************
*** 255,268 ****
       system_time      = CSIPCT(pvmGLOB_cpu_sysinfo[i].cpu[CPU_KERNEL]);
       wait_time        = CSIPCT(pvmGLOB_cpu_sysinfo[i].cpu[CPU_WAIT]);
       idle_time        = CSIPCT(pvmGLOB_cpu_sysinfo[i].cpu[CPU_IDLE]);

-     pages_in  = pvmGLOB_cpu_vminfo[i].pgpgin/pvmGLOB_etime[i];
-     pages_out = pvmGLOB_cpu_vminfo[i].pgpgout/pvmGLOB_etime[i];
-     swapins   = pvmGLOB_cpu_vminfo[i].swapin/pvmGLOB_etime[i];
-     swapouts  = pvmGLOB_cpu_vminfo[i].swapout/pvmGLOB_etime[i];
-     scan      = pvmGLOB_cpu_vminfo[i].scan/pvmGLOB_etime[i];
-     pgrrun    = pvmGLOB_cpu_vminfo[i].pgrrun/pvmGLOB_etime[i];
-
       if (updates > 0.0) {
         freemem    = COMPUTE(freemem);
         swap_avail = COMPUTE(swap_avail);
--- 267,285 ----
       system_time      = CSIPCT(pvmGLOB_cpu_sysinfo[i].cpu[CPU_KERNEL]);
       wait_time        = CSIPCT(pvmGLOB_cpu_sysinfo[i].cpu[CPU_WAIT]);
       idle_time        = CSIPCT(pvmGLOB_cpu_sysinfo[i].cpu[CPU_IDLE]);
+     pagerec          = pvmGLOB_cpu_vminfo[i].pgrec/pvmGLOB_etime[i];
+     pagefrec         = pvmGLOB_cpu_vminfo[i].pgfrec/pvmGLOB_etime[i];
+     pageins          = pvmGLOB_cpu_vminfo[i].pgin/pvmGLOB_etime[i];
+     pages_in         = pvmGLOB_cpu_vminfo[i].pgpgin/pvmGLOB_etime[i];
+     pageouts         = pvmGLOB_cpu_vminfo[i].pgout/pvmGLOB_etime[i];
+     pages_out        = pvmGLOB_cpu_vminfo[i].pgpgout/pvmGLOB_etime[i];
+     min_fault        = (pvmGLOB_cpu_vminfo[i].hat_fault +
pvmGLOB_cpu_vminfo[i].as_fault)/pvmGLOB_etime[i];
+     maj_fault        = pvmGLOB_cpu_vminfo[i].maj_fault/pvmGLOB_etime[i];
+     swapins          = pvmGLOB_cpu_vminfo[i].swapin/pvmGLOB_etime[i];
+     swapouts         = pvmGLOB_cpu_vminfo[i].swapout/pvmGLOB_etime[i];
+     scan             = pvmGLOB_cpu_vminfo[i].scan/pvmGLOB_etime[i];
+     pgrrun           = pvmGLOB_cpu_vminfo[i].pgrrun/pvmGLOB_etime[i];

       if (updates > 0.0) {
         freemem    = COMPUTE(freemem);
         swap_avail = COMPUTE(swap_avail);

----------

I modified orcallator.se as follows (its modified for 10 seconds so that
results show up quickly).  The printf at the bottom of this diff are for my
debugging.  I had a "vmstat 10" running at the same time.  The only
variables that appears to work at all are "pages_in" and "pages_out".
Theirs values generally match what "vmstat 10" shows for "pi" and
"po".  But "mf" (minor faults) and "re" (reclaims" in the vmstat output are
never matched by the orcallator.se output - again because they are always 0.

# diff -c orcallator.se-1.32.txt orcallator.se
*** orcallator.se-1.32.txt      Wed Nov 28 15:47:18 2001
--- orcallator.se       Sun Apr 21 17:07:06 2002
***************
*** 242,248 ****
   //

   // The default sampling interval in seconds.
! #define SAMPLE_INTERVAL               300

   // The maximum number of columns of data.
   #define MAX_COLUMNS           2048
--- 242,249 ----
   //

   // The default sampling interval in seconds.
! //#define SAMPLE_INTERVAL             300
! #define SAMPLE_INTERVAL               10

   // The maximum number of columns of data.
   #define MAX_COLUMNS           2048
***************
*** 258,265 ****
   #define WATCH_MUTEX           1
   #define WATCH_NET             1
   #define WATCH_TCP             1
! #define WATCH_NFS_CLIENT      0
! #define WATCH_NFS_SERVER      0
   #define WATCH_MOUNTS          1
   #define WATCH_DISK            1
   #define WATCH_DNLC            1
--- 259,266 ----
   #define WATCH_MUTEX           1
   #define WATCH_NET             1
   #define WATCH_TCP             1
! #define WATCH_NFS_CLIENT      1
! #define WATCH_NFS_SERVER      1
   #define WATCH_MOUNTS          1
   #define WATCH_DISK            1
   #define WATCH_DNLC            1
***************
*** 1407,1412 ****
--- 1408,1435 ----
     put_output("#waiting", sprintf("%8.2f", pvm.waiting + 0.0));
     put_output(" #swpque", sprintf("%8.2f", pvm.swpque + 0.0));
     put_output("scanrate", sprintf("%8.3f", pvm.scan + 0.0));
+   // Add - Sean ONeill
+   put_output("pagerec",  sprintf("%8.3f", pvm.pagerec + 0.0));
+   put_output("pagefrec",  sprintf("%8.3f", pvm.pagefrec + 0.0));
+   put_output("pageins",  sprintf("%8.3f", pvm.pageins + 0.0));
+   put_output("pages_in",  sprintf("%8.3f", pvm.pages_in + 0.0));
+   put_output("pageouts",  sprintf("%8.3f", pvm.pageouts + 0.0));
+   put_output("pages_out",  sprintf("%8.3f", pvm.pages_out + 0.0));
+   put_output("min_fault",  sprintf("%8.3f", pvm.min_fault + 0.0));
+   put_output("maj_fault",  sprintf("%8.3f", pvm.maj_fault + 0.0));
+   put_output("interrupts",  sprintf("%8.3f", pvm.interrupts + 0.0));
+   put_output("system_calls",  sprintf("%8.3f", pvm.system_calls + 0.0));
+   put_output("context_switches",  sprintf("%8.3f", pvm.context_switches +
0.0));
+   put_output("invol_switches",  sprintf("%8.3f", pvm.invol_switches + 0.0));
+   printf("pgrec = %3d\n", pvmGLOB_cpu_vminfo[0].pgrec/10);
+   printf("pgfrec = %3d\n", pvmGLOB_cpu_vminfo[0].pgfrec/10);
+   printf("pageins = %3d\n", pvmGLOB_cpu_vminfo[0].pgin/10);
+   printf("pages_in = %3d\n", pvmGLOB_cpu_vminfo[0].pgpgin/10);
+   printf("pgout = %3d\n", pvmGLOB_cpu_vminfo[0].pgout/10);
+   printf("pages_out = %3d\n", pvmGLOB_cpu_vminfo[0].pgpgout/10);
+   printf("hat_fault = %3d ", pvmGLOB_cpu_vminfo[0].hat_fault/10);
+   printf("as_fault = %3d\n", pvmGLOB_cpu_vminfo[0].as_fault/10);
+   printf("maj_fault = %3d\n", pvmGLOB_cpu_vminfo[0].maj_fault/10);

     // Calculate the rate of new process spawning.

---------------------


--
........................................................
......... ..- -. .. -..- .-. ..- .-.. . ... ............
.-- .. -. -... .-.. --- .-- ... -.. .-. --- --- .-.. ...

Sean O'Neill



More information about the Orca-users mailing list