Re: lug-bg: Kakvo e jiffies time
- Subject: Re: lug-bg: Kakvo e jiffies time
- From: raptor <raptor@xxxxxxxxxx>
- Date: Tue, 9 Sep 2003 10:59:51 +0300
Imai predwid che w nowite kerneli ima wazmovnost ot menuconfig tazi stoinost
da se naglasq predi kompilaciqta na kernela, taka che ne ochakwai da e tochono takawa
stoinostta...
Dori i razlichnite distro-ta weche polzwat po default razlichni stoinosti ot HZ=100,
w tqhnite stock-kerneli.
|Yavor Shahpasov wrote:
|
|> Macha se da napisha edin script deto da pokazva uptime na opredelen
|> process
|>
|> za tselta cheta
|> /proc/pid/stat, vav 22 element pishe che e vremeto ot boot vav jiffie,
|> vremeto ot boot go gepia on /proc/stat, no kakvo po diavolite e giffies
|>
|> pitah google no samo source ot kernel mi vadi, iavno e che search
|> engines ne sa mnogo umni, ili az ne pitam pravilno, dali pak jeeves ne
|> znae .
|>
|> Niakoi madar kernel haker moje li da pomogne.
|>
|
|/linux/kernel/itimer.c
|
|/static void *jiffiestotv*(unsigned long *jiffies*, struct *timeval* **value*)
|{
| *value*->*tv_usec* = (*jiffies* % *HZ*) * (1000000 / *HZ*);
| *value*->*tv_sec* = *jiffies* / *HZ*;
| return;
|}
|
|
|
|linux/include/asm-i386/param.h:
|
|#ifndef HZ
|#define HZ 100
|#endif
|
|
|Use the source :-)
|
|cheers,
|face
============================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers).
http://www.linux-bulgaria.org - Hosted by Internet Group Ltd. - Stara Zagora
To unsubscribe: http://www.linux-bulgaria.org/public/mail_list.html
============================================================================
|