allProcesses |
+ (NSArray *)allProcesses;
Returns an array of all processes.
arguments |
- (NSArray *)arguments;
Returns an array containing the command line arguments called to execute the process. This method is not perfectly reliable.
basePriority |
- (int)basePriority;
Returns the base priority.
children |
- (NSArray *)children;
Returns an array containing the process's children, if any.
command |
- (NSString *)command;
Attempts to return the command that was called to execute the process. If that fails, attempts to return the accounting name. If that fails, returns an empty string.
contextSwitches |
- (int)contextSwitches;
Returns the number of context switches.
copyOnWriteFaults |
- (int)copyOnWriteFaults;
Returns the number of copy on write faults.
currentProcess |
+ (AGProcess *)currentProcess;
Returns the current process.
environment |
- (NSDictionary *)environment;
Returns a dictionary containing the environment variables of the process. This method is not perfectly reliable.
faults |
- (int)faults;
Returns the number of page faults.
initWithProcessIdentifier: |
- (id)initWithProcessIdentifier:(int)pid;
Initializes the receiver with the given process identifier. Returns nil if no such process exists.
interrupt |
- (BOOL)interrupt;
Sends SIGINT.
machSystemCalls |
- (int)machSystemCalls;
Returns the number of Mach system calls.
messagesReceived |
- (int)messagesReceived;
Returns the number of Mach messages received.
messagesSent |
- (int)messagesSent;
Returns the number of Mach messages sent.
pageins |
- (int)pageins;
Returns the number of pageins.
parent |
- (AGProcess *)parent;
Returns the parent process.
parentProcessIdentifier |
- (int)parentProcessIdentifier;
Returns the parent process identifier.
percentCPUUsage |
- (double)percentCPUUsage;
Returns the current CPU usage in the range 0.0 - 1.0.
percentMemoryUsage |
- (double)percentMemoryUsage;
Returns resident memory usage as a fraction of the host's physical memory in the range 0.0 - 1.0.
priority |
- (int)priority;
Returns the current priority.
processForCommand: |
+ (AGProcess *)processForCommand:(NSString *)comm;
Returns the process for the given command, or nil if no such process exists. If there is more than one process with the same command, there is no guarantee which will be returned.
processForProcessIdentifier: |
+ (AGProcess *)processForProcessIdentifier:(int)pid;
Returns the process for the given process identifier, or nil if no such process exists.
processGroup |
- (int)processGroup;
Returns the process group.
processIdentifier |
- (int)processIdentifier;
Returns the process identifier.
processesForCommand: |
+ (NSArray *)processesForCommand:(NSString *)comm;
Returns an array of all processes for the given command.
processesForProcessGroup: |
+ (NSArray *)processesForProcessGroup:(int)pgid;
Returns an array of all processes in the given process group.
processesForRealUser: |
+ (NSArray *)processesForRealUser:(int)ruid;
Returns an array of all processes for the given real user.
processesForTerminal: |
+ (NSArray *)processesForTerminal:(int)tdev;
Returns an array of all processes running on the given terminal. Takes a terminal device number.
processesForUser: |
+ (NSArray *)processesForUser:(int)uid;
Returns an array of all processes for the given user.
realUserIdentifier |
- (int)realUserIdentifier;
Returns the real user identifier.
residentMemorySize |
- (unsigned)residentMemorySize;
Returns the resident memory size in bytes.
resume |
- (BOOL)resume;
Sends SIGCONT.
siblings |
- (NSArray *)siblings;
Returns an array containing the process's siblings, if any.
state |
- (AGProcessState)state;
Returns the current state. Possible values are defined by AGProcessState.
suspend |
- (BOOL)suspend;
Sends SIGSTOP.
systemCPUTime |
- (double)systemCPUTime;
Returns the accumulated system CPU time in seconds.
terminal |
- (int)terminal;
Returns the terminal device number.
terminalProcessGroup |
- (int)terminalProcessGroup;
Returns the terminal process group.
terminate |
- (BOOL)terminate;
Sends SIGTERM.
threadCount |
- (int)threadCount;
Returns the number of threads.
totalCPUTime |
- (double)totalCPUTime;
Returns the accumulated CPU time in seconds.
unixSystemCalls |
- (int)unixSystemCalls;
Returns the number of Unix system calls.
userCPUTime |
- (double)userCPUTime;
Returns the accumulated user CPU time in seconds.
userIdentifier |
- (int)userIdentifier;
Returns the user identifier.
userProcesses |
+ (NSArray *)userProcesses;
Returns an array of all processes running for the current user.
virtualMemorySize |
- (unsigned)virtualMemorySize;
Returns the virtual memory size in bytes.
(Last Updated 9/12/2003)