Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX System Administration Tasks: HP 9000 > Chapter 1 Setting Up a System

Making Adjustments to Your System

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

Once you have your system up and running, you can make adjustments to suit your particular operating requirements or to accommodate your users.

Setting the System Clock

Only the superuser (root) can change the system clock. The system clock budgets process time and tracks file access.

Potential Problems Caused by Changing the System Clock

The following are potential problems you can cause by changing the system clock:

  • The make program is sensitive to a file's time and date information and to the current value of the system clock. Setting the clock forward will have no effect, but setting the clock backward by even a small amount may cause make to behave unpredictably.

  • Incremental backups heavily depend on a correct date because the backups rely on a dated file. If the date is not correct, an incorrect version of a file can be backed up.

  • Altering the system clock can cause unexpected results for jobs scheduled by /usr/sbin/cron:

    • If you set the time back, cron does not run any jobs until the clock catches up to the point from which it was set back. For example, if you set the clock back from 8:00 to 7:30, cron will not run any jobs until the clock again reaches 8:00.

    • If you set the clock ahead, cron attempts to catch up by immediately starting all jobs scheduled to run between the old time and the new. For example, if you set the clock ahead from 9:00 to 10:00, cron immediately starts all jobs scheduled to run between 9:00 and 10:00.

Setting the Time Zone (TZ)

/sbin/set_parms sets your time zone upon booting. If you have to reset the time zone, you can use /sbin/set_parms (see “Manually Setting Initial Information ” later in this chapter for more information).

You can also use the /usr/sbin/setup command to make adjustments to the time zone. See setup(1M) for details.

Setting the Time and Date

/sbin/set_parms sets your time and date upon booting (see “Manually Setting Initial Information ” next in this chapter for more information). If you have to reset the time or date, you can use SAM or HP-UX commands.

To use HP-UX commands, follow these steps:

NOTE: Hewlett-Packard strongly recommends that you use single-user mode when changing the system clock. Therefore, warn users of a planned system shutdown. See Chapter 2, “Shutting Down the System ” for details on system shutdown.
  1. Log in as superuser.

    CAUTION: Changing the date while the system is running in multi-user mode may disrupt user-scheduled and time sensitive programs and processes. Changing the date may cause make(1), cron(1M), and the Source Control subsystems (SCCS, sccs(1), and rcs(1)), to behave in unexpected ways. Additionally, any Hewlett-Packard or third party supplied programs that access the system time, or file timestamps stored in the file system, may behave in unexpected ways after changing the date. Setting the date back is not recommended. If changes were made to files in sccs file format while the clock was not set correctly, check the modified files with the val command. See val(1) for details. See “Potential Problems Caused by Changing the System Clock ” for more information.
  2. Shut the system down to single-user mode. For example:

    /etc/shutdown
  3. Find the Process ID (PID) for cron (if any):

    ps -ef | grep cron
  4. Terminate cron by entering:

    kill pid

    where pid is the PID determined from the previous step.

  5. Set the time and date. For example:

    date 0302140495

    This indicates the month of March, the second day of the month, the hour of 2:00 PM, 4 minutes past the hour, and the year 1995. Note that you must include leading zeros (03, not 3), the hour is on a twenty-four hour clock, and that the year is optional.

    When /sbin/date executes, it shows the time and date on standard output.

  6. Restart cron by entering:

    cron
  7. Immediately shutdown and reboot the system by entering:

    /etc/shutdown -r 0

You can also use the /usr/sbin/setup command to make adjustments to the time and date. See setup(1M) for details.

Manually Setting Initial Information

Use this section only if you need to add or modify system parameter information. Any modifications should be made as soon as possible after the initial installation.

/sbin/set_parms is automatically run when you first boot the system. To enter the appropriate set_parm dialog screen to manually add or modify information after booting, log in as superuser and specify

set_parms option

option is one of the following:

Table 1-1 Title not available (Manually Setting Initial Information )

option

Description

hostname

Your unique system name. This host name must be eight or fewer characters long, contain only alphabetic characters, numbers, underscores, or dashes, and must start with an alphabetic character.

ip_address

Internet protocol address. If networking is installed, this is an address with four numeric components, each of which is separated by a period with each number between 0 and 256. An example of an IP address is: 255.32.3.10. If you do not have networking installed, you will not be prompted for the IP address.

timezone

The time zone where your system is located.

addl_netwrk

Additional network parameters. These allow you to configure additional network parameters, such as the subnetwork mask, network gateway, network gateway IP address, local domain name, Domain Name System (DNS) server host name, DNS server IP address and Network Information Service domain name.

font_c-s

Network font service. This allows you to configure your workstation to be a font client or server. As a font client, your workstation uses the font files on a network server rather than using the fonts on its own hard disk, thus saving disk space. System RAM usage is reduced for font clients, but increased for font servers.

 

Changes you make using set_parms will take effect after rebooting the system. See Chapter 2, "Starting and Stopping HP-UX" for details on rebooting.

Reconfiguring the Kernel

For most systems, the default kernel configuration included with HP-UX will be sufficient for your needs. However, in each of the following instances you need to reconfigure the kernel:

  • Adding or removing device drivers

    See "Adding Peripherals" earlier in this chapter for information on adding peripherals.

    You may also want to remove a driver from your kernel if your system no longer uses any peripherals of that type. This is not required, but can be desirable if a smaller, more efficient kernel is needed. However, before you remove the driver, ensure that other drivers are not dependent on it by checking the files in the directory /usr/conf/master.d/ for a table of driver dependencies in the section DRIVER_DEPENDENCY. The file core-hpux will have the most definitions, but other files in the directory can contain definitions as well.

  • Modifying system parameters

    You may need to change one or more tunable system parameters, such as to accommodate a specialized application or an exceptionally large number of users. The tunable system parameters are defined in the section TUNABLE in files that are in the directory /usr/conf/master.d/. The file /usr/conf/master.d/core-hpux will have the most definitions, but other files in the directory can contain definitions as well. Use SAM's online help for information on changing the parameters.

  • Adding certain Hewlett-Packard software

    If you add certain Hewlett-Packard software, such as LAN (Local Area Network) or NS (Network Services), you might need to reconfigure the kernel. Consult the manual that came with the software for installation instructions.

  • Creating a file system of a type other than HFS

    Depending on how your kernel is configured, you might have to reconfigure if you created a file system of a type other than the default High Performance File System (HFS). See Chapter 4, "Working with HP-UX File Systems" in this manual for information on file system types.

  • Adding, removing, or modifying swap, dump, console devices or the root file system

    You will need to reconfigure the kernel for adding and removing dump devices and modifying the location of primary swap or the system console. For information on swap space, see Chapter 6, "Managing Swap Space and Dump Areas" in this manual.

    To add, remove, or modify the root file system, you will not be able to use SAM. Instead, re-install your system or see Chapter 3, "Managing Disks Using the Logical Volume Manager (LVM)" in this manual if you are using logical volumes.

NOTE: If you have cold-installed an HP 9000 Model T500 and you are configuring a large number of file systems (approximately 100 or more), some default table sizes in the kernel may be too small for your system to successfully boot. To boot your system, reconfigure the install kernel before the first boot. The following settings, although not necessarily optimal for the system, will allow the kernel to be booted:

Table 1-2 Title not available (Reconfiguring the Kernel )

Kernel Parameters

Default

Recommended Setting

ninode

476

2048

nproc

276

1024

nfile

790

2048

 

Alternatively, you can do the following:

  • Reconfigure the kernel and change the value of maxusers to a large value, such as 200.

  • Select an appropriate bundle of SAM-tuned parameters by doing the following:

    • Open the "SAM Kernel Configuration" menu item

    • Select "Configurable Parameters"

    • Pull down the "Actions" menu

    • Select "Apply Tuned Parameter Set"

For further details, refer to Installing HP-UX 10.01 and Updating HP-UX 10.0 to 10.01.

Steps to Reconfigure the Kernel

You can use SAM or HP-UX commands to reconfigure the kernel.

To use SAM to reconfigure the kernel, log in as the superuser, ensure you are logged on to the machine for which you are regenerating the kernel, and start SAM. Select the "Kernel Configuration" menu item; use SAM's online help if needed. Generally, SAM is simpler and faster to use than the equivalent HP-UX commands.

To use HP-UX commands to reconfigure the kernel:

  1. Log in as superuser on the machine for which a new kernel is being generated. You can log in remotely from another location by using the /usr/bin/rlogin command.

  2. Change directories to the build environment (/stand/build). There, execute a system preparation script, /usr/lbin/sysadm/system_prep, which extracts the system file from the current kernel, as follows:

    cd /stand/build
    system_prep -v -s system

    The system_prep script creates the system file /stand/build/system in your current directory. The -v option provides explanation as the script executes.

  3. Edit the /stand/build/system file to perform your task.

  4. Build the kernel:

    mk_kernel -s system

    The mk_kernel command creates /stand/build/vmunix_test, a kernel ready for testing.

    If you get this message when executing mk_kernel,

    ERROR:    Kernel is too large to boot. 
       Actual:    15605892 bytes
       Limit:     13580288 bytes

    eliminate optional subsystems or drivers and decrease the tunable parameters. The actual bytes will vary with each instance. The limit will also vary depending on the HP-UX release.

  5. Move the old system file and kernel so if anything goes wrong, you still have a bootable kernel.

    mv /stand/system /stand/system.prev
    mv /stand/vmunix /stand/vmunix.prev
  6. Move the new system file and new kernel into place, ready to be used when you reboot the system.

    mv /stand/build/system /stand/system
    mv /stand/build/vmunix_test /stand/vmunix
  7. Notify users that the system will be shut down. You can use the

    /usr/sbin/wall command and/or the interactive capabilities of the /usr/sbin/shutdown command to broadcast a message to users before the system goes down. For details, see wall(1M), shutdown(1M), and "Shutting Down the System" in Chapter 2 of this manual.

    NOTE: You only need to do the next steps if you are changing hardware, such as adding new peripherals. If you are simply changing a kernel parameter, reboot the system to active the new kernel with shutdown -r.
  8. Bring the system to a halt using the shutdown command.

  9. Turn off the power to all peripheral devices and then to the SPU.

  10. Install the hardware or remove interface cards or peripheral devices. Refer to the documents shipped with the products being installed and to Configuring HP-UX for Peripherals for specific instructions.

  11. Turn on the power to all peripheral devices. Wait for them to become "ready", then turn on power to the SPU. The system will attempt to boot the new kernel.

If the New Kernel Fails to Boot

If the new kernel fails to boot, boot the system from the backup kernel and repeat the process of creating a new kernel. See Chapter 2, "Starting and Stopping HP-UX" in this manual for information on rebooting from a backup kernel.

Removing Unwanted Software Products

Use the /usr/sbin/swremove command to remove unwanted installed system software. This command removes both physically installed and link-installed software. For more information, see swremove(1M) and Managing HP-UX Software with SD-UX .

You can also use the /usr/sbin/freedisk command to recover disk space. This command invokes an interactive script that finds and removes filesets that have not been used since they were originally installed by /usr/sbin/swinstall. See freedisk(1M) and swinstall(1M) for details.

Customizing the System and User Environments

Customizing the system can be accomplished either by changing the way the system behaves in general, or, by modifying the way a particular user interacts with it.

Customizing System Startup

/sbin/rc is a script that is invoked when a new run-level is entered via the init command. rc, in turn, automatically runs start-up scripts appropriate for the subsystem and run-level. For example, for run-level 2, rc might run networking and DCE scripts. See "Controlling Usage and Processes with Run-Levels" next in this chapter for a description of the run-levels. If you want to customize a start-up script, see the details in rc(1M).

Customizing the Login

If you want to display information users will see immediately before the login: prompt, add the information to the file /etc/issue. Normally /etc/issue identifies the system name and the release of HP-UX, but it can include any other information you want. For example:

Folly [HP-UX Release B.10.0  9000/870]

Posting a Message of the Day

If you want to display messages after each successful login, place your messages in the file /etc/motd. These messages will appear if the system-wide customization file (either /etc/profile or /etc/csh.login) contains the following line:

cat /etc/motd       # message of the day

By default, /etc/profile or /etc/csh.login displays the message in /etc/motd at the user login.

Use /etc/motd to display timely messages. For example:

Welcome to the System SYSTEMUX [HP-UX Release B.10.0  9000/870] 
For any questions or concerns, contact the System Administrator.

Customizing System-Wide and User Login Environments

Defaults for system-wide variables, such as time zone setting, terminal type, search path, and mail and news notification, can be set in /etc/profile for Korn and POSIX shell users and in /etc/csh.login for C shell users.

User login scripts can be used to override the system defaults. When SAM adds a user, default user login scripts are copied to the user's home directory. For Korn and POSIX shell users, /etc/skel/.profile is copied to $HOME as .profile. For C shell users, /etc/skel/.login and /etc/skel/.cshrc are copied to $HOME as .login and .cshrc. Refer to Shells: User's Guide and Technical Addendum to the Shells: User's Guide for information on customizing user login scripts.

NOTE: Do a full backup once you have initially set up and customized your system. This allows you to reconstruct your system — kernel, system files, file system structure, user structures, and your customized files — if you need to. Use SAM or HP-UX commands to perform the backup, as described in Chapter 9, "Backing Up and Restoring Data" in this manual.

HP VUE users use different login scripts; refer to HP Visual User Environment 3.0 User's Guide for information.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.