Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check HZ in the terminal?

Tags:

I have seen this http://kaasxxx.wordpress.com/2008/01/22/linux-hz-checker/ But the script seems not to work. Does anyway know an easy way to check "HZ" in the terminal in Linux?

like image 383
Hao Shen Avatar asked Sep 18 '12 15:09

Hao Shen


People also ask

How to check HZ in Linux?

But if you're on a traditional kernel and a traditional distro, you can find the current kernel's . config file under /boot with something like grep 'CONFIG_HZ=' /boot/config-$(uname -r) .

What is HZ Linux?

A jiffy is a kernel unit of time declared in <linux/jiffies. h> . To understand jiffies, we need to introduce a new constant, HZ, which is the number of times jiffies is incremented in one second. Each increment is called a tick. In other words, HZ represents the size of a jiffy.

What is HZ kernel?

HZ is the frequency with which the system's timer hardware is programmed to interrupt the kernel. Much of the kernel's internal housekeeping, including process accounting, scheduler time slice accounting, and internal time management, is done in the timer interrupt handler.

What is jiffies in Linux kernel?

The global variable “jiffies” holds the number of ticks that have occurred since the system booted. On boot, the kernel initializes the variable to zero, and it is incremented by one during each timer interrupt. Thus, because there are HZ timer interrupts in a second, there are HZ jiffies in a second.


1 Answers

There's no uniform answer to this questions, as in some cases your kernel may be compiled "tickless" and not use a regular timer interrupt at all. But if you're on a traditional kernel and a traditional distro, you can find the current kernel's .config file under /boot with something like grep 'CONFIG_HZ=' /boot/config-$(uname -r).

like image 71
Andy Ross Avatar answered Nov 04 '22 23:11

Andy Ross