GNU/Linux | 
					RedHat 6.2(Zoot) | 
					|
![]()  | 
					rpstate(2) | 
					![]()  | 
				
rpstate − Report status of LAM processes on a remote node.
#include <preq.h>
| 
 int rpstate(int node, int sflags, int svalue, struct pstate *stat_tab, int maxsize);  | 
Selection
Methods 
Processes to be reported from the target node are selected
by one of several methods, chosen in the sflags
argument. The selection method codes are defined in
<preq.h>.
| 
 SELECT_PID  | 
 Select by process ID. The svalue argument contains the process ID.  | ||
| 
 SELECT_INDEX  | 
 Select by process table index. The svalue argument contains the index.  | ||
| 
 SELECT_APPL  | 
 Select all application (user) processes.  | ||
| 
 SELECT_SYS  | 
 Select all system processes.  | ||
| 
 SELECT_ALL  | 
 Select all application and all system processes.  | 
Remote
Process Status 
The status structure array, stat_tab, is filled with
information on the selected processes. The structure is
defined in <preq.h>.
struct pstate {
| 
 int  | 
 ps_reply;  | |
| 
 int  | 
 ps_index;  | |
| 
 int  | 
 ps_pid;  | |
| 
 int  | 
 ps_rtf;  | |
| 
 int  | 
 ps_nodeid;  | |
| 
 int  | 
 ps_event;  | |
| 
 struct kstatus  | 
 ps_kernel;  | |
| 
 char  | 
 ps_name[PSMAXNAME];  | |
| 
 char  | 
 ps_loadpt[PSMAXNAME];  | 
};
| 
 ps_reply  | 
 internal use by rpstate()  | ||
| 
 ps_index  | 
 index within target node  | ||
| 
 ps_pid  | 
 identifier within target node  | ||
| 
 ps_rtf  | 
 runtime flags, see rploadgo(2)  | ||
| 
 ps_nodeid  | 
 parent’s node identifier  | ||
| 
 ps_event  | 
 parent’s event for reporting process’s exit  | ||
| 
 ps_kernel  | 
 kernel status, see kstate(2)  | ||
| 
 ps_name  | 
 argv[0], usually the program name, see kenter(2)  | ||
| 
 ps_loadpt  | 
 load module filename  | 
Upon successful completion, the number of selected processes is returned. This could be more or less than maxsize. If an error occurred, −1 is returned and the global variable errno is set to indicate the error.
kstate(2), rploadgo(2)
![]()  | 
				rpstate(2) | ![]()  |