6

Background

I want to observe a running Linux system over several days for testing verification. It's a gentoo build and with custom software on top. The custom software requires various services and scripts that are datetime driven (i.e. "once a week, run ..."). I need to verify the scheduled work is performing in a harmonious manner. For testing purity, I want to avoid adjusting the pre-existing schedules (i.e. not just tweak the schedules so everything occurs more often).

The system has no important or time critical interactions with systems outside of itself.

Problem

Waiting for the system to step through daily and weekly activity is a long wait time. Modifying all clock-based timers on the system would be time consuming. Yet, I often want to test a system's end-to-end scheduled activities without waiting a week, and without manually changing the schedule periodicity to be shorter.

Potential Solution

Have the Linux system under test appear to run through it's daily cycle of activity within just a few hours.

Is there a way to cause the system's time to run faster than real world time?



My first thought is manipulating the ntp daemon to repeatedly and smoothly increment the clock . Any other ideas?

1
  • If I want to test something that must run say every 4 hours but don't want to wait that long I simply reschedule it to run more frequently. Can't you do the same? Oct 12, 2012 at 5:57

3 Answers 3

4

If you are willing to spend more time getting this to work you can always use virtualization and get guest system clock to run faster.

Here http://sysnet.ucsd.edu/projects/time-dilation/ you can find patches for xen that allow you to slow the guest system down (the opposite of what you want to achieve), so some modifications might be required.

4

Write a shell script that sets the system time and then waits for the results of the next job, then sets the system time again and waits for the results of the next job... Repeat until done.

2

Disable all time syncronization features to make sure no part of the system gets correct time from anywhere and then use tickadj to get seriously faster realtime clock than normal.

I haven't done this in a long time so I'm not sure if you have to disable HPET (e.g. in BIOS) for tickadj to have effect.

And if you don't need to run the test on real hardware, check the documentation of the virtual machine you have.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .