[torqueusers] strange netload-output from 'pbsnodes -a'

Thomas Dargel td at chemie.hu-berlin.de
Thu Dec 1 05:56:19 MST 2005


On Mon, Nov 28, 2005 at 12:55:34PM -0800, Garrick Staples wrote:
> On Fri, Nov 25, 2005 at 12:06:53PM +0100, Thomas Dargel alleged:
> > A restart of pbs_mom won't change the netload-output.
> > In the torqueusers-mailinglist archive I found this posting, please have
> > a look at this netload:
> > 
> > http://www.supercluster.org/pipermail/torqueusers/2005-August/001817.html
> > 
> > ....,loadave=8.50,netload=18446744073701380569,state=....
> >                           ^^^^^^^^^^
> >                it starts with the same 10 digits!
> > 
> > Please, can anybody give me an explanation for that?
> 
> The netload variables are overflowing.  This patch should fix you up.
> 

This patch has fixed the problem.
I have another question concerning the format of the 'pbsnodes -a'-output:

How much affort is needed to switch the output values for totmem, availmem
and physmem from 'kb'- to 'GB'-format? I think this looks more 'human-readable'.

Thank you,

 Thomas.

> -- 
> Garrick Staples, Linux/HPCC Administrator
> University of Southern California

> Binary files torque-2.0.0p3_orig/src/resmom/linux/.mom_mach.c.swp and torque-2.0.0p3/src/resmom/linux/.mom_mach.c.swp differ
> diff -pruN torque-2.0.0p3_orig/src/resmom/linux/mom_mach.c torque-2.0.0p3/src/resmom/linux/mom_mach.c
> --- torque-2.0.0p3_orig/src/resmom/linux/mom_mach.c	2005-11-23 21:45:47.000000000 -0800
> +++ torque-2.0.0p3/src/resmom/linux/mom_mach.c	2005-11-28 12:42:12.000000000 -0800
> @@ -3833,7 +3833,7 @@ static char *quota(
>  
>  #define MAX_INTERFACES 10 /*the maximum number of interfaces*/
>  #define HEADER_STR "%*[^\n]\n%*[^\n]\n"
> -#define INTERFACE_STR "%[^:]:%d %*d %*d %*d %*d %*d %*d %*d %d %*d %*d %*d %*d %*d %*d %*d\n"
> +#define INTERFACE_STR "%[^:]:%lu %*d %*d %*d %*d %*d %*d %*d %lu %*d %*d %*d %*d %*d %*d %*d\n"
>  
>  static char *netload(
>  
> @@ -3844,8 +3844,8 @@ static char *netload(
>    int   rc; /*read count*/
>  
>    char interfaceName[MAX_INTERFACES][32];
> -  int bytesRX[MAX_INTERFACES + 1];
> -  int bytesTX[MAX_INTERFACES + 1];
> +  unsigned long int bytesRX[MAX_INTERFACES + 1];
> +  unsigned long int bytesTX[MAX_INTERFACES + 1];
>  
>    int interface = 0;
>    /* int ethNum = 0; */
> @@ -3915,7 +3915,7 @@ static char *netload(
>    fclose(fp);
>  
>    sprintf(ret_string,"%lu",
> -    (unsigned long)(bytesRX[MAX_INTERFACES] + bytesTX[MAX_INTERFACES]));
> +    bytesRX[MAX_INTERFACES] + bytesTX[MAX_INTERFACES]);
>  
>    return(ret_string);
>    }  /* END netload() */




> _______________________________________________
> torqueusers mailing list
> torqueusers at supercluster.org
> http://www.supercluster.org/mailman/listinfo/torqueusers


More information about the torqueusers mailing list