commit dbe041ac1bbb775f71f34f0d705d4dd654d74858 Author: Damian Johnson atagar@torproject.org Date: Sun Nov 13 16:21:09 2011 -0800
Header documentation for the proc and system utils --- stem/util/proc.py | 9 +++++++++ stem/util/system.py | 9 +++++++++ 2 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/stem/util/proc.py b/stem/util/proc.py index 79cf92a..32ab920 100644 --- a/stem/util/proc.py +++ b/stem/util/proc.py @@ -11,6 +11,15 @@ https://code.google.com/p/psutil/
which was written by Jay Loden, Dave Daeschler, Giampaolo Rodola' and is under the BSD license. + +is_available - checks if proc utilities can be used on this system +get_system_start_time - unix timestamp for when the system started +get_physical_memory - memory available on this system +get_cwd - provides the current working directory for a process +get_uid - provides the user id a process is running under +get_memory_usage - provides the memory usage of a process +get_stats - queries statistics about a process +get_connections - provides the connections made by a process """
import os diff --git a/stem/util/system.py b/stem/util/system.py index fd7277d..e5ba367 100644 --- a/stem/util/system.py +++ b/stem/util/system.py @@ -1,6 +1,15 @@ """ Helper functions for working with the underlying system. These are mostly os dependent, only working on linux, osx, and bsd. + +is_available - determines if a command is availabe on this system +is_running - determines if a given process is running +get_pid - provides the process id a given process is running under +get_cwd - provides the current working directory for a given process +get_bsd_jail_id - provides the BSD jail id a given process is running within +is_relative_path - checks if a given path can be expanded by expand_path +expand_path - expands relative paths and ~ entries +call - runs the given system command and provides back the results """
import re