Setting the BOS Server's Restart Times

The BOS Server by default has general restarts disabled. If you wish, it may be configured so that it restarts once a week, and the new instance restarts all processes marked with status flag Run in the local /usr/afs/local/BosConfig file (this is equivalent to issuing the bos restart command with the -bosserver flag). Historically, the default restart time was Sunday at 4:00 a.m - sites which have been upgraded from earlier versions of OpenAFS may find that this value is still present. The weekly restart was designed to minimize core leaks, which can develop as a process continues to allocate virtual memory but does not free it again. It is believed that these leaks have been fixed in OpenAFS.

The BOS Server also by default checks once a day for any newly installed binary files. If it finds that the modification time stamp on a process's binary file in the /usr/afs/bin directory is more recent than the time at which the process last started, it restarts the process so that a new instance starts using the new binary file. The default binary-checking time is 5:00 a.m.

Because restarts can cause outages during which the file system is inaccessible, the default times for restarts are in the early morning when usage is likely to be lowest. Restarting a database server process on any database server machine usually makes the entire system unavailable to everyone for a brief time, whereas restarting other types of processes inconveniences only users interacting with that process on that machine. The longest outages typically result from restarting the fs process, because the File Server must reattach all volumes.

The BosConfig file on each file server machine records the two restart times. To display the current setting, issue the bos getrestart command. To reset a time, use the bos setrestart command.

To display the BOS Server restart times

  1. Issue the bos getrestart command to display the automatic restart times.

       % bos getrestart <machine name>
    

    where

    getr

    Is the shortest acceptable abbreviation of getrestart.

    machine name

    Specifies the server machine for which to display the restart times.

To set the general or binary restart time

  1. Verify that you are listed in the /usr/afs/etc/UserList file. If necessary, issue the bos listusers command, which is fully described in To display the users in the UserList file.

       % bos listusers <machine name>
    
  2. Issue the bos setrestart command with the -general flag to set the general restart time or the -newbinary flag to set the binary restart time. The command accepts only one of the flags at a time.

       % bos setrestart <machine name> "<time to restart server>" [-general]  [-newbinary]
    

    where

    setr

    Is the shortest acceptable abbreviation of setrestart.

    machine name

    Specifies the server machine.

    time to restart server

    Sets when the BOS Server restarts itself (if combined with the -general flag) or any process with a new binary file (if combined with the -newbinary flag). Provide one of the following types of values:

    • The string never, which directs the BOS Server never to perform the indicated type of restart.

    • A time of day (the conventional type of value for the binary restart time). Separate the hours and minutes with a colon (hh:MM), and use either 24-hour format, or a value in the range from 1:00 through 12:59 with the addition of am or pm. For example, both 14:30 and "2:30 pm" indicate 2:30 in the afternoon. Surround this parameter with double quotes (" ") if it contains a space.

    • A day of the week and time of day, separated by a space and surrounded with double quotes (" "). This is the conventional type of value for the general restart. For the day, provide either the whole name or the first three letters, all in lowercase letters (sunday or sun, thursday or thu, and so on). For the time, use the same format as when specifying the time alone.

    If desired, precede a time or day and time definition with the string every or at. These words do not change the meaning, but possibly make the output of the bos getrestart command easier to understand.

    Note

    If the specified time is within one hour of the current time, the BOS Server does not perform the restart until the next eligible time (the next day for a time or next week for a day and time).

    -general

    Sets the general restart time when the BOS Server restarts itself.

    -newbinary

    Sets the restart time for processes with new binary files.