[comp.unix.sysv386] BadHerz VALUE

testurm@immd4.informatik.uni-erlangen.de (Torsten Sturm ) (02/05/91)

Hi freaks out there. I need help   :

I installed UNIX386 3.2 SCO, and after relinking the kernel,
some programms (such like su...) bring up the message:
Bad Hz Value
Using 60 from /usr/include/sys/params.h

I then checked this value, (60), set it to 50 (GERMANY),
relinked, and still got the SAME(!) message, but otherwise 
unix says at boottime, that Hz=50.
This causes strange errors, because a command like this :
su root -c "devnm /" | grep -v swap | setmnt
writes additionally the above messeage into the mounttable !!!

Can you help ??

(I've studied release notes, but there was nothing like that)

Thanks in advance ....
-- 
Torsten Sturm 
tnsturm@faui09.informatik.uni-erlangen.de
tnsturm@faui41.informatik.uni-erlangen.de
tnsturm@faui43.informatik.uni-erlangen.de

Torsten Sturm 
tnsturm@faui09.informatik.uni-erlangen.de
tnsturm@faui41.informatik.uni-erlangen.de
tnsturm@faui43.informatik.uni-erlangen.de
tnsturm@faui80.informatik.uni-erlangen.de

rbraun@spdcc.COM (Rich Braun) (02/10/91)

A couple of people suggested in earlier postings on this topic (Bad
Hertz Value in /etc/mnttab) that adding the line "set HZ=60;export HZ"
to /etc/bcheckrc would fix the problem.  Well, it didn't.

Any suggestions?

By the way, the HZ value is related to the task scheduling interrupt
frequency, not the line clock.  You can set it to any value you want
and it has nothing to do with your local power company.

-rich

jpr@jpradley.jpr.com (Jean-Pierre Radley) (02/10/91)

In article <6407@spdcc.SPDCC.COM> rbraun@spdcc.COM (Rich Braun) writes:
>A couple of people suggested in earlier postings on this topic (Bad
>Hertz Value in /etc/mnttab) that adding the line "set HZ=60;export HZ"
>to /etc/bcheckrc would fix the problem.  Well, it didn't.
>

I'm one of the "suggesters".
But did you literally _add_ that line, at the end of /etc/bcheckrc?
It needs to be at the beginning of the file.

 Jean-Pierre Radley   NYC Public Unix   jpr@jpradley.jpr.com   CIS: 72160,1341

dave@pmafire.inel.gov (Dave Remien) (02/12/91)

In article <1991Feb11.074644.922@ico.isc.com> rcd@ico.isc.com (Dick Dunn) writes:
>While process scheduling is initiated by the clock() routine, and clock()
>is invoked every 1/HZ sec, scheduling isn't done on 0.01 sec boundaries;
>it's much less frequent.

Process scheduling is done whenever the currently running process either
blocks itself or reaches MAXSLICE clock-ticks, or a realtime process
(V.4) declares itself ready to run. MAXSLICE is usually set to 100
(i.e., process scheduling runs once a second) so that the maximum amount
of CPU time is devoted to user processes, or so says AT&T. 


>-- 
>Dick Dunn     rcd@ico.isc.com -or- ico!rcd       Boulder, CO   (303)449-2870
>   ...But is it art?


-- 
Dave Remien +*+*+*+*+*+*+*+*+*+*+*+*+*+*+ WINCO Computer Engineering Group 
  dave@pmafire.inel.gov or rzd@inel.gov      "Dave Barry for President" 

iverson@bang.uucp (Tim Iverson) (02/12/91)

In article <6407@spdcc.SPDCC.COM> rbraun@spdcc.COM (Rich Braun) writes:
>A couple of people suggested in earlier postings on this topic (Bad
>Hertz Value in /etc/mnttab) that adding the line "set HZ=60;export HZ"
>to /etc/bcheckrc would fix the problem.  Well, it didn't.
>
>Any suggestions?

Use this in /etc/bcheckrc:

# put root into mount table
/bin/su root -c "/etc/devnm /" | grep \^/ | grep -v swap | /etc/setmnt


>-rich

- Tim Iverson
  iverson@xstor.com -/- uunet!xstor!iverson

dcs@sixcom.sixcom.it (PC applications group) (02/20/91)

In article <1991Feb5.091440.23318@informatik.uni-erlangen.de> testurm@immd4.informatik.uni-erlangen.de (Torsten Sturm ) writes:
>
>Hi freaks out there. I need help   :
>
>I installed UNIX386 3.2 SCO, and after relinking the kernel,
>some programms (such like su...) bring up the message:
>Bad Hz Value
>Using 60 from /usr/include/sys/params.h
>
>I then checked this value, (60), set it to 50 (GERMANY),
>relinked, and still got the SAME(!) message, but otherwise 
>unix says at boottime, that Hz=50.
>This causes strange errors, because a command like this :
>su root -c "devnm /" | grep -v swap | setmnt
>writes additionally the above messeage into the mounttable !!!
>
>Can you help ??
>
>(I've studied release notes, but there was nothing like that)

The BAD HZ VALUE problem is well known all over the SCO users and
i'd like to give my contribution in order to solve it.
The first time I saw this famous message:
	Bad Hz Value
	Using 60 from /usr/include/sys/param.h
was after my first installation of the SCO Unix 3.2. This happen one year
ago infact we were involved in the ODT Developer's Programme 
i.e. we received the SCO software as a "Beta Release".
I phoned to the SCO Technical Support signalling the problem and then
i received a fax which says:

"... please check the Administrator's Guide (Paperback) 19-21. Note the line
where the HZ value is supposed to be 50 ... the HZ value must be set
to 100 cycles per second. If this does not work then please make sure
that the root login does not use the csh (berkeley shell)..."

I was not able to find those lines inside the Administrator's Guide but
they were included in the User's Guide inside the chapter "Tips, Tricks
And Troubleshooting" (Fixing a Bad Hz Value) which says:

Q: The message "Bad HZ Value" is displayed on my screen. What is the HZ
   value and what does this message mean ?
A: If the "Bad HZ Value" message is displayed at any time during system
   operation, your system files may be incorrect or corrupted.
   The HZ variable is declared in the /etc/rc2, /.profile, and /.login
   files and is used by the operating system to represent the system
   interrupt clock frequency. If the variable is not set correctly in one of
   these files, one of the files is corrupted or missing, or the kernel
   is not properly serialized, the "Bad HZ Value" message is displayed.

   1. Verify that the HZ value in the /etc/rc2, /.profile, and
      /.login files is set to 50 cycles per second.

   2. If this value is correct, re-serialize your kernel by entering
      the following commands:

	cd /
	cp /unix unix.bkp
	/etc/brand serial# activationkey /unix
	/etc/shutdown

   3. Reboot your system

   You should no longer see "Bad HZ Value" error messages.

As the SCO asserts, the value must be set at 100 and not at 50 but there is
another problem infact i don't have any declaration of the HZ variable
inside the /etc/rc2, /.profile and /.login files but instead it's
declared inside the /etc/TIMEZONE, the /usr/include/sys/param.h  and 
probably somewhere else !!

I don't really know if the problem can be solved replacing the HZ value
inside those files or inserting the HZ declarations inside the /etc/rc2, etc.
but I decide to leave everything unchanged and to use sh as shell of the
root account.
Now, my system is still working correctly but I must specify that i
don't issue the rlogin or su commands very often.
If you want a definite solution to this problem you can try
a combination of all the SCO suggestions following the rule which says
that the truth is always in the middle (??).
I also read some news which were talking about the possible definition
of another account for root which should be able to use the csh. This
can be done but it's not so easy (i totally agree with the guy which said
"... fucking relaxed mode !!!").
I hope this can help you.
Bye
   ______                           ____ 
    ))   )                        //   //
   //___/                        ((__
  // \   . __ /_  __  __  __/        )) __ _ _ . _ _ __
 //   \_/_/__/ /_/-/_/ (_/_/   //___//_/-/_\/_/_/\/_/_/
/-----------------------\ /---------------------------------------\
| Richard Savino         | INTERNET: richard@sixcom.it            |
|                        |           dcs@sixcom.it                |
| Sixcom S.p.a.          | UUCP: {...,uunet}!mcsun!sixcom!richard |
| Via G. Govone 66       | Voice: +39-(0)2-3192324                |
| 20155 Milano - Italy   | Fax: +39-(0)2-33603112                 |
\-----------------------/ \---------------------------------------/