summaryrefslogtreecommitdiff
path: root/get_load.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-02-24 08:30:13 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-02-24 08:39:48 -0800
commit0a7b2ab5abfbf557dc7f59bc3db15f3f580cbe1f (patch)
tree0d07d54f1477d3915acf60c9bbe2f38e1feed463 /get_load.c
parentb7ac64d925d89d117ccf3c7165f3325be59264ca (diff)
unifdef -UAIXV3
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'get_load.c')
-rw-r--r--get_load.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/get_load.c b/get_load.c
index 3854557..2123d07 100644
--- a/get_load.c
+++ b/get_load.c
@@ -656,10 +656,6 @@ void GetLoadPoint(w, closure, call_data)
# define KERNEL_LOAD_VARIABLE "avenrun"
# endif /* sgi */
-# ifdef AIXV3
-# define KERNEL_LOAD_VARIABLE "sysinfo"
-# endif /* AIXV3 */
-
# ifdef MOTOROLA
# if defined(SYSV) && defined(m68k)
# define KERNEL_LOAD_VARIABLE "sysinfo"
@@ -706,11 +702,7 @@ void InitLoadPoint()
extern void nlist();
#endif
-#ifdef AIXV3
- knlist( namelist, 1, sizeof(struct nlist));
-#else
nlist( KERNEL_FILE, namelist);
-#endif
/*
* Some systems appear to set only one of these to Zero if the entry could
* not be found, I hope no_one returns Zero as a good value, or bad things
@@ -758,38 +750,6 @@ void GetLoadPoint( w, closure, call_data )
*loadavg = FIX_TO_DBL(temp);
}
# else /* not umips or ultrix risc */
-# ifdef AIXV3
- {
- struct sysinfo sysinfo_now;
- struct sysinfo sysinfo_last;
- static firsttime = TRUE;
- static double runavg = 0.0, swpavg = 0.0;
-
- (void) lseek(kmem, loadavg_seek, 0);
- (void) read(kmem, (char *)&sysinfo_last, sizeof(struct sysinfo));
- if (firsttime)
- {
- *loadavg = 0.0;
- firsttime = FALSE;
- }
- else
- {
- sleep(1);
- (void) lseek(kmem, loadavg_seek, 0);
- (void) read(kmem, (char *)&sysinfo_now, sizeof(struct sysinfo));
- runavg *= 0.8; swpavg *= 0.8;
- if (sysinfo_now.runocc != sysinfo_last.runocc)
- runavg += 0.2*((sysinfo_now.runque - sysinfo_last.runque - 1)
- /(double)(sysinfo_now.runocc - sysinfo_last.runocc));
- if (sysinfo_now.swpocc != sysinfo_last.swpocc)
- swpavg += 0.2*((sysinfo_now.swpque - sysinfo_last.swpque)
- /(double)(sysinfo_now.swpocc - sysinfo_last.swpocc));
- *loadavg = runavg + swpavg;
- sysinfo_last = sysinfo_now;
- }
- /* otherwise we leave load alone. */
- }
-# else /* not AIXV3 */
# if defined(MOTOROLA) && defined(SYSV)
{
static int init = 0;
@@ -879,7 +839,6 @@ void GetLoadPoint( w, closure, call_data )
(void) read(kmem, (char *)loadavg, sizeof(double));
# endif /* sony NEWOS4 */
# endif /* MOTOROLA else */
-# endif /* AIXV3 else */
# endif /* umips else */
#endif /* SVR4 or ... else */
return;