Showing posts with label SAPOSCOL. Show all posts
Showing posts with label SAPOSCOL. Show all posts

SAPOSCOL: Working Directory and Profile Parameters

Definition

Working Directory

The SAPOSCOL working directory is the directory to which the collector writes its data and in which it searches for the log file dev_coll and the shared memory backup file coll.put. It is not the directory, in which SAPOSCOL itself is stored.

Default SAPOSCOL Working Directory

Operating system

Path of the Working Directory

Microsoft Windows NT

\\host\saploc\prfclog or (if this does not exist) c:\temp


saploc must be released as a share.

UNIX

usr/sap/tmp or (if this does not exist) /tmp

Set a profile parameter if you want to use a different directory. In this case, start SAPOSCOL with a profile saposcol -l pf=), where the specified file contains only the following line:

DIR_PERF =


· If a CCMS agent is also working on the host on which the operating system collector is running, note that the profile parameter DIR_PERF also determines the working directory of the agent. The working directory of the agent should be a folder in the working directory of the operating system collector (see Working Directory and Log Files of the CCMS Agents).

· As you can also access the dev_coll file from the SAP system, you should also maintain the profile parameter DIR_PERF at the same time for all SAP instances of the affected host.


Start SAPOSCOL with the command:

saposcol -l pf=/usr/sap/C11/SYS/profile/saposcol.pfl

The file /usr/sap/C11/SYS/profile/saposcol.pfl contains the line:

DIR_PERF = /usr/sap/my_saposcol_dir

Result: The directory /usr/sap/my_saposcol_dir is the working directory of SAPOSCOL.

The Profile Parameter exe/saposcol

The SAP profile parameter exe/saposcol (which is not a SAPOSCOL profile parameter) contains the complete name of the program SAPOSCOL (which should not be confused with the SAPOSCOL working directory). To start or stop SAPOSCOL, or to display its status from the SAP system or with a CCMS agent, the parameter must point to a correctly installed SAPOSCOL.

If multiple SAP instances are running on a host, for example, each with a different SAP Basis release, ensure that each instance uses the same (newest) version of SAPOSCOL.


The system XYZ and the system C11 have different SAP Basis releases, and both systems are on the same host. The profile parameter exe/saposcol should point to the same, current SAPOSCOL in both systems. Ensure that you set the authorizations so that the SAPOSCOL directory can be accessed by both systems, so that SAPOSCOL can be started by both systems. However, only one SAPOSCOL runs for each host at any one time.

Deactivating Object Monitoring by SAPOSCOL

Use

You can remove selected disks or file systems from the monitoring by SAPOSCOL. SAPOSCOL then collects no data for these objects.


So that disks and file systems are monitored by SAPOSCOL under Windows NT/2000, ensure that the performance counter diskperf is activated with the command diskperf –Y.

Procedure

  1. Create a file with the name
  2. dev_filter that contains the names of the disks and file systems that are not to be monitored. The file content has the following structure:

$

...

The device ID can be either DISK for disks or FSYS for file systems. The entries are disks or file systems that are not to be displayed.


      • Exactly one entry is allowed for each line; whether the entries are case-sensitive depends on the general specifications of the operating system.
      • The asterisk (
      • *) wild card character is allowed; the character is permitted once for each name.
      • The list can contain up to 2000 entries for each type.


The following file dev_filter filters out disk names that end with Total; it also filters out the file system C: and systems that begin with D :

$DISK
*Total
$FSYS
C:
D*

  1. Save the file
  2. dev_filter in the working directory of SAPOSCOL (see SAPOSCOL: Working Directory and Profile Parameters).
  3. If SAPOSCOL is already running, you should
  4. stop SAPOSCOL.
  5. Delete the
  6. coll.put file in the working directory of SAPOSCOL.
  7. Start SAPOSCOL (see
  8. Starting SAPOSCOL).

This graphic is explained in the accompanying text

The platforms OS/390 and Sun OS do not support the filtering of disks/file systems.

SAPOSCOL Log Files

Definition

The following files for the function of SAPOSCOL are stored in the Working Directory of SAPOSCOL :

  • The file
  • coll.put, in which SAPOSCOL writes the contents of its shared memory segment; this is performed only when SAPOSCOL is stopped and at user command
  • The configuration file for monitoring selected processes,
  • dev_proc (see Monitoring Selected Processes with SAPOSCOL)
  • The file
  • dev_filter that contains the file systems and hard disks that are not to be monitored by SAPOSCOL (see Deactivating Object Monitoring by SAPOSCOL)
  • The log file
  • dev_coll that contains SAPOSCOL messages and the status of SAPOSCOL


During error analysis of SAPOSCOL, you should also check the file dev_coll.

  • The log files
  • dev_col1 and dev_col2, which are written with a cyclical trace when SAPOSCOL is started (command saposcol –ztl)


With the cyclical trace, the trace information alternately to the files dev_col1 and dev_col2 :

          1. The trace is first written in the file
          2. dev_col1
          3. When
          4. dev_col1 exceeds a set size, the trace is written to dev_col2. The size is 50,000 lines. This number is not configurable.
          5. When
          6. dev_col2 exceeds this size, dev_col1 is deleted and the trace is written to this file again.

This process is continuous. This ensures that the current trace is always accessible, without a trace file being able to grow to any size.

Example dev_coll

This graphic is explained in the accompanying text

Stopping SAPOSCOL

The command to stop SAPOSCOL varies depending on the operating system:

  • Under UNIX, you stop SAPOSCOL with the command
  • saposcol -k.
  • Under Windows NT, you stop SAPOSCOL by stopping the corresponding service (by choosing Start ® Settings ® Control Panel ® Services).
  • You can also stop SAPOSCOL in the operating system monitor.

Caution

Do not stop SAPOSCOL using other operating system commands, as the data in the shared memory could become corrupted. Also, in this case you cannot start a new SAPOSCOL, but receive an error message that a SAPOSCOL is already running.

Procedure

The command to stop SAPOSCOL first starts a new SAPOSCOL that stops the active SAPOSCOL after a second. The following occurs:

  1. The new SAPOSCOL connects to the shared memory.
  2. Using the shared memory, it determines the process ID (PID) of the SAPOSCOL that is collecting data.
  3. If the new SAPOSCOL finds a valid PID, it sets a flag in shared memory. When the old SAPOSCOL finds this flag, it resets the flag and deletes the PID from shared memory. If this is not complete within 20 seconds, the new SAPOSCOL stops the old SAPOSCOL.

  4. How long a shared memory segment exists depends on the operating system. On a UNIX operating system, it is stored until SAPOSCOL deletes it. On Windows NT, the shared memory is deleted by the operating system if no process is connected with it.

  5. The old SAPOSCOL writes the data in shared memory to the file
  6. coll.put in the SAPOSCOL working directory. The program then ends.

When the host is restarted, the file coll.put is imported so that the combined data is available in the shared memory. If, for example, SAPOSCOL is stopped at 12:03 and is restarted at 14:49, the data until 12:00 is still available for the SAP system. To avoid confusion, invalid data for the time from 12:00 until 14:00 is not displayed in the overview of the last hours in the operating system monitor.


Delete the file coll.put, if you stop SAPOSCOL in the context of error analysis, as the program imports the (possibly erroneous) measured values from the file to the shared memory segment if it is restarted.

Starting SAPOSCOL

You only need to start SAPOSCOL yourself the first time that it is started on a host (see Installation and Configuration of SAPOSCOL). Thereafter, SAPOSCOL is automatically stopped and started when the host is shut down and started; this applies irrespective of whether SAP components are running on the corresponding host. A manual stop and restart is only necessary in the following conditions:

  • You want to install a newer version of SAPOSCOL.
  • You want to stop SAPOSCOL that is collecting incorrect data or to correct an incorrect installation.

Procedure

The command to start SAPOSCOL varies depending on the operating system:

  • Under UNIX, you start SAPOSCOL with the command
  • saposcol (or saposcol -l).
  • Under Windows NT, you start SAPOSCOL by starting the corresponding service by choosing Start ® Settings ® Control Panel ® Services (see SAP Note 0436186).
  • You can also start SAPOSCOL in the operating system monitor.


Normally, SAPOSCOL is called without additional parameters or profiles. saposcol –l corresponds to this call, where -l stands for start (see Controlling SAPOSCOL from the Operating System).

The following occurs when the start command is executed:

  1. If the call finds a SAPOSCOL segment in the shared memory, it takes over its process ID (PID) and the stored data of a SAPOSCOL that may already be running.
  2. If no other SAPOSCOL is collecting data, the PID is 0, and SAPOSCOL uses the existing shared memory segment when starting. SAPOSCOL also starts if no shared memory is available.
  3. The new SAPOSCOL does not start if it detects that another SAPOSCOL is already collecting data.
  4. After it has been started, SAPOSCOL performs an initialization during which it reserves its required space in shared memory. The program calculates the size of this space from the number of available hard disks, CPUs, file systems, and so on. SAPOSCOL writes the contents of the file
  5. coll.put (if it exists) to its shared memory segment.
  6. The process continues running in the background, and the original program ends.

How to Download SAPOSCOL

Procedure

  1. You can find the current version of SAPOSCOL in the Software Catalog of the SAP Service Marketplace at
  2. http://service.sap.com/swcenter-main. Log on using your SAP Service Marketplace ID.
  3. First, find out which version of SAPOSCOL you require:
    • For all SAP Basis releases £ 4.6D, use the current 4.6D version of SAPOSCOL. To find this version, choose SAP R/3 ® ® SAP R/3 4.6C ® Binary Patches ® SAP Kernel 4.6D or SAP Kernel 4.6D 64 BIT ® ® Database independent in the navigation bar.
    • For all SAP Basis releases > 4.6D, use the version of SAPOSCOL from the corresponding Kernel patch directory. To find this version, choose SAP WEB AS ® SAP WEB AS 6.10 ® Binary Patches ® SAP KERNEL 6.10/SAP KERNEL 6.10 64-BIT ® ® Database Independent.
    • If you want to install or replace SAPOSCOL on a host with no SAP system, use at least the 4.6D version of SAPOSCOL. If the combination of the operating system that you are using is released with a SAP Basis release > 4.6D, use the appropriate version of SAPOSCOL from the SAP WEB AS directory (see above). For information about the current status of releases, see:

http://intranet.sap.com/platforms (internal view)
http://service.sap.com/platforms (SAP Service Marketplace)

You should also take account of the following SAP Notes:

SAP Note

Short Text

407314

Released operating systems SAP R/3 Kernel 6.x ORACLE

407317

Released operating systems SAP R/3 Kernel 6.x INFORMIX

407320

Released operating systems SAP R/3 Kernel 6.x SAP DB

407322

Released operating systems SAP R/3 Kernel 6.x DB2/UDB

407325

Released operating systems SAP R/3 Kernel 6.x DB2/390

407328

Released operating systems SAP R/3 Kernel 6.x MS SQL

410783

Released operating systems SAP R/3 Kernel 6.x iSeries

  1. Copy SAPOSCOL from the above directory to your TEMP directory. Depending on the filename extension, decompress the archive either with the CAR tool or with SAPCAR (extension SAR). You should also take account of the following SAP Notes:
    • Unpacking .car Archives (29372)
    • The new archiving tool SAPCAR (212876)

Installation and Configuration of SAPOSCOL

Purpose

The program SAPOSCOL is part of the standard delivery for all SAP systems is always installed with the system. It is possible, however, that you will have to install SAPOSCOL yourself. Possible reasons for this are:

  • You want to monitor operating system data for hosts on which no SAP instance is running or that are not part of an SAP system, but which are important for the environment of your SAP system. In this case, ensure that a
  • CCMS agent is running on the host.
  • You want to correct an incorrect installation.
  • You want to install a newer version of SAPOSCOL.


Always use the current version of SAPOSCOL. You can find the program as described under Downloading SAPOSCOL.

Process Flow

SAPOSCOL is dependent on the operating system - the installation therefore varies depending on the operating system of the host to be monitored. Follow the appropriate procedure:


  • Install SAPOSCOL on a Microsoft Windows NT Host

  • Install SAPOSCOL on a UNIX Host


For more information about the installation of SAPOSCOL, see SAP Note 19227.

  • By default, SAPOSCOL automatically has a valid working directory after the installation. For information about changing this directory, see
  • SAPOSCOL: Working Directory and Profile Parameters.
  • If you want to monitor particular processes with SAPOSCOL, see
  • Monitoring Selected Processes with SAPOSCOL.

SAPOSCOL and CCMS Agents

All CCMS agents can copy data from the SAPOSCOL shared memory segment to the CCMS monitoring segment and transfer it to a central monitoring system. This means that the data is visible in the CCMS monitoring architecture and is displayed both in the familiar transactions ST06 and OS07 and in the Alert Monitor (transaction RZ20) (see CCMS Agents). In this way, you can monitor the operating system data for hosts without a running SAP Basis system. An expensive installation and configuration of RFCOSCOL is no longer necessary.


The central monitoring system must have a release status of SAP Basis 4.6B. Take account of SAP Note 371023, due to Support Packages that may be required.

The SAPOSCOL service in Windows has been deleted some how? How can I restore it back?

The “ntscmgr.exe” program located in the Exe -> Run directory can be used to reinstall the SAPOSCOL as a service.

Execute the following command:

ntscmgr.exe install SAPOsCol -b saposcol.exe –p