On vserver create, the slice goes to init 1 which causes an extra column to get print...
authorFaiyaz Ahmed <faiyaza@cs.princeton.edu>
Tue, 29 Jul 2008 19:46:19 +0000 (19:46 +0000)
committerFaiyaz Ahmed <faiyaza@cs.princeton.edu>
Tue, 29 Jul 2008 19:46:19 +0000 (19:46 +0000)
swapmon.py

index b25d57f..35a98e8 100755 (executable)
@@ -356,8 +356,10 @@ def slicestat(names = None):
         proc['rss'] += 12
 
         # Include additional page table overhead
-        if proc['vsize'] > 4096:
-            proc['rss'] += 4 * ((proc['vsize'] - 1) / 4096)
+        try:
+            if proc['vsize'] > 4096:
+                proc['rss'] += 4 * ((proc['vsize'] - 1) / 4096)
+        except: pass
 
         if slices.has_key(proc['xid']):
             slice = slices[proc['xid']]