Administrator's Guide


Starting, Halting, and Restarting the Server


Task Required Privilege Class
Start, halt, and restart the server System or operator

Starting the Server

To start the server, complete the following steps:

  1. Change to the /usr/lpp/adsmserv/bin directory from an AIX session.

    Enter:

    cd /usr/lpp/adsmserv/bin
    

  2. Start the server.

    Enter:

    dsmserv
    
    Note:If the server does not start, set the ulimit parameter to unlimited. For example,
    ulimit -d unlimited
    

ADSM displays the following information when the server is started:

The following events occur when the server is started:

Running the Server in Background Mode

You may choose to run the server in the background. When the server runs in the background, you control the server through your administrative client.
Attention:Before you run the server in the background, ensure the following conditions exist:

  1. An administrative node has been registered and granted system authority. See "Registering Administrators or Updating Information".

  2. The administrative client options file has been updated with the correct SERVERNAME and TCPPORT options.

  3. The administrative client can access the ADSM server.

If you do not follow these steps, you cannot control the server. When this occurs, you can only stop the server by canceling the process, using the process number displayed at startup. You may not be able to take down the server cleanly without this process number.

To start the server running in the background, enter the following:

nohup dsmserv -quiet &

You can check your directory for the output created in the nohup.out file to determine if the server has started.

Capturing Server Console Messages to an ADSM User Log

You can capture ADSM server console messages to a user log file with the ADSM dsmulog utility. You can invoke the utility with the ADSMSTART shell script which is provided as part of the ADSM AIX server package. You can have the server messages written to one or more user log files. When the dsmulog utility detects that the server it is capturing messages from is stopped or halted, it closes the current log file and ends its processing.

When you specify more than one file, ADSM manages the user logs as a circular list of files based on size or change of day. You can manage the amount of space the logs used in the file system by specifying a size parameter (in kilobytes) in the ADSMSTART shell script for the dsmulog utility. When the specified limit is reached, ADSM closes the current user log and opens the next user log. When the specified limit is reached on the next user log, ADSM writes to the next user log and can overwrite the previous contents of the file. If a size parameter is not specified, the utility writes to the next user log file when it detects a change of day.

If the user log file names are not fully qualified in the ADSMSTART shell script, the user logs are created in the directory where ADSMSTART is invoked. The user logs should not be placed in the /usr/lpp file system because space constraints in the file system can prevent the ADSM server from starting.

The following is an example of how to set up and invoke the dsmulog utility to rotate through the user logs on a daily basis:

  1. Change to the server bin directory:
    cd /usr/lpp/adsmserv/bin
    

  2. Copy ADSMSTART.SMP to ADSMSTART:
    cp adsmstart.smp ./adsmstart
    

  3. Edit ADSMSTART. Do NOT change the first line in the file. Specify the user log files to capture messages on a daily basis. For example:
    dsmulog /u/admin/log1 /u/admin/log2 /u/admin/log3
     
    

    The following steps automatically start the server with console logging when the system is rebooted:

  4. If the server is running, halt the server

  5. Run the dsm_rmv_itab autostart script

  6. Run the dsm_update_itab autotrace script

  7. Restart the server in one of the following ways:

In the above example, if you invoke the utility on Friday, on Friday the server messages are captured to log1, on Saturday the messages are captured to log2, on Sunday the messages are captured to log3. On Monday the messages are captured to log1 and the previous Friday messages are overwritten.

The following example shows how to invoke the dsmulog utility to rotate through the user logs based on size limit:

dsmulog /u/admin/log1 /u/admin/log2 /u/admin/log3 size=500

When the server is started, the utility captures the server messages to log1 until it reaches a file size of 500 kilobytes and then changes to log2.

Tip: If the ADSM server goes down unexpectedly, copy the current user logs to other file names before you restart the server. This will prevent the dsmulog utility from overwriting the current logs. You can then view the user logs to try and determine the cause of the unavailability of the server.

To log console messages during the current session, do the following:

  1. If the server is running, halt the server.

  2. Issue the dsmserv command as specified in the ADSMSTART shell script. For example:
    /usr/lpp/adsmserv/bin/dsmserv 2>&1 | dsmulog /u/admin/log1 /u/admin/log2
    

To stop console logging and have the server automatically start after a system reboot, complete the following steps:

  1. If the server is running, halt the server.

  2. Change to the server bin directory:
    cd /usr/lpp/adsmserv/bin
    

  3. Run the dsm_rmv_itab autotrace script.

  4. Run the dsm_update_itab autostart script.

  5. Restart the server by running the rc.adsmserv script. This script starts the server in the quiet mode.

Starting the Server in Other Modes

The following ADSM command options specify how you can start the server in other modes as part of the dsmserv command. For example:

dsmserv -option

Where -option can be any one of the following:

-quiet
Starts the server as a daemon program. The server runs as a background process, and does not read commands from the server console. Output messages are directed to the SERVER_CONSOLE.
Note:Before issuing this command, you must have an administrative client registered and authorized with system authority. The administrative client must be started. Otherwise, the server will run in the quiet mode and you will not be able to access the server.

-noexpire
Suppresses inventory expiration. For more information, see "Running Expiration Processing to Delete Expired Files".

-options filename
Specifies an explicit options file name when running more than one server.

Running Multiple Servers on a Single Machine

To have multiple servers running on a single machine, issue the DSMSERV FORMAT command from different directories to create multiple pairs of recovery log and database files. You do not have to install the server executable files in more than one directory.

However, if non-root users will be running servers, you must modify the access permission by adding read permission to the following files:

Use these commands as a root user to modify the permission for these files:

 chmod 755 /usr/lpp/adsmserv/bin/adsmlicense
 chmod 755 /usr/lpp/adsmserv/bin/dsmnetb1.drv
 chmod 755 /usr/lpp/adsmserv/bin/dsmnetb2.drv
 chmod 755 /usr/lpp/adsmserv/bin/dsmtli.drv

The following procedure shows how to set up an additional ADSM server:

  1. Determine the directory where you want the server files created, for example, /usr/lpp/myserver, and make that directory:
    mkdir /usr/lpp/myserver
    

  2. Copy the dsmserv.opt file to your directory:
    cp /usr/lpp/adsmserv/bin/dsmserv.opt dsmserv.opt /usr/lpp/myserver/dsmserv.opt
    
    Note:Ensure that the communication parameters are unique from all other ADSM server. The communication protocols are:

    • TCPPORT for TCP/IP

    • HTTPPORT for HTTP Access in the Web Administrative Client Browser

    • LUNAME for SNA LU6.2

    • NETBIOSNAME for NetBIOS

    • IPXSOCKET for IPX/SPX

    For example, if your first server is using the default TCPport of 1500, ensure that the new server is using a TCPport other than 1500 by providing a real value in the server options file.

  3. Set your path on the server console or from an aixterm session (this is done for you during the basic installation and configuration). Define your environment variables, for example:

    To define the DSMSERV_DIR, enter:

    export DSMSERV_DIR=/usr/lpp/adsmserv/bin
    

    Ensure that you are in the target directory before continuing.

  4. Format the database and recovery log files, for example:
    /usr/lpp/adsmserv/bin/dsmfmt -m -db dbvol2 5
    /usr/lpp/adsmserv/bin/dsmfmt -m -log logvol2 9
    

    In this example, db indicates the database log, --m indicates megabytes and log indicates the recovery log. Refer to ADSM Administrator's Reference for more information on these commands.

  5. Create the database and recovery log in the desired directory for the new server, for example:
    /usr/lpp/adsmserv/bin/dsmserv format 1 logvol2 1 dbvol2
    
    Note:You need additional license authorizations to run additional servers. You can use the register license file command to register these licenses.

Halting the Server

You can halt the server without warning if an unplanned operating system problem requires the server to be stopped.

When you halt the server, all processes are abruptly stopped and client sessions are canceled, even if they are not completed. Any in-progress transactions are rolled back when the server is restarted. When the server is halted, administrator activity is not possible.

If possible, halt the server only after current administrative and client node sessions have completed or canceled. To shut down the server without severely impacting administrative and client node activity with the server, you must:

  1. Disable the server to prevent new client node sessions from starting, as described in "Disabling or Enabling Access to the Server".

  2. Query for session information to identify any existing administrative and client node sessions, as described in "Requesting Information about Client Sessions".

  3. Notify any existing administrative and client node sessions that you plan to shut down the server. ADSM does not provide a network notification facility; you must use external means to notify users.

  4. Cancel any existing administrative or client node sessions, as described in "Canceling a Client Session".

  5. Find out if any other processes are running, such as server migration or inventory expiration, by using the QUERY PROCESS command. If a database backup process is running, allow it to complete before halting the server. If other types of processes are running, cancel them by using the CANCEL PROCESS command.

  6. Halt the server to shut down all server operations by using the HALT command.
Note:The QUIESCE option on the HALT command is recommended only if you plan to do a database dump by using the DSMSERV DUMPDB command immediately after halting. Because ADSM supports online database backup (BACKUP DB command), the DSMSERV DUMPDB command should be rarely, if ever, needed.

Stopping the Server When Running as a Background Process

If you started the server as a background process and want to stop the server, connect to the server as an administrative client and issue the HALT command. If you cannot connect to the server with an administrative client and you want to stop the server, you must cancel the process by using the kill command with the process ID number (pid) that is displayed at initialization.
Note:Before you issue the kill command, ensure that you know the correct process ID for the ADSM server.

Restarting the Server

To start the server after it has been halted, follow the instructions in "Starting the Server".

When you restart the server after it has been halted, ADSM rolls back any operations that had been in process to ensure that the database remains in a consistent state.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]