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 ... |
---|---|
Date and time to match those of another system |
|
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:
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. |
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.
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 |
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. |
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.
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 |
Open the /etc/motd file, using the editor of your choice.
Edit the text to include the message that will be displayed as part of the user login process, including spaces, Tabs, and Returns.
Exit the file, saving your changes.
Verify the changes by displaying the contents of the /etc/motd.
$ cat /etc/motd Welcome to the UNIX Universe. Have a nice 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... |
Add the following line to the file.
set maxuprc=value |
value |
Number of processes a user can run at once. |
Exit the file, saving changes.
Verify the maxuprc value change.
# grep maxuprc /etc/system set maxuprc=100 |
Reboot the system.
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 |
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. |
Exit the file, saving changes.
Verify the pt_cnt value change.
# grep pt_cnt /etc/system set pt_cnt=256 |
Instruct the system to reconfigure upon rebooting.
$ touch /reconfigure |
Reboot the system.
The following example increases the number of ptys to 128.
set pt_cnt=128 set npty=128 set sadcnt=256 set nautopush=128 |
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.
Add the following line to the file to increase the number of lock requests (default is 512).
set tune_t_flckrec=value |
Exit the file, saving changes.
Verify the tune_t_flckrec value change.
# grep tune_t_flckrec /etc/system set tune_t_flckrec=value |
The following example increases the number of lock requests to 1024.
set tune_t_flckrec=1024 |
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 |
Exit the file, saving changes.
Verify the shared memory value changes.
# grep shmsys /etc/system |
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 |