The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 ТемаНаборКатегория 
 
 [Cписок руководств | Печать]

adjkerntz (8)
  • >> adjkerntz (8) ( FreeBSD man: Команды системного администрирования )

  • BSD mandoc
     

    NAME

    
    
    adjkerntz
    
     - adjust local time CMOS clock to reflect time zone changes and keep current timezone offset for the kernel
    
     
    

    SYNOPSIS

    -i
    -a [-s ]  

    DESCRIPTION

    The utility maintains the proper relationship between the kernel clock, which is always set to UTC, and the CMOS clock, which may be set to local time. The utility also informs the kernel about machine timezone shifts to maintain proper timestamps for local time file systems such as the MS-DOS file system. The main purpose of this thing is not general fixing of initially broken MS-DOS file timestamp idea but keeping the same timestamps between Fx MS-DOS file system and MS-DOS operating system installed on the same machine. If the file /etc/wall_cmos_clock exists, it means that CMOS clock keeps local time (MS-DOS and MS-Windows compatible mode). If that file does not exist, it means that the CMOS clock keeps UTC time. The utility passes this state to the machdep.wall_cmos_clock kernel variable.

    Adjustments may be needed at system startup and shutdown, and whenever a time zone change occurs. To handle these different situations, is invoked in two ways:

    -i
    This form handles system startups and shutdowns. The utility is invoked with this option from /etc/rc on entry to multi-user mode, before any other daemons have been started. The utility puts itself into the background. Then, for a local time CMOS clock, reads the local time from it and sets the kernel clock to the corresponding UTC time. The utility also stores the local time zone offset into the machdep.adjkerntz kernel variable, for use by subsequent invocations of 'adjkerntz -a' and by local time file systems.

    For a local time CMOS clock 'adjkerntz -i' pauses, and remains inactive as a background daemon until it receives a SIGTERM. The SIGTERM will normally be sent by init(8) when the system leaves multi-user mode (usually, because the system is being shut down). After receiving the SIGTERM, reads the UTC kernel clock and updates the CMOS clock, if necessary, to ensure that it reflects the current local time zone. Then exits.

    -a [-s ]
    This form is used to update the local time CMOS clock and kernel machdep.adjkerntz variable when time zone changes occur, e.g., when entering or leaving daylight savings time. The utility uses the kernel clock's UTC time, the previously stored time zone offset, and the changed time zone rule to calculate a new time zone offset. It stores the new offset into the machdep.adjkerntz kernel variable, and updates the wall CMOS clock to the new local time. If 'adjkerntz -a' was started at a nonexistent time (during a timezone change), it exits with a warning diagnostic unless the -s option was used, in which case sleeps 30 minutes and tries again.

    This form should be invoked from root's crontab(5) every half hour between midnight and 5am, when most modern time zone changes occur. Warning: do not use the -s option in a crontab(5) command line, or multiple 'adjkerntz -a' instances could conflict with each other.

    The utility clears the kernel timezone structure and makes the kernel clock run in the UTC time zone. Super-user privileges are required for all operations.  

    ENVIRONMENT

    TZ
    Time zone change rule, see tzset(3); not needed when tzsetup(8) or zic(8) is used.

     

    FILES

    /etc/localtime
    Current zoneinfo file, see tzsetup(8) and zic(8).
    /etc/wall_cmos_clock
    Empty file. Its presence indicates that the machine's CMOS clock is set to local time, while its absence indicates a UTC CMOS clock.

     

    DIAGNOSTICS

    No diagnostics. If an error occurs, logs an error message via syslog(3) and exits with a nonzero return code.  

    SEE ALSO

    tzset(3), crontab(5), mount_msdosfs8, rc(8), sysctl(8), tzsetup(8), zic(8)  

    HISTORY

    The utility appeared in Fx 1.0 .  

    AUTHORS

    An Andrey A. Chernov Aq [email protected]


     

    Index

    NAME
    SYNOPSIS
    DESCRIPTION
    ENVIRONMENT
    FILES
    DIAGNOSTICS
    SEE ALSO
    HISTORY
    AUTHORS


    Поиск по тексту MAN-ов: 




    Партнёры:
    PostgresPro
    Inferno Solutions
    Hosting by Hoster.ru
    Хостинг:

    Закладки на сайте
    Проследить за страницей
    Created 1996-2024 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру