Re: How to modify uptime

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi...

> One of our customer is facing an issue with jiffies wrap up.
> on a 32 bit machine, the variable jiffies count upto 472 days.
> the customer's server was up for 472 days ('uptime') and to reproduce
> the same, i tried to tweak with the variable HZ in

you're chance is to go with 64 bit IMHO

> static int __init jiffies_init(void)
> {
> unsigned long j,z;
> j = z = 0;
> j = jiffies;
> z = HZ;
> printk(KERN_ALERT "jiffies value is %lu\n",j);
> printk(KERN_ALERT "jiffies value in seconds %lu\n",(jiffies/HZ));
> printk(KERN_ALERT "HZ value is %lu\n",z);
> return 0;
> }
>
> static void __exit jiffies_exit(void)
> {
> printk(KERN_ALERT "Goodbye, world!\n");
> }
>
> module_init(jiffies_init);
> module_exit(jiffies_exit);
>
> MODULE_LICENSE("GPL");
>
> [root@localhost drivers]# insmod get_jiffies.ko
> [root@localhost drivers]# dmesg
> jiffies value is 372939
> jiffies value in seconds 1491
> HZ value is 250 <====
>
> why this HZ variable is shown as 250 ?

because you're kernel is still effectively use 250 as HZ....

regards,

Mulyadi.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux