[Swift-commit] r5710 - provenancedb

lgadelha at ci.uchicago.edu lgadelha at ci.uchicago.edu
Mon Mar 12 22:23:19 CDT 2012


Author: lgadelha
Date: 2012-03-12 22:23:19 -0500 (Mon, 12 Mar 2012)
New Revision: 5710

Modified:
   provenancedb/prov-init.sql
   provenancedb/prov-to-sql.sh
Log:


Modified: provenancedb/prov-init.sql
===================================================================
--- provenancedb/prov-init.sql	2012-03-12 20:46:29 UTC (rev 5709)
+++ provenancedb/prov-init.sql	2012-03-13 03:23:19 UTC (rev 5710)
@@ -73,7 +73,21 @@
      start_time        numeric,
      duration          numeric,
      final_state       varchar(32),
-     site              varchar(256)
+     site              varchar(256),
+     maxrss	       numeric,
+     walltime	       numeric,
+     systime	       numeric,
+     usertime	       numeric,
+     cpu	       numeric,
+     fsin	       numeric,
+     fsout	       numeric,
+     timesswapped      numeric,
+     socketrecv	       numeric,
+     socketsent	       numeric,
+     majorpagefaults   numeric,
+     minorpagefaults   numeric,
+     contextswitchesinv	numeric,
+     contextswitchesvol	numeric
     );
 
 -- app execution runtime info extracted from the /proc filesystem (assumes the app executed
@@ -283,7 +297,7 @@
 drop view runtime_info;
 
 create view runtime_info as
-  select app_exec_id as application_execution_id, tstamp as timestamp, cpu_usage, max_phys_mem, max_virt_mem, io_read, io_write
+  select app_exec_id as application_execution_id, to_timestamp(tstamp) as timestamp, cpu_usage, max_phys_mem, max_virt_mem, io_read, io_write
   from rt_info;
 
 drop view produces;

Modified: provenancedb/prov-to-sql.sh
===================================================================
--- provenancedb/prov-to-sql.sh	2012-03-12 20:46:29 UTC (rev 5709)
+++ provenancedb/prov-to-sql.sh	2012-03-13 03:23:19 UTC (rev 5710)
@@ -137,13 +137,28 @@
 
 if [ -f runtime.txt ]; then
     while read execute2_id runtime; do
-	timestamp=$(echo $runtime | awk -F "," '{print $1}' | awk -F ":" '{print $2}')
-	cpu_usage=$(echo $runtime | awk -F "," '{print $2}' | awk -F ":" '{print $2}')
-	max_phys_mem=$(echo $runtime | awk -F "," '{print $3}' | awk -F ":" '{print $2}')
-	max_virtual_mem=$(echo $runtime | awk -F "," '{print $4}' | awk -F ":" '{print $2}')
-	io_read_bytes=$(echo $runtime | awk -F "," '{print $5}' | awk -F ":" '{print $2}')
-	io_write_bytes=$(echo $runtime | awk -F "," '{print $6}' | awk -F ":" '{print $2}')
-	echo "INSERT INTO runtime_info (app_execution_id, tstamp, cpu_usage, max_phys_mem, max_virtual_mem, io_read_bytes, io_write_bytes) VALUES ('$execute2_id', $timestamp, $cpu_usage, $max_phys_mem, $max_virtual_mem, $io_read_bytes, $io_write_bytes);"  >> /tmp/$RUNID-6.sql
+	#timestamp=$(echo $runtime | awk -F "," '{print $1}' | awk -F ":" '{print $2}')
+	#cpu_usage=$(echo $runtime | awk -F "," '{print $2}' | awk -F ":" '{print $2}')
+	#max_phys_mem=$(echo $runtime | awk -F "," '{print $3}' | awk -F ":" '{print $2}')
+	#max_virtual_mem=$(echo $runtime | awk -F "," '{print $4}' | awk -F ":" '{print $2}')
+	#io_read_bytes=$(echo $runtime | awk -F "," '{print $5}' | awk -F ":" '{print $2}')
+	#io_write_bytes=$(echo $runtime | awk -F "," '{print $6}' | awk -F ":" '{print $2}')
+	#echo "INSERT INTO rt_info (app_exec_id, tstamp, cpu_usage, max_phys_mem, max_virt_mem, io_read, io_write) VALUES ('$execute2_id', $timestamp, $cpu_usage, $max_phys_mem, $max_virtual_mem, $io_read_bytes, $io_write_bytes);"  >> /tmp/$RUNID-6.sql
+	maxrss=$(echo $runtime | awk -F "," '{print $1}' | awk -F ":" '{print $2}')
+	walltime=$(echo $runtime | awk -F "," '{print $2}' | awk -F ":" '{print $2}')
+	systime=$(echo $runtime | awk -F "," '{print $3}' | awk -F ":" '{print $2}')
+	usertime=$(echo $runtime | awk -F "," '{print $4}' | awk -F ":" '{print $2}')
+	cpu=$(echo $runtime | awk -F "," '{print $5}' | awk -F ":" '{print $2}')
+	fsin=$(echo $runtime | awk -F "," '{print $6}' | awk -F ":" '{print $2}')
+	fsout=$(echo $runtime | awk -F "," '{print $7}' | awk -F ":" '{print $2}')
+	timesswapped=$(echo $runtime | awk -F "," '{print $8}' | awk -F ":" '{print $2}')
+	socketrecv=$(echo $runtime | awk -F "," '{print $9}' | awk -F ":" '{print $2}')
+	socketsent=$(echo $runtime | awk -F "," '{print $10}' | awk -F ":" '{print $2}')
+	majorpagefaults=$(echo $runtime | awk -F "," '{print $11}' | awk -F ":" '{print $2}')
+	minorpagefaults=$(echo $runtime | awk -F "," '{print $12}' | awk -F ":" '{print $2}')
+	contextswitchesinv=$(echo $runtime | awk -F "," '{print $13}' | awk -F ":" '{print $2}')
+	contextswitchesvol=$(echo $runtime | awk -F "," '{print $14}' | awk -F ":" '{print $2}')
+	echo "UPDATE app_exec SET maxrss=$maxrss, walltime=$walltime, systime=$systime, usertime=$usertime,cpu=$cpu,fsin=$fsin,fsout=$fsout,timesswapped=$timesswapped,socketrecv=$socketrecv,socketsent=$socketsent,majorpagefaults=$majorpagefaults,minorpagefaults=$minorpagefaults,contextswitchesinv=$contextswitchesinv,contextswitchesvol=$contextswitchesvol where app_exec_id=$execute2_id;"  >> /tmp/$RUNID-6.sql
     done < runtime.txt
 fi
 




More information about the Swift-commit mailing list