From: Faiyaz Ahmed Date: Tue, 29 Jul 2008 19:46:19 +0000 (+0000) Subject: On vserver create, the slice goes to init 1 which causes an extra column to get print... X-Git-Tag: Mom-2.3-1~6 X-Git-Url: http://git.onelab.eu/?p=mom.git;a=commitdiff_plain;h=04914713a79dbac6bc7af8317fb978823ec743d0 On vserver create, the slice goes to init 1 which causes an extra column to get printed in the output of ps. Just pass over this. --- diff --git a/swapmon.py b/swapmon.py index b25d57f..35a98e8 100755 --- a/swapmon.py +++ b/swapmon.py @@ -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']]