Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r3363 - in trunk/surfnet_java-flowsa-ma: . conf conf/axis-1.4/WEB-INF doc src/main/java/org/perfsonar/service/measurementArchive/flowsa src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfdump src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfdump/outputreaders

Subject: perfsonar development work

List archive

perfsonar: r3363 - in trunk/surfnet_java-flowsa-ma: . conf conf/axis-1.4/WEB-INF doc src/main/java/org/perfsonar/service/measurementArchive/flowsa src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfdump src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfdump/outputreaders


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r3363 - in trunk/surfnet_java-flowsa-ma: . conf conf/axis-1.4/WEB-INF doc src/main/java/org/perfsonar/service/measurementArchive/flowsa src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfdump src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfdump/outputreaders
  • Date: Thu, 14 Feb 2008 17:58:15 -0500

Author: michael.bischoff
Date: 2008-02-14 17:58:15 -0500 (Thu, 14 Feb 2008)
New Revision: 3363

Removed:
trunk/surfnet_java-flowsa-ma/doc/TODO.txt
Modified:
trunk/surfnet_java-flowsa-ma/.classpath
trunk/surfnet_java-flowsa-ma/conf/axis-1.4/WEB-INF/web.xml
trunk/surfnet_java-flowsa-ma/conf/service.properties

trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/FlowsaMAServiceEngine.java

trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfdump/NfdumpControll.java

trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfdump/TopDatum.java

trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfdump/outputreaders/Nfdump1_5_5OutputReaderImpl.java
Log:


Modified: trunk/surfnet_java-flowsa-ma/.classpath
===================================================================
--- trunk/surfnet_java-flowsa-ma/.classpath 2008-02-14 11:35:46 UTC (rev
3362)
+++ trunk/surfnet_java-flowsa-ma/.classpath 2008-02-14 22:58:15 UTC (rev
3363)
@@ -4,5 +4,6 @@
<classpathentry including="**/*.java" kind="src"
output="target/test-classes" path="src/test/java"/>
<classpathentry kind="con"
path="org.devzuz.q.maven.jdt.core.mavenClasspathContainer"/>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
<classpathentry kind="output" path="bin"/>
</classpath>

Modified: trunk/surfnet_java-flowsa-ma/conf/axis-1.4/WEB-INF/web.xml
===================================================================
--- trunk/surfnet_java-flowsa-ma/conf/axis-1.4/WEB-INF/web.xml 2008-02-14
11:35:46 UTC (rev 3362)
+++ trunk/surfnet_java-flowsa-ma/conf/axis-1.4/WEB-INF/web.xml 2008-02-14
22:58:15 UTC (rev 3363)
@@ -13,7 +13,7 @@
<param-name>ips</param-name>
<param-value>127.0.0.1
2001:610:508:109:20b:dbff:fee9:61f3 62.131.17.150 192.87.109.151
192.87.109.84 192.87.102.208 78.27.8.39 192.87.117.149
192.87.109.186</param-value>
<description>
- A space separeted list of ips that are
allowed to access
+ A space separated list of ips that are
allowed to access
resources.
</description>
</init-param>

Modified: trunk/surfnet_java-flowsa-ma/conf/service.properties
===================================================================
--- trunk/surfnet_java-flowsa-ma/conf/service.properties 2008-02-14
11:35:46 UTC (rev 3362)
+++ trunk/surfnet_java-flowsa-ma/conf/service.properties 2008-02-14
22:58:15 UTC (rev 3363)
@@ -9,6 +9,7 @@
# === Measurement Archive general properties ===

service.ma.class_name=org.perfsonar.service.measurementArchive.flowsa.FlowsaMAServiceEngine
service.ma.message_types=SetupDataRequest
+service.ma.conf_file=@TODO


# === Flowsa specific properties ===
# service.ma.flowsa.exporters - a number indicating the amount of different
sources
@@ -39,7 +40,7 @@
# nfdump.source - location of nfcapd files
# nfdump.location - the location of the nfdump executable (including nfdump
filename)
# nfdump.outputreader - fully qualified name of the class used for output
reading (expects a class implementing NfdumpOutputReader)
-service.ma.flowsa.nfdump.source=/usr/local/var/nfdump/flows
+#service.ma.flowsa.nfdump.source=/usr/local/var/nfdump/flows
service.ma.flowsa.nfdump.location=/usr/local/bin/nfdump

service.ma.flowsa.nfdump.ouputreader=org.perfsonar.service.measurementArchive.flowsa.nfdump.outputreaders.Nfdump1_5_5OutputReaderFactory

@@ -55,4 +56,5 @@

#=== LS registrator ===
component.registrator.scheduler_component=ma_scheduler
-component.registrator.interval=30000
\ No newline at end of file
+component.registrator.interval=30000
+

Deleted: trunk/surfnet_java-flowsa-ma/doc/TODO.txt

Modified:
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/FlowsaMAServiceEngine.java
===================================================================
---
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/FlowsaMAServiceEngine.java
2008-02-14 11:35:46 UTC (rev 3362)
+++
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/FlowsaMAServiceEngine.java
2008-02-14 22:58:15 UTC (rev 3363)
@@ -315,7 +315,7 @@
} catch (IOException e) {

logger.error("FlowsaMAServiceEngine.checkSource Source directory couldn't be
created.");
throw new PerfSONARException(
- "", // TODO error code
+ "error.ma.configuration",
"Couldn't create NfcapdControll
source directory was missing and couldn't be created."
);
}
@@ -325,7 +325,7 @@

if(startNfcapdProcesses && !sourceDirectory.canWrite()) {
throw new PerfSONARException(
- "", //TODO error code
+ "error.ma.configuration",
"Can't write to source directory."
);
}
@@ -336,7 +336,7 @@
if (!nfcapdExecutable.exists()) {
logger.error("Nfdump executable not found!
("+nfcapdExecutable+")");
throw new PerfSONARException(
- "", //TODO errorcode
+ "error.ma.configuration",
"Nfdump executable not found. "
);
}

Modified:
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfdump/NfdumpControll.java
===================================================================
---
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfdump/NfdumpControll.java
2008-02-14 11:35:46 UTC (rev 3362)
+++
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfdump/NfdumpControll.java
2008-02-14 22:58:15 UTC (rev 3363)
@@ -88,7 +88,6 @@
private final static String TIME_FLAG = "-t";
private final static String QUIET_FLAG = "-q";
private final static String STATISTICS_FLAG = "-I";
- private final static String MAX_RACORDS_FLAG = "-c";

final int maxResults;
final long timeoutValue;
@@ -339,7 +338,11 @@
commands.add(TIME_FLAG);
commands.add(getTimeCommandFrom(query));
commands.add("-s");
- commands.add(query.getTopStatistic()+"/"+query.getOrderBy());

+ if(!query.isSplitProtocol()) {
+
commands.add(query.getTopStatistic()+":p/"+query.getOrderBy());
+ } else {
+
commands.add(query.getTopStatistic()+"/"+query.getOrderBy());
+ }
commands.add("-M");
commands.add(getDirectoryCommandFrom(query));
commands.add("-R");
@@ -382,7 +385,7 @@
if(parts.length==1) {
parts = directory.split("\\");
}
- command += ":" + parts[parts.length-1];
+ command = command + ":" + parts[parts.length-1];
}
if(command == null) {
throw new QueryException("Query didn't contain any
directories to target");

Modified:
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfdump/TopDatum.java
===================================================================
---
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfdump/TopDatum.java
2008-02-14 11:35:46 UTC (rev 3362)
+++
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfdump/TopDatum.java
2008-02-14 22:58:15 UTC (rev 3363)
@@ -1,5 +1,7 @@
package org.perfsonar.service.measurementArchive.flowsa.nfdump;

+import java.text.DecimalFormat;
+
/**
* A data object / java bean for Top data.
*
@@ -42,9 +44,9 @@
public String getDuration() {
if(duration==null) {
try {
- int first = Integer.parseInt(timeFirstSeen);
- int last = Integer.parseInt(timeLastSeen);
- duration = String.valueOf(last - first);
+ float milisec =
(Float.parseFloat(msecLastSeen) - Float.parseFloat(msecFirstSeen)) / 1000F;
+ long sec = Long.parseLong(timeLastSeen) -
Long.parseLong(timeFirstSeen);
+ duration = new
DecimalFormat("#.000").format(sec + milisec);
} catch(NumberFormatException e) {
duration = null;
}

Modified:
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfdump/outputreaders/Nfdump1_5_5OutputReaderImpl.java
===================================================================
---
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfdump/outputreaders/Nfdump1_5_5OutputReaderImpl.java
2008-02-14 11:35:46 UTC (rev 3362)
+++
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfdump/outputreaders/Nfdump1_5_5OutputReaderImpl.java
2008-02-14 22:58:15 UTC (rev 3363)
@@ -208,10 +208,19 @@
} else if (values.length == 16) {
datum.setTopStatistic(intSetToIp(values[6],
values[7], values[8], values[9]));
offset = 9;
- } else if(values.length == 24) { //record
+ } else if(values.length == 24) {
+ // see BUG 258
+ // especially messed up
datum.setTopStatistic(intSetToIp(values[6],
values[7], values[8], values[9])+":"+values[10] +" -> " +
intSetToIp(values[11], values[12], values[13], values[14])+":"+values[15]);
- offset = 15;
- offset += 2;
+ // datum.setSrcAsNumber
+ // datum.setDstAsNumber
+ // datum.setInputInterface()
+ // datum.setOutputInterface()
+ // datum.setFlag not consistent among queries
+ // datum.setTos(values[offset+ x); not consistent
among queries
+ datum.setPackets(values[22]);
+ datum.setBytes(values[23]);

+ return datum;
}
datum.setFlows(values[offset+1]);
datum.setPackets(values[offset+2]);



  • perfsonar: r3363 - in trunk/surfnet_java-flowsa-ma: . conf conf/axis-1.4/WEB-INF doc src/main/java/org/perfsonar/service/measurementArchive/flowsa src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfdump src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfdump/outputreaders, svnlog, 02/14/2008

Archive powered by MHonArc 2.6.16.

Top of Page