backend/common/rhn_memusage.py | 30 ------------------------------
backend/server/test/attic/rhn_memusage.py | 30 ++++++++++++++++++++++++++++++
2 files changed, 30 insertions(+), 30 deletions(-)
New commits:
commit 68fab1e2d2e252575b414669fd31c800eda75492
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Oct 29 13:01:02 2010 +0200
The common.rhn_memusage is also only used by tests, moving to test/attic.
diff --git a/backend/common/rhn_memusage.py b/backend/common/rhn_memusage.py
deleted file mode 100644
index 4f4418b..0000000
--- a/backend/common/rhn_memusage.py
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 2008 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-#
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-
-import string
-
-def mem_usage():
- f = open("/proc/self/status")
- dict = {}
- while 1:
- line = f.readline()
- if not line:
- break
- arr = map(string.strip, string.split(line, ':', 1))
- if len(arr) == 1:
- continue
- dict[arr[0]] = arr[1]
- return dict['Name'], dict['VmSize'], dict['VmRSS'],
dict['VmData']
-
diff --git a/backend/server/test/attic/rhn_memusage.py
b/backend/server/test/attic/rhn_memusage.py
new file mode 100644
index 0000000..4f4418b
--- /dev/null
+++ b/backend/server/test/attic/rhn_memusage.py
@@ -0,0 +1,30 @@
+#
+# Copyright (c) 2008 Red Hat, Inc.
+#
+# This software is licensed to you under the GNU General Public License,
+# version 2 (GPLv2). There is NO WARRANTY for this software, express or
+# implied, including the implied warranties of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+# along with this software; if not, see
+#
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+#
+# Red Hat trademarks are not licensed under GPLv2. No permission is
+# granted to use or replicate Red Hat trademarks that are incorporated
+# in this software or its documentation.
+#
+
+import string
+
+def mem_usage():
+ f = open("/proc/self/status")
+ dict = {}
+ while 1:
+ line = f.readline()
+ if not line:
+ break
+ arr = map(string.strip, string.split(line, ':', 1))
+ if len(arr) == 1:
+ continue
+ dict[arr[0]] = arr[1]
+ return dict['Name'], dict['VmSize'], dict['VmRSS'],
dict['VmData']
+