d3993548f212126ba5dd60ee85044e2f299fc4a1 kent Sun Jan 19 18:08:00 2014 -0800 Making paraPstat2Job - a parsed version of parasol pstat2 output - public. diff --git src/parasol/inc/paraMessage.h src/parasol/inc/paraMessage.h index 7e5fa06..5307e17 100644 --- src/parasol/inc/paraMessage.h +++ src/parasol/inc/paraMessage.h @@ -98,16 +98,32 @@ /* Send out given message strng. Print warning message and return FALSE if * there is a problem. Try up to 5 times sleeping for 60 seconds in between. * This is an attempt to help automated processes. */ char *pmHubSendSimple(char *message, char *host); /* Send message to host, no response. */ char *pmHubSingleLineQuery(char *query, char *host); /* Send message to hub and get single line response. * This should be freeMem'd when done. */ struct slName *pmHubMultilineQuery(char *query, char *host); /* Send a command with a multiline response to hub, * and return response as a list of strings. */ +struct paraPstat2Job +/* The job information returned by a pstat2 message by parasol, + * parsed out. */ + { + struct paraPstat2Job *next; + char *status; // 'r' mostly + char *parasolId; // Parasol ID as a string + char *user; // Name of user + char *program; // Name of program being run + char *host; // Host name of node running job. + }; +#define PARAPSTAT2JOB_NUM_COLS 5 + +struct paraPstat2Job *paraPstat2JobLoad(char **row); +/* Turn an array of 5 strings into a paraPstat2Job. */ + #endif /* PARAMESSAGE_H */