~free.ekanayaka/landscape-client/lucid-1.5.4-0ubuntu0.10.04.0

« back to all changes in this revision

Viewing changes to landscape/lib/sysstats.py

  • Committer: Bazaar Package Importer
  • Author(s): Free Ekanayaka
  • Date: 2010-06-28 18:07:18 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100628180718-vytyqgbtkiirv5sb
Tags: 1.5.2.1-0ubuntu0.10.04.0
Filter duplicate network interfaces in get_active_interfaces (LP: #597000)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
from twisted.internet.utils import getProcessOutputAndValue
2
 
import commands
3
2
import os
4
3
 
5
4
 
53
52
            return 100 - self.free_swap_percentage
54
53
 
55
54
 
56
 
 
57
55
def get_logged_in_users():
58
56
    result = getProcessOutputAndValue("who", ["-q"], env=os.environ)
 
57
 
59
58
    def parse_output((stdout_data, stderr_data, status)):
60
59
        if status != 0:
61
60
            raise CommandError(stderr_data)