linux系统引导流程
linux 查看软件时间 date
[root@localhost test]# date
Sun Jan 15 19:20:01 PST 2012
[root@localhost test]#
hwclock 软件时钟
[root@localhost test]# hwclock --help
hwclock - query and set the hardware clock (RTC)
Usage: hwclock [function] [options...]
Functions:
--help show this help
--show read hardware clock and print result
--set set the rtc to the time given with --date
--hctosys set the system time from the hardware clock 依据硬件时钟设置软件时钟 --systohc set the hardware clock to the current system time 依据软件时钟设置硬件时钟
--adjust adjust the rtc to account for systematic drift since
the clock was last set or adjusted
--getepoch print out the kernel's hardware clock epoch value
--setepoch set the kernel's hardware clock epoch value to the
value given with --epoch
--version print out the version of hwclock to stdout
Options:
--utc the hardware clock is kept in coordinated universal time
--localtime the hardware clock is kept in local time
--directisa access the ISA bus directly instead of /dev/rtc
--badyear ignore rtc's year because the bios is broken
--date specifies the time to which to set the hardware clock
--epoch=year specifies the year which is the beginning of the
hardware clock's epoch value
--noadjfile do not access /etc/adjtime. Requires the use of
either --utc or --localtime
[root@localhost test]#
Eg.
[root@localhost test]# date
Sun Jan 15 19:26:05 PST 2012
[root@localhost test]# hwclock
Sun 15 Jan 2012 07:26:10 PM PST -0.128598 seconds
[root@localhost test]# hwclock --hctosys
[root@localhost test]# date