Skip to contentSkip to conversation

Is 'hwclock -u -s' in a modern Linux guest necessary?

Qemu-devel Richard W.M. Jones 1 participant 1 message Mar 19, 2016

lore
Share & tools
lore
#0 lore raw

I've been examining the time taken to launch the libguestfs appliance[1].

One of the commands we run in our custom init is:

hwclock -u -s

This takes 0.3 seconds, which is over 10% of the total launch time, and as far as I can tell it does nothing useful. It was added many years ago, and no one knows what it does.

We can assume that we're running a modern Linux guest kernel, recent qemu, have virtio, kvm-clock etc. Is there any need to run this command?

Rich.

[1] http://libguestfs.org/guestfs-internals.1.html

Signature · 4 lines
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org