This chapter describes tasks required to examine and change the most common system information. This is a list of the step-by-step instructions in this chapter.
Table 56-1 describes commands that enable you to display general system information.
Table 56-1 Commands for Displaying System Information
Command |
Enables You to Display a System's ... |
---|---|
showrev(1m) |
Hostname, host identification number, release, kernel architecture, application architecture, hardware provider, domain, and kernel version |
uname(1) |
Operating system name, release, and version; node name; hardware name; processor type |
Host ID number |
|
Installed memory |
|
Date and time |
To display specific system and software release information, use the showrev command.
$ showrev [-a] |
-a |
Displays all system release information available. |
The following example shows showrev command output.
$ showrev -a Hostname: pluto Hostid: 5721864d Release: 5.6 Kernel architecture: sun4cm Application architecture: sparc Hardware provider: Sun_Microsystems Domain: solar.com Kernel version: SunOS 5.6 Generic August 1997 OpenWindows version: OpenWindows Version 3.6 January 1997 No patches are installed $ |
To display system information, use the uname command.
$ uname[-a] |
-a |
Displays the operating system name as well as the system node name, operating system release, operating system version, hardware name, and processor type. |
The following example shows uname command output.
$ uname SunOS $ uname -a SunOS pluto 5.6 Generic sun4m sparc SUNW,SPARCstation-5 $ |
To display the host identification number in hexadecimal format, use the hostid command.
$ hostid |
The following example shows sample output from the hostid command.
$ hostid 7725ac42 |
To display the amount of memory installed on your system, use the prtconf command.
$ prtconf [| grep Memory] |
grep Memory |
Focuses output from this command to display memory information only. |
The following example shows sample output from the prtconf command.
# prtconf | grep Memory Memory size: 56 Megabytes |
To display the current date and time according to your system clock, use the date command.
$ date |
The following example shows sample output from the date command.
$ date Thu Mar 6 09:06:52 MST 1997 $ |
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 |