~ubuntu-branches/ubuntu/precise/landscape-client/precise

« back to all changes in this revision

Viewing changes to landscape/lib/process.py

  • Committer: Package Import Robot
  • Author(s): Andreas Hasenack
  • Date: 2012-03-19 09:33:34 UTC
  • mto: This revision was merged to the branch mainline in revision 41.
  • Revision ID: package-import@ubuntu.com-20120319093334-oxjttz163vvfgq8s
Tags: upstream-12.04
ImportĀ upstreamĀ versionĀ 12.04

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
 
22
22
class ProcessInformation(object):
 
23
    """
 
24
    @param proc_dir: The directory to use for process information.
 
25
    @param jiffies: The value to use for jiffies per second.
 
26
    @param boot_time: An alternate value to use for the last boot time.  If
 
27
        None, the system last boot time will be used.
 
28
    @param uptime: The uptime value to use (for unit tests only).
 
29
    """
23
30
 
24
31
    def __init__(self, proc_dir="/proc", jiffies=None, boot_time=None,
25
32
                 uptime=None):
26
 
        """
27
 
        The uptime parameter here is only used for faking uptime in tests.
28
 
        """
29
33
        if boot_time is None:
30
34
            boot_time = BootTimes().get_last_boot_time()
31
35
        if boot_time is not None: