Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Background
I want to monitor a running linux system over several days. It's a custom gentoo build and with much custom software on board. This software has ongoing maintenance timers and cron scripts and other clock driven events. I need to verify these scheduled events are working.
Problem
Waiting for the system to step through daily and weekly activity is a long wait time. And 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.
Potential Solution
Have the linux system under test appear to run through it's daily cycle of activity within just a few hours.

My Question for Serverfault
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?

And yes, I know this may have strange side affects. However, the system has no important or time critical interactions with systems outside of itself. And this may be a valuable testing technique.

share|improve this question
    
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? –  John Gardeniers Oct 12 '12 at 5:57

2 Answers 2

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.