added a patch for diagnose -f to allow an argument:
* -f [user|group|acct|class|qos] git-svn-id: svn://opensvn.adaptivecomputing.com/maui/trunk@151 3f5042e3-fb1d-0410-be18-d6ca2573e517
This commit is contained in:
parent
0efe0c2f0e
commit
bb6c2dd88a
@ -1,4 +1,7 @@
|
||||
Maui 3.3.2
|
||||
- Patch for 'diagnose -f'. Allow to specify what section of fairshare you want to see, default is
|
||||
everything (-f [user|group|acct|class|qos]). To show fairshare for a group, use:
|
||||
* diagnose -f group (Author: Dennis Stam and applied by Bas van der Vlies)
|
||||
|
||||
Maui 3.3.1
|
||||
- Fixed issue where hostlist was being overwritten resulting in broken $PBS_NODEFILE. (Alexis Cousein)
|
||||
|
@ -485,7 +485,8 @@ int MFSInitialize(mfsc_t *);
|
||||
double MFSCalcFactor(mfsc_t *,double *);
|
||||
char *MFSTargetToString(double,int);
|
||||
int MFSShutdown(mfsc_t *);
|
||||
int MFSShow(char *,int,int);
|
||||
/* Added the DiagOpt, of type char */
|
||||
int MFSShow(char *,int,char *,int);
|
||||
|
||||
|
||||
|
||||
|
@ -1038,6 +1038,8 @@ int MFSShow(
|
||||
|
||||
char *Buf, /* O */
|
||||
int BufSize, /* I */
|
||||
/* Added this so we can asked what we want to see */
|
||||
char *Opts,
|
||||
int Mode) /* I */
|
||||
|
||||
{
|
||||
@ -1076,6 +1078,34 @@ int MFSShow(
|
||||
BufSize,
|
||||
Mode);
|
||||
|
||||
/** DsT Show the given option in the logfile **/
|
||||
DBG(3,fFS) DPrint("%s(Opts,%s)\n",
|
||||
FName,
|
||||
Opts);
|
||||
|
||||
/** DsT Begin check if given option is supported, else just skip and show all **/
|
||||
int LIMITOUTPUT = FALSE;
|
||||
|
||||
if ( strcmp( Opts, "user" ) == 0 ) {
|
||||
LIMITOUTPUT = TRUE;
|
||||
} else if( strcmp( Opts, "group" ) == 0 ) {
|
||||
LIMITOUTPUT = TRUE;
|
||||
} else if( strcmp( Opts, "acct" ) == 0 ) {
|
||||
LIMITOUTPUT = TRUE;
|
||||
} else if( strcmp( Opts, "class" ) == 0 ) {
|
||||
LIMITOUTPUT = TRUE;
|
||||
} else if( strcmp( Opts, "qos" ) == 0 ) {
|
||||
LIMITOUTPUT = TRUE;
|
||||
}
|
||||
|
||||
/** DsT Always show if we are going to LIMIT the output **/
|
||||
DBG(3,fFS) DPrint("%s(LIMIT,%d),(WHAT,%s)\n",
|
||||
FName,
|
||||
LIMITOUTPUT,
|
||||
Opts);
|
||||
|
||||
/** Dst End check options **/
|
||||
|
||||
if (Buf == NULL)
|
||||
{
|
||||
return(FAILURE);
|
||||
@ -1184,6 +1214,10 @@ int MFSShow(
|
||||
{
|
||||
case mxoUser:
|
||||
|
||||
/** DsT if limit is true but Opts does not compare to users, skip **/
|
||||
if (LIMITOUTPUT == TRUE && strcmp( Opts, "user" ) != 0 )
|
||||
continue;
|
||||
|
||||
if (MSched.DefaultU != NULL)
|
||||
DF = &MSched.DefaultU->F;
|
||||
|
||||
@ -1191,6 +1225,10 @@ int MFSShow(
|
||||
|
||||
case mxoGroup:
|
||||
|
||||
/** DsT if limit is true but Opts does not compare to group, skip **/
|
||||
if (LIMITOUTPUT == TRUE && strcmp( Opts, "group" ) != 0 )
|
||||
continue;
|
||||
|
||||
if (MSched.DefaultG != NULL)
|
||||
DF = &MSched.DefaultG->F;
|
||||
|
||||
@ -1198,6 +1236,10 @@ int MFSShow(
|
||||
|
||||
case mxoAcct:
|
||||
|
||||
/** DsT if limit is true but Opts does not compare to acct, skip **/
|
||||
if (LIMITOUTPUT == TRUE && strcmp( Opts, "acct" ) != 0 )
|
||||
continue;
|
||||
|
||||
if (MSched.DefaultA != NULL)
|
||||
DF = &MSched.DefaultA->F;
|
||||
|
||||
@ -1205,6 +1247,10 @@ int MFSShow(
|
||||
|
||||
case mxoClass:
|
||||
|
||||
/** DsT if limit is true but Opts does not compare to class, skip **/
|
||||
if (LIMITOUTPUT == TRUE && strcmp( Opts, "class" ) != 0 )
|
||||
continue;
|
||||
|
||||
if (MSched.DefaultC != NULL)
|
||||
DF = &MSched.DefaultC->F;
|
||||
|
||||
@ -1212,6 +1258,10 @@ int MFSShow(
|
||||
|
||||
case mxoQOS:
|
||||
|
||||
/** DsT if limit is true but Opts does not compare to qos, skip **/
|
||||
if (LIMITOUTPUT == TRUE && strcmp( Opts, "qos" ) != 0 )
|
||||
continue;
|
||||
|
||||
if (MSched.DefaultQ != NULL)
|
||||
DF = &MSched.DefaultQ->F;
|
||||
|
||||
|
@ -6157,7 +6157,8 @@ int UIDiagnose(
|
||||
{
|
||||
int BufSize = MAX_MBUFFER;
|
||||
|
||||
MFSShow(SBuffer,BufSize,IFlags);
|
||||
/* DsT Added DiagOpt, so we can limit the output */
|
||||
MFSShow(SBuffer,BufSize,DiagOpt,IFlags);
|
||||
|
||||
*SBufSize = strlen(SBuffer);
|
||||
} /* END BLOCK */
|
||||
|
@ -4236,7 +4236,8 @@ int MCShowUsage(
|
||||
|
||||
fprintf(stderr," -a [ACCOUNTID]\n");
|
||||
fprintf(stderr," -c [CLASSID]\n");
|
||||
fprintf(stderr," -f // fairshare\n");
|
||||
/** DsT added the possible options for f **/
|
||||
fprintf(stderr," -f [user|group|acct|class|qos] // fairshare\n");
|
||||
fprintf(stderr," -g [GROUPID]\n");
|
||||
fprintf(stderr," -j [JOBID]\n");
|
||||
fprintf(stderr," -m // frame\n");
|
||||
|
Loading…
Reference in New Issue
Block a user