[torqueusers] 2.1.9 on BSD 6.2
Garrick Staples
garrick at usc.edu
Tue Nov 20 11:22:28 MST 2007
On Mon, Nov 19, 2007 at 10:39:44AM -0800, Alexander Saydakov alleged:
> Hi!
>
> I have tried Torque 2.1.9 on FreeBSD 6.2. Nodes report crazy load averages,
> so the server thinks that nodes are busy. I suspect it has to do with *rv =
> (double)la[0]/(double)FSCALE in src/resmom/freebsd5/mom_mach.c
>
> I patched it like this, after which it works great:
>
> *** 1801,1823 ****
> double *rv;
> {
> char *id = "get_la";
> - long la[3];
>
> if (kd == NULL) {
> log_err(-1, id, nokernel);
> return (rm_errno = RM_ERR_SYSTEM);
> }
> ! if (nl[KSYM_LOAD].n_type == 0) {
> ! log_err(-1, id, "loadaverage count not found");
> ! return (rm_errno = RM_ERR_SYSTEM);
> ! }
> ! if (kvm_read(kd, nl[KSYM_LOAD].n_value, la,
> ! sizeof(la)) != sizeof(la)) {
> ! log_err(errno, id, "kvm_read");
> return (rm_errno = RM_ERR_SYSTEM);
> }
>
> - *rv = (double)la[0]/(double)FSCALE;
> return 0;
> }
>
> --- 1801,1816 ----
> double *rv;
> {
> char *id = "get_la";
>
> if (kd == NULL) {
> log_err(-1, id, nokernel);
> return (rm_errno = RM_ERR_SYSTEM);
> }
> ! if (kvm_getloadavg(kd, rv, 1) != 1) {
> ! log_err(errno, id, "kvm_getloadavg");
> return (rm_errno = RM_ERR_SYSTEM);
> }
>
> return 0;
> }
>
>
> I am not quite sure if the patch would work for BSD5. Say, BSD4 does not
> seem to have kvm_getloadavg()
>
> And I suppose you know already that Torque 2.2.1 does not even compile on
> both BSD4 and BSD6.2
I'd hate to fix one and break another.
Is there anyone with all 3 BSDs that can patch it up to run or build on all 3?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/torqueusers/attachments/20071120/e409bbc0/attachment.bin
More information about the torqueusers
mailing list