Author: degenaro
Date: Thu Jun 30 12:13:56 2016
New Revision: 1750785
URL: http://svn.apache.org/viewvc?rev=1750785&view=rev
Log:
UIMA-4966 UIMA-DUCC Prepare for 2.1 Release
Added:
uima/uima-ducc/trunk/src/main/scripts.legacy/
uima/uima-ducc/trunk/src/main/scripts.legacy/ducc_get_process_swap_usage.sh
(with props)
uima/uima-ducc/trunk/src/main/scripts.legacy/ducc_web
Removed:
uima/uima-ducc/trunk/src/main/scripts/ducc_get_process_swap_usage.sh
uima/uima-ducc/trunk/src/main/scripts/ducc_web
Added:
uima/uima-ducc/trunk/src/main/scripts.legacy/ducc_get_process_swap_usage.sh
URL:
http://svn.apache.org/viewvc/uima/uima-ducc/trunk/src/main/scripts.legacy/ducc_get_process_swap_usage.sh?rev=1750785&view=auto
==============================================================================
--- uima/uima-ducc/trunk/src/main/scripts.legacy/ducc_get_process_swap_usage.sh
(added)
+++ uima/uima-ducc/trunk/src/main/scripts.legacy/ducc_get_process_swap_usage.sh
Thu Jun 30 12:13:56 2016
@@ -0,0 +1,28 @@
+#!/bin/bash
+# -----------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# -----------------------------------------------------------------------
+
+# Sums up swap use of a process with a given PID as reported by
/proc/<PID>/smaps file
+
+for swap in `grep Swap /proc/$1/smaps 2>/dev/null|awk '{print $2}'`;
+do
+let sum=$sum+$swap;
+done
+echo $sum
+
Propchange:
uima/uima-ducc/trunk/src/main/scripts.legacy/ducc_get_process_swap_usage.sh
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/uima-ducc/trunk/src/main/scripts.legacy/ducc_web
URL:
http://svn.apache.org/viewvc/uima/uima-ducc/trunk/src/main/scripts.legacy/ducc_web?rev=1750785&view=auto
==============================================================================
--- uima/uima-ducc/trunk/src/main/scripts.legacy/ducc_web (added)
+++ uima/uima-ducc/trunk/src/main/scripts.legacy/ducc_web Thu Jun 30 12:13:56
2016
@@ -0,0 +1,47 @@
+#! /usr/bin/env python
+
+# -----------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# -----------------------------------------------------------------------
+
+import sys
+from ducc_base import DuccBase
+
+class DuccWeb(DuccBase):
+
+ def syntax(self):
+ print " --qm or --query-machines";
+ print " --qr or --query-reservations";
+
+ def main(self, argv):
+ args = self.mkargs(argv)
+ if ( len(argv) > 0 ):
+ if ( argv[0] == '--qm' or argv[0] == '--query-machines'):
+ self.spawn(self.java(), '-cp', self.DUCC_HOME +
'/lib/uima-ducc-cli.jar', 'org.apache.uima.ducc.cli.DuccWebQueryMachines', '
'.join(args))
+ return
+ if ( argv[0] == '--qr' or argv[0] == '--query-reservations' ):
+ self.spawn(self.java(), '-cp', self.DUCC_HOME +
'/lib/uima-ducc-cli.jar', 'org.apache.uima.ducc.cli.DuccWebQueryReservations',
' '.join(args))
+ return
+ self.syntax();
+ else:
+ self.syntax();
+
+if __name__ == "__main__":
+ svc = DuccWeb()
+ svc.main(sys.argv[1:])
+