You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by de...@apache.org on 2016/07/07 17:35:52 UTC

svn commit: r1751820 - in /uima/uima-ducc/trunk/src/main: admin/ducc_get_process_swap_usage.sh resources/default.ducc.properties scripts.legacy/ducc_get_process_swap_usage.sh

Author: degenaro
Date: Thu Jul  7 17:35:52 2016
New Revision: 1751820

URL: http://svn.apache.org/viewvc?rev=1751820&view=rev
Log:
UIMA-4966 UIMA-DUCC Prepare for 2.1 Release

Added:
    uima/uima-ducc/trunk/src/main/admin/ducc_get_process_swap_usage.sh   (with props)
Removed:
    uima/uima-ducc/trunk/src/main/scripts.legacy/ducc_get_process_swap_usage.sh
Modified:
    uima/uima-ducc/trunk/src/main/resources/default.ducc.properties

Added: uima/uima-ducc/trunk/src/main/admin/ducc_get_process_swap_usage.sh
URL: http://svn.apache.org/viewvc/uima/uima-ducc/trunk/src/main/admin/ducc_get_process_swap_usage.sh?rev=1751820&view=auto
==============================================================================
--- uima/uima-ducc/trunk/src/main/admin/ducc_get_process_swap_usage.sh (added)
+++ uima/uima-ducc/trunk/src/main/admin/ducc_get_process_swap_usage.sh Thu Jul  7 17:35:52 2016
@@ -0,0 +1,32 @@
+#!/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.
+# -----------------------------------------------------------------------
+
+# !!!!!
+# !!!!! Used by agent as defined in default.ducc.properties
+# !!!!!
+
+# 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/admin/ducc_get_process_swap_usage.sh
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: uima/uima-ducc/trunk/src/main/resources/default.ducc.properties
URL: http://svn.apache.org/viewvc/uima/uima-ducc/trunk/src/main/resources/default.ducc.properties?rev=1751820&r1=1751819&r2=1751820&view=diff
==============================================================================
--- uima/uima-ducc/trunk/src/main/resources/default.ducc.properties (original)
+++ uima/uima-ducc/trunk/src/main/resources/default.ducc.properties Thu Jul  7 17:35:52 2016
@@ -502,7 +502,7 @@ ducc.agent.launcher.cgroups.subsystems=m
 # Define script which will collect total swap used by a given process. This
 # script is launched by an agent via duccling and running as the owner
 # of the process.  
-ducc.agent.swap.usage.script=${DUCC_HOME}/bin/ducc_get_process_swap_usage.sh
+ducc.agent.swap.usage.script=${DUCC_HOME}/admin/ducc_get_process_swap_usage.sh
 
 #
 # Uncomment the following line to support auto reaping of rogue processes by Ducc's Agent