System Administration Guide

Using Commands to Change System Information

Table 56-2 shows man page references and descriptions for some commands that enable you to change general system information.

Table 56-2 Commands for Changing System Information

Command 

Enables You to Change a System's ... 

rdate(1M)

Date and time to match those of another system 

date(1)

Date and time to match your specifications 

Using these commands, you can set a system's date and time to synchronize with the date and time of another system, such as a server. Or you can change a system's date and time by specifying new information.

The message of the day (MOTD) facility, located in /etc/motd, enables you to send announcements or inquiries to all users of a system when they log in. Use this facility sparingly, and edit this file regularly to remove obsolete messages.

By editing the /etc/system file, you can:

How to Synchronize Date and Time From Another System

  1. Become superuser.

  2. To reset the date and time to synchronize with another system, use the rdate command.


    # rdate other-system-name
    

    other-system-name

    Name of another system. 

  3. Verify that you have reset your system's date correctly by checking your system's date and time using the date command.

    The output should show a date and time that matches that of the other system.

Example--Synchronizing Date and Time From Another System

The following example shows how to use rdate to synchronize the date and time of one system with another. In this example, the system neptune, running several hours behind, is reset to match the date and time of the server pluto .


neptune$ date
Thu Mar  6 09:07:34 MST 1997
neptune$ rdate pluto
Thu Mar  6 09:08:29 1997
neptune$ date
Thu Mar  6 09:08:32 MST 1997
 

How to Set a System's Date and Time Manually

  1. Become superuser.

  2. Enter the new date and time.


    # date mmddHHMM[[cc]yy]
    

    mm

    Month, using two digits. 

    dd

    Day of the month, using two digits. 

    HH

    Hour, using two digits and a 24-hour clock. 

    MM

    Minutes, using two digits. 

    cc

    Century, using two digits. 

    yy

    Year, using two digits. 

  3. Verify that you have reset your system's date correctly by checking your system's date and time using the date command with no options.

    The output should show a date and time that matches that of the other system.

Example--Setting a System's Date and Time Manually

The following example shows how to use date to manually set a system's date and time. Thu Mar 6 09:12:00 MST 1997


# date
Thu Mar  6 09:10:20 MST 1997
# date 030609121997
 

How to Set Up a Message of the Day

  1. Become superuser.

  2. Open the /etc/motd file, using the editor of your choice.

  3. Edit the text to include the message that will be displayed as part of the user login process, including spaces, Tabs, and Returns.

  4. Exit the file, saving your changes.

  5. Verify the changes by displaying the contents of the /etc/motd.


    $ cat /etc/motd
    Welcome to the UNIX Universe.           Have a nice day.

Example--Setting Up a Message of the Day

The default message of the day, provided when you install Solaris software, contains SunOS version information:


$ cat /etc/motd
Sun Microsystems Inc   SunOS 5.6    Generic     August 1997

The following example shows an edited /etc/motd file that provides information about system availabilty to each user who logs in.


$ cat /etc/motd
The system will be down from 7:00 a.m to 2:00 p.m.on
Saturday, August 5, for upgrades and maintenance.
Do not try to access the system during those hours.
Thank you...
 

How to Set the Number of Processes per User

  1. Open the /etc/system file, using the editor of your choice.

  2. Add the following line to the file.


    set maxuprc=value
    

    value

    Number of processes a user can run at once. 

  3. Exit the file, saving changes.

  4. Verify the maxuprc value change.


    # grep maxuprc /etc/system
    set maxuprc=100

    
    
    

  5. Reboot the system.

Example--Setting the Number of Processes per User

The following example shows the line you would add to the /etc/system file to allow users to run 100 processes each.


set maxuprc=100
 

How to Increase the Number of Pseudo-ttys

  1. Open the /etc/system file, using the editor of your choice.

  2. Add the following line to the file.


    set pt_cnt=valueset npty=same_value_as_pt_cnt
    set sad_cnt=2_times_pt_cnt value
    set nautopush=same_value_as_ pt_cnt

    set pt_cnt

    Sets the number of System V ptys. 

    set npty

    Sets the number of BSD ptys. 

    set sadcnt

    Sets the number of STREAMS addressable devices. 

    set nautopush

    Sets the number of STREAMS autopush entries and should be two times the value of sadcnt.

  3. Exit the file, saving changes.

  4. Verify the pt_cnt value change.


    # grep pt_cnt /etc/system
    set pt_cnt=256
  5. Instruct the system to reconfigure upon rebooting.


    $ touch /reconfigure
    
  6. Reboot the system.

Example--Increasing the Number of Pseudo-ttys

The following example increases the number of ptys to 128.


set pt_cnt=128
set npty=128
set sadcnt=256
set nautopush=128

How to Increase the Number of Lock Requests

By default, the number of lock requests that may occur simultaneously is 512. As users log out, they lock files, including utmp. If more than 512 users are likely to log out simultaneously (within a few seconds), the number of file locks allowed must be increased.

  1. Open the /etc/system file, using the editor of your choice.

  2. Add the following line to the file to increase the number of lock requests (default is 512).


    set tune_t_flckrec=value
    
  3. Exit the file, saving changes.

  4. Verify the tune_t_flckrec value change.


    # grep tune_t_flckrec /etc/system
    set tune_t_flckrec=value
    
  5. Reboot the system.

Example--Increasing the Number of Lock Requests

The following example increases the number of lock requests to 1024.


set tune_t_flckrec=1024
 

How to Increase Shared Memory Segments

  1. Open the /etc/system file, using the editor of your choice.

  2. Add the following variables to increase shared memory segments.


    set shmsys:shminfo_shmmax=value
    set shmsys:shminfo_shmmin=value
    set shmsys:shminfo_shmmni=value
    set shmsys:shminfo_shmseg=value
    set semsys:seminfo_semmap=value
    set semsys:seminfo_semmni=value
    set semsys:seminfo_semmns=value
    set semsys:seminfo_semmsl=value
    set semsys:seminfo_semmnu=value
    set semsys:seminfo_semume=value
    
    shmsys:shminfo_shmmax

    Maximum shared memory segment size 

    shmsys:shminfo_shmmin 

    Mininum shared memory segment size 

    shmsys:shminfo_shmmni 

    Number of shared memory identifiers 

    shmsys:shminfo_shmseg 

    Number of segments, per process 

    semsys:seminfo_semmap 

    Number of entries in the semaphore map 

    semsys:seminfo_semmni 

    Number of semaphore identifiers 

    semsys:seminfo_semmns

    Number of semaphores in the system 

    semsys:seminfo_semmsl

    Maximum number of semaphores, per id 

    semsys:seminfo_semmnu 

    Number of processes using the undo facility

    semsys:seminfo_semume

    Maximum number of undo structures per process

  3. Exit the file, saving changes.

  4. Verify the shared memory value changes.


    # grep shmsys /etc/system
    
  5. Reboot the system.

Example--Increasing Shared Memory Segments

The following shared memory values accommodate a system with a large amount of memory (for example, 128 MBytes) that is running a large database application.


set shmsys:shminfo_shmmax=268435456
set shmsys:shminfo_shmmin=200
set shmsys:shminfo_shmmni=200
set shmsys:shminfo_shmseg=200
set semsys:seminfo_semmap=250
set semsys:seminfo_semmni=500
set semsys:seminfo_semmns=500
set semsys:seminfo_semmsl=500
set semsys:seminfo_semmnu=500
set semsys:seminfo_semume=100