[PVFS2-CVS] commit by pcarns in pvfs2/src/server: statfs.sm

CVS commit program cvs at parl.clemson.edu
Sun Sep 19 21:26:05 EDT 2004


Update of /projects/cvsroot/pvfs2/src/server
In directory parlweb:/tmp/cvs-serv16654/src/server

Modified Files:
	statfs.sm 
Log Message:
make statfs return load averages from sysinfo()


Index: statfs.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/statfs.sm,v
diff -p -u -r1.10 -r1.11
--- statfs.sm	2 Aug 2004 19:35:23 -0000	1.10
+++ statfs.sm	20 Sep 2004 00:26:05 -0000	1.11
@@ -113,12 +113,21 @@ static int statfs_do_statfs(PINT_server_
                 (system_metrics.freeram * system_metrics.mem_unit);
             s_op->resp.u.statfs.stat.uptime_seconds = (uint64_t)
                 system_metrics.uptime;
+            s_op->resp.u.statfs.stat.load_1 = (uint64_t)
+                system_metrics.loads[0];
+            s_op->resp.u.statfs.stat.load_5 = (uint64_t)
+                system_metrics.loads[1];
+            s_op->resp.u.statfs.stat.load_15 = (uint64_t)
+                system_metrics.loads[2];
         }
     }
 #else
     s_op->resp.u.statfs.stat.ram_total_bytes = 0;
     s_op->resp.u.statfs.stat.ram_free_bytes = 0;
     s_op->resp.u.statfs.stat.uptime_seconds = 0;
+    s_op->resp.u.statfs.stat.load_1 = 0;
+    s_op->resp.u.statfs.stat.load_5 = 0;
+    s_op->resp.u.statfs.stat.load_15 = 0;
 #endif
 
     js_p->error_code = ((ret != 1) ? ret : 0);



More information about the PVFS2-CVS mailing list