* Re: What is HZ value for?
1999-12-22 5:00 What is HZ value for? Kyu Rang Kim
@ 1999-12-22 5:00 ` Nils Faerber
1999-12-23 5:00 ` Kyu Rang Kim
0 siblings, 1 reply; 3+ messages in thread
From: Nils Faerber @ 1999-12-22 5:00 UTC (permalink / raw)
Kyu Rang Kim <tester@hello.to> wrote:
: Hi,
Hello!
: I'm using redhat alphalinux 6.0 with all security fixes applied.
: Kernel version is 2.2.5-22 that was recompiled by myself.
: As of uptime from 48 days, I got some unusual messages when executing
: 'ps' or 'top' like this:
: $ ps
: Unknown HZ value! (2027) Assume 1024.
: PID TTY TIME CMD
: 19426 pts/0 00:00:03 bash
: 13566 pts/0 00:00:00 ps
Err ... how on earth could this be changed? Some userspace program must have
changed the envrionment variable HZ.
: Whis is HZ value and why this phenomenon happen?
: Is there any side-effect of "Unknown HZ value"?
The HZ value gives the number of timer interrupts per second. This is the
base for all time measurements in the system. On most systems the clock
ticks at 100Hz (like on i386) but the Alphas use to have 1024Hz. On the one
hand this gives somewhat better responsivenes because the scheduler is also
dependant on clock ticks and so gets called more often on the other this
causes from drivers to fail. Some programmers use clock ticks to measure
time directly in their drivers. In kernel this can simply be done by using
the variable 'jifffies' which is in fact a timer tick counter. If you then do
not take into account the HZ value your time measurement is false on all
systems that do not share your HZ value. One example is/was the MIDI driver
on Alphas. MIDI uses a similar timing scheme with MIDI-ticks. Those are
derived from the system ticks. If a program now wants to time events it may
ask the MIDI layer how many ticks there are per second. If it does not do so
it will only work on any system which has the same MIDI-tick value as the
development system. One bad example for this is xmp a MOD file player which
can use a wavetable card like the SB AWE cards. It plays ten times faster on
Alphas than on ix86 because it relies on the assumption that there are 100
ticks per second ;) A patched version of xmp can be found here:
http://www.home.unix-ag.org/nils/Alpha/Packages/index.html
: ### Kyu Rang Kim ### http://i.am/krkim ### ICQ:27474092 ###
CU
nils
--
Nils Faerber (Linux Nils) eMail: nils@unix-ag.org
Student of computer science http://www.si.unix-ag.org/~nils/
Unix user group, University of Siegen, Germany
Siegen ... the arctic rain forest!
--
^ permalink raw reply [flat|nested] 3+ messages in thread
* What is HZ value for?
@ 1999-12-22 5:00 Kyu Rang Kim
1999-12-22 5:00 ` Nils Faerber
0 siblings, 1 reply; 3+ messages in thread
From: Kyu Rang Kim @ 1999-12-22 5:00 UTC (permalink / raw)
Hi,
I'm using redhat alphalinux 6.0 with all security fixes applied.
Kernel version is 2.2.5-22 that was recompiled by myself.
As of uptime from 48 days, I got some unusual messages when executing
'ps' or 'top' like this:
$ ps
Unknown HZ value! (2027) Assume 1024.
PID TTY TIME CMD
19426 pts/0 00:00:03 bash
13566 pts/0 00:00:00 ps
Whis is HZ value and why this phenomenon happen?
Is there any side-effect of "Unknown HZ value"?
--
### Kyu Rang Kim ### http://i.am/krkim ### ICQ:27474092 ###
# Plant Disease Epidemiology Lab. Seoul National University
# Suwon Korea, TEL: +82-50-2580-9991 FAX: +82-331-294-1464
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: What is HZ value for?
1999-12-22 5:00 ` Nils Faerber
@ 1999-12-23 5:00 ` Kyu Rang Kim
0 siblings, 0 replies; 3+ messages in thread
From: Kyu Rang Kim @ 1999-12-23 5:00 UTC (permalink / raw)
Nils Faerber <nils@unix-ag.uni-siegen.de> writes:
> Kyu Rang Kim <tester@hello.to> wrote:
> : Hi,
> Hello!
>
> : I'm using redhat alphalinux 6.0 with all security fixes applied.
> : Kernel version is 2.2.5-22 that was recompiled by myself.
> : As of uptime from 48 days, I got some unusual messages when executing
> : 'ps' or 'top' like this:
> : $ ps
> : Unknown HZ value! (2027) Assume 1024.
> : PID TTY TIME CMD
> : 19426 pts/0 00:00:03 bash
> : 13566 pts/0 00:00:00 ps
> Err ... how on earth could this be changed? Some userspace program must have
> changed the envrionment variable HZ.
Can the HZ variable be changed by a userspace program?
Then can it be mean that my system was compromised by a malicious
program or by a cracker?
Anyway, I have no environment variable named HZ...
$ env | grep HZ
$
Today (or yesterday?), the HZ value seems to get back to a normal one.
$ uptime
11:11pm up 51 days, 2:16, 18 users, load average: 1.00, 1.05, 1.29
$ ps PID TTY TIME CMD
24537 pts/24 00:00:00 bash
25270 pts/24 00:00:00 ps
I think there are some bugs inside the kernel regarding the HZ value.
But, except the odd message with 'ps' or 'top' above, I did not feel
any difference between 'normal' and 'odd' HZ values. (I do not have
a sound card)
In conclusion, the HZ value of Linux alpha kernel 2.2.5 changed to
an odd one between 48 and 51 days of uptime without any noticible
malfunction of the system except the unusual messages with 'ps' or
'top'.
> : Whis is HZ value and why this phenomenon happen?
> : Is there any side-effect of "Unknown HZ value"?
> The HZ value gives the number of timer interrupts per second. This is the
> base for all time measurements in the system. On most systems the clock
> ticks at 100Hz (like on i386) but the Alphas use to have 1024Hz. On the one
> hand this gives somewhat better responsivenes because the scheduler is also
> dependant on clock ticks and so gets called more often on the other this
> causes from drivers to fail. Some programmers use clock ticks to measure
> time directly in their drivers. In kernel this can simply be done by using
> the variable 'jifffies' which is in fact a timer tick counter. If you then do
> not take into account the HZ value your time measurement is false on all
> systems that do not share your HZ value. One example is/was the MIDI driver
> on Alphas. MIDI uses a similar timing scheme with MIDI-ticks. Those are
> derived from the system ticks. If a program now wants to time events it may
> ask the MIDI layer how many ticks there are per second. If it does not do so
> it will only work on any system which has the same MIDI-tick value as the
> development system. One bad example for this is xmp a MOD file player which
> can use a wavetable card like the SB AWE cards. It plays ten times faster on
> Alphas than on ix86 because it relies on the assumption that there are 100
> ticks per second ;) A patched version of xmp can be found here:
> http://www.home.unix-ag.org/nils/Alpha/Packages/index.html
> Nils Faerber (Linux Nils) eMail: nils@unix-ag.org
Thanks for your illustrative explanation on HZ value.
--
### Kyu Rang Kim ### http://i.am/krkim ### ICQ:27474092 ###
# Plant Disease Epidemiology Lab. Seoul National University
# Suwon Korea, TEL: +82-50-2580-9991 FAX: +82-331-294-1464
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1999-12-23 5:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-12-22 5:00 What is HZ value for? Kyu Rang Kim
1999-12-22 5:00 ` Nils Faerber
1999-12-23 5:00 ` Kyu Rang Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox