The table below shows man page references and descriptions for some commands that enable you to change general system information.
Table 27-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:
The Network Time Protocol (NTP) public domain software from the University of Delaware is included in the Solaris software starting with the Solaris 2.6 release.
NTP enables you to manage precise time and network clock synchronization in a network environment. The xntpd daemon sets and maintains the system time-of-day. The xntpd daemon is a complete implementation of the version 3 standard, as defined by RFC 1305.
The xntpd daemon reads the /etc/inet/ntp.conf file at system startup. See xntpd(1M) for information about configuration options.
Keep the following in mind when using NTP in your network:
The xntpd daemon takes up minimal system resources.
An NTP client synchronizes automatically with an NTP server when it boots, and if it gets out of sync, it will resync again when it sees a time server.
Become superuser.
Change to the /etc/inet directory.
Copy the ntp.server file to the ntp.conf file.
# cp ntp.server ntp.conf |
Change to the /etc/init.d directory.
Start the xntpd daemon.
# ./xntpd start |
Become superuser.
Change to the /etc/inet directory.
Copy the ntp.client file to the ntp.conf file.
# cp ntp.client ntp.conf |
Change to the /etc/init.d directory.
Start the xntpd daemon.
# ./xntpd start |
To reset the date and time to synchronize with another system, use the rdate command.
# rdate another-system |
another-system |
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 earth, running several hours behind, is reset to match the date and time of the server starbug.
earth# date Thu Sep 16 11:08:27 MDT 1999 earth# rdate starbug Thu Sep 16 14:06:37 1999 earth# date Thu Sep 16 14:06:40 MDT 1999 |
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.
# date Thu Sep 16 14:00:00 MDT 1999 # date 0916141099 Thu Sep 16 14:10:00 MDT 1999 |
Edit the /etc/motd file and add a message of your choice.
Edit the text to include the message that will be displayed during the user login process, including spaces, Tabs, and Returns.
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.8 Generic February 2000 |
The following example shows an edited /etc/motd file that provides information about system availability 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, July 10, for upgrades and maintenance. Do not try to access the system during those hours. Thank you... |
Become superuser.
Edit the /etc/system file and add the following line.
set maxuprc=value |
value |
Number of processes a user can run at once. |
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 |
Become superuser.
Edit the /etc/system file and 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 |
Minimum 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 |
Verify the shared memory value changes.
# grep shmsys /etc/system |
# init 6 |
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 |