System Administration Guide, Volume II
この本のみを検索
PDF 文書ファイルをダウンロードする

Examining and Changing System Information

63

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.
How to Add "Workstation Info" to the Workspace Menupage 1272
How to Display General System Informationpage 1274
How to Display a System's Host ID Numberpage 1275
How to Display a System's Installed Memorypage 1275
How to Display the Date and Timepage 1276
How to Synchronize Date and Time From Another Systempage 1278
How to Set a System's Date and Time Manuallypage 1279
How to Set Up a Message of the Daypage 1280
How to Set the Number of Processes per Userpage 1281
How to Increase the Number of Pseudo-ttys to 256page 1281
How to Increase the Number of Lock Requestspage 1282
How to Increase Shared Memory Segmentspage 1282

Using the Workstation Information Window to Display System Information

"Workstation Info . . ." in the OpenWindows Workspace menu . . .

Internal bitmap(450x124)

. . . provides the following information about a system:
  • Workstation name and type
  • Host ID
  • Internet address and network domain
  • Physical memory (RAM) and virtual memory
  • Operating system and window system versions
Some of the same information can be displayed with commands described later in this section, but this screen is a convenient way to display this particular collection of information.
If your OpenWindows Workspace menu does not include the Workstation Info command, see "How to Add "Workstation Info" to the Workspace Menu" on page 1272.

· How to Add "Workstation Info" to the Workspace Menu

  1. Use the editor of your choice to open .openwin-menu in your home directory.


  # vi .openwin-menu  

  1. Add the following line to the .openwin-menu file.


  "Workstation Info ..."      exec $OPENWINHOME/bin/wsinfo  

The placement of this line determines the placement of the command in the menu. In other words, if you place it above the Properties line, it will appear above the Properties command in the menu:

Imported image(459x229)

  1. Exit the file, saving the changes.

Using Commands to Display System Information

Table 63-1 shows man pages and descriptions for some commands that enable you to display general system information.
Table 63-1
CommandEnables You to Display a System's ...
uname(1)Operating system name, release, and version; node name;
hardware name; processor type
hostid(1)Host ID number
prtconf(1M)Installed memory
date(1)Date and time

· How to Display General System Information

To display system information, use the uname command.

  $ uname [-a]  

In this command,
unameDisplays only the name of the operating system.
-aDisplays the operating system name as well as the system node name, operating system release, operating system version, hardware name, and processor type.

Example--Displaying General System Information

The following example shows sample output from the uname command on the system jupiter.

  $ uname  
  SunOS  
  $ uname -a  
  SunOS jupiter 5.5 preview95 sunrm sparc  

· How to Display a System's Host ID Number

To display the host identification number in hexadecimal format, use the hostid command.

  $ hostid  

Example--Displaying a System's Host ID Number

The following example shows sample output from the hostid command.

  $ hostid  
  7725ac42  

· How to Display a System's Installed Memory

To display the amount of memory installed on your system, use the prtconf command.

  $ prtconf [| grep Memory]  

In this command,
grep Memory.....Focuses output from this command to display memory information only.

Example--Displaying a System's Installed Memory

The following example shows sample output from the prtconf command.

  # prtconf | grep Memory  
  Memory size: 32 Megabytes  

· How to Display the Date and Time

To display the current date and time according to your system clock, use the date command.

  $ date  

Example--Displaying the Date and Time

The following example shows sample output from the date command.

  $ date  
  Thu Apr 13 10:31:43 EST 1995  

Using Commands to Change System Information

Table 63-2 shows man pages and descriptions for some commands that enable you to change general system information.
Table 63-2
CommandEnables 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
By 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:
  • Change the number of processes per user
  • Increase the number of pseudo-ttys to 256
  • Increase the number of lock requests
  • Increase shared memory segments
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.

· How to Synchronize Date and Time From Another System

  1. Become root.

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


  # rdate other-system-name  

In this command,
other-system-name..Is the name of another system.

Verification--Synchronizing Date and Time From Another System

To verify that you have reset your system's date and time by using rdate, check 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, which is running several hours behind, is reset to match the date and time of the server Pluto.

  neptune$ date  
  Tue Mar 28 19:31:43 EST 1995  
  neptune$ rdate pluto  
  Tue Mar 28 22:00:00 EST 1995  
  neptune$ date  
  Tue Mar 28 22:00:00 EST 1995  

· How to Set a System's Date and Time Manually

  1. Become root.

  2. Enter the new date and time.


  # date mmddHHMM[[cc]yy]  

In this command,
mmIs the month, using two digits.
ddIs the day of the month, using two digits.
HHIs the hour, using two digits and a 24-hour clock.
MMAre the minutes, using two digits.
ccIs the century, using two digits.
yyIs the year, using two digits.

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

After you set the date and time manually, you can use date with no options to display your system's new date and time to confirm that this information has changed.

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.

  $ date  
  Fri Dec 9 10:31:00 MST 1994  
  $ date 032318151995  
  Thu Mar 23 18:15:00 MST 1995  

· How to Set Up a Message of the Day

  1. Become root.

  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.

Verification--Setting Up a Message of the Day

To view the /etc/motd file, use the cat or more command.

  $ 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:

  Sun Microsystems Inc     SunOS 5.5        Generic          August 1995  

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

  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  

In this command,
value.........Is the number of processes a user can run at once.
  1. Exit the file, saving changes.

  2. Reboot the system.

Example--Setting the Number of Processes per User

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

  set maxuprc=10  

· How to Increase the Number of Pseudo-ttys to 256

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

  2. Add the following line to the file.


  set pt_cnt=256  

  1. Exit the file, saving changes.

  2. Instruct the system to reconfigure upon rebooting.


  $ touch /reconfigure  

  1. Reboot the system.

· How to Increase the Number of Lock Requests

  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=1024  

  1. Exit the file, saving changes.

  2. Reboot the system.

· How to Increase Shared Memory Segments

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

  2. Add the following lines to the file to 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 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  
  set semsys:seminfo_shmmin=200  
  set semsys:seminfo_shmmni=200  
  set semsys:seminfo_shmseg=200  

  1. Exit the file, saving changes.

  2. Reboot the system.