Path: utzoo!attcan!uunet!codonics!bret From: bret@codonics.COM (Bret Orsburn) Newsgroups: comp.windows.x Subject: Re: xperfmon under SunOs4.0* Keywords: XPERFMON , SUNOS4.0* Message-ID: <418@codonics.COM> Date: 21 Nov 89 07:05:28 GMT References: <726@corona.pb> Reply-To: bret@codonics.com (Bret Orsburn) Organization: Codonics, Inc., Middleburg Heights, OH Lines: 33 In article <726@corona.pb> hsg@pbinfo.UUCP (Joerg Hoyer) writes: >I have some trouble with xperfmon on Sun3 and Sun4 running under SunOs4.0*. >xperfmon brings it's window up, but then dies it with floating point execption. > >I've found the problem in window.c in the function draw_background. >If i = 3 in the second for-loop xperfmon dies in the following line: >graph_list[i]->zero = graph_list[i]->min_pix + (graph_list[i]->min_value*SCALE(i)); > >Has anyone had this problem too and fixed it ? This is the second time this has appeared this week. I responded by Email the first time, but will venture a follow-up this time. For each quantity foo displayed, the SCALE macro does a division by (max_foo - min_foo) In SunOS 4, the quantity used to represent Available Memory sometimes ranges from 0 to 0, resulting in a divide by zero error. The *correct* fix would be to locate a better data value to chart or to error check the existing data. The skill-level-zero fix is to add one to the denominator of the SCALE macro. I leave it as an exercise for the reader to guess how I handled it ;-) -- bret@codonics.com uunet!codonics!bret Bret Orsburn