Andron
23rd April 2002, 08:42
How to get list of process in script, and command name linked with everyone process?

NPRao
23rd April 2002, 10:19
Syntax

long pstat ( long pid, ref string progname, ref long info(PSMAXSIZE) )

Description

This returns status information about a specified process.

Arguments

pid The ID of the process for which you want to retrieve information. Specify a negative value here to retrieve information about the init process.
progname This returns the process code.
info This returns status information that you can retrieve with the following macros:
ps.state(info) returns PSRUNNING, PSBLOCKING, PSSLEEPING, or
PSTERMINATING
ps.group(info) returns the identifier of the process group to which the process
belongs
ps.parent(info) returns the identifier of the parent process of the process group
Return values

The process ID of the next process in the internal process list.

Context

Bshell function.