h_GetWorkstats was called also for 64bit which let random contents
in the other half of the 64bit field. Worse: little and big endian
machines filled different parts of the field so that a later masking
in fsprobe would net help for all kinds of servers.
Now a small wrapper h_GetWorkstats64 is called which calls h_GetWorkstats
correctly.
Change-Id: Iaeafd77dfa03d88caa98e4e352f95bfb33d736df
Reviewed-on: http://gerrit.openafs.org/2629
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit
8006ff8bf4a6f1944243309e5130538e3cbe62d5)
Reviewed-on: http://gerrit.openafs.org/2687
(afs_int32) ((long)sbrk(0) >> 10);
#endif
FS_UNLOCK;
- h_GetWorkStats((int *)&(Statistics->ViceStatistics64_val[STATS64_WORKSTATIONS]),
- (int *)&(Statistics->ViceStatistics64_val[STATS64_ACTIVEWORKSTATIONS]),
- (int *)0,
- (afs_int32) (FT_ApproxTime()) - (15 * 60));
+ h_GetWorkStats64(&(Statistics->ViceStatistics64_val[STATS64_WORKSTATIONS]),
+ &(Statistics->ViceStatistics64_val[STATS64_ACTIVEWORKSTATIONS]),
+ 0,
+ (afs_int32) (FT_ApproxTime()) - (15 * 60));
} /*h_GetWorkStats */
+void
+h_GetWorkStats64(afs_uint64 *nump, afs_uint64 *activep, afs_uint64 *delp,
+ afs_int32 cutofftime)
+{
+ int num, active, del;
+ h_GetWorkStats(&num, &active, &del, cutofftime);
+ if (nump)
+ *nump = num;
+ if (activep)
+ *activep = active;
+ if (delp)
+ *delp = del;
+}
/*------------------------------------------------------------------------
* PRIVATE h_ClassifyAddress
extern void h_PrintStats(void);
extern void h_PrintClients(void);
extern void h_GetWorkStats(int *, int *, int *, afs_int32);
+extern void h_GetWorkStats64(afs_uint64 *, afs_uint64 *, afs_uint64 *, afs_int32);
extern void h_flushhostcps(afs_uint32 hostaddr,
afs_uint16 hport);
extern void h_GetHostNetStats(afs_int32 * a_numHostsP, afs_int32 * a_sameNetOrSubnetP,