HASCAR is a free unzip utility for SAP's SAPCAR format. You can use it todecompress sap car files on the command line. The command line utility alsosupports unwrapping of transport files that are contained inside patch files.(Option -p, --depat) You can also use it as a library in your own haskell programs. Sofar, only the latest version of sapcar files is supported, which is 2.01.
Jun 20, 2008 Hi, This is because that CAR file is uncarring otherside, and may be it is opened by othermeans, so close that car file and again try to UNCAR it.
It is implemented 100% in haskell, including the lzh decompressionroutine.
This is not yet in a stable state. It should successfully unpack lzhcompressed files and uncompressed files.
The SAPCAR container format decoder is based on research done byMartin Gallo with furtherinvestigation by Hans-Christian Esperer [email protected], who alsodid the LZH decompressor reimplementation.
What is supported:
- Reading SAPCAR archives version 2.01 only
- Unpacking files that are LZH compressed
- Unpacking files that are not compressed
- Unpacking transport files are wrapped inside a PAT file
TODO:
- Implement LZC
- Implement packing functionality
- Maybe implement signature checking
- Make the LZH algorithm more efficient (the author just aboutstarted to learn haskell when he embarked on implementingthat algorithm :-)=> Some work on this has been done; more is required.
- Implement CRC checking
nixos
Users of nixos can simply install hascar by issuing'nix-env -iaP haskellPackages.hascar'. Or if you only need it temporarily, opena nix-shell like this: 'nix-shell -p haskellPackages.hascar'
FreeBSD/GNU_Linux/OS X/Windows
To compile and install, first get stack, then issue:
stack build && stack install
hascar will be installed to ~/.local/bin . You should set your PATH variable to pointto this directory.
Since both use a proprietary crypto API, this is currently not supported.
Run hascar with the -h flag to get help. The basic usage should be thesame as with SAP(R)'s sapcar tool. It should be noted that the usedcommand line parser is a bit stricter than what you might be used to.
SAR files can contain transport files that are wrapped inside PAT (patch)files. Since hascar 0.2.2.0 the option -p is offered, that will try toautomatically detect PAT files. If such a file is detected and the -p flag isset, the transport file contained in the PAT file is extracted.
Installation Example: SAPCCM4X on a Windows NT System Description
You want to install the SAPCCM4X agent in the following environment:
SAP Instance | SAP System Name: TVB | Host Name: tvbhost |
System ID: D26 | Release: 4.6C |
Central Monitoring System | Host Name: hs0011 | System ID: 31 |
System Name: CEN | Release: 6.10 |
User (Registration) | Entered in the System: CEN | User ID: ADMIN |
Password: PASSWD |
User (Receipt of Alert Info) | Entered in the System: CEN | User ID: READUSER |
Password: PASS |
Log File Monitoring | Log File: ERRORLOG | Log File in: E:mssql70Blog |
Monitors: MS SQL Database | Search Pattern: ERROR | |
If found: Create node in monitoring tree |
Monitoring of Operating System Data | LAN subtree of the Operating System of TVBHOST should not be monitored |
As the system to be monitored is an SAP instance with an SAP Basis Release greater than 4.0, use the SAPCCM4x agent.
Procedure
Follow SAP Note 322075. As you are using an SAP R/3 Release 4.6C System, you can install the agent after the kernel upgrade.
- Copy the agent using binary File Transfer Protocol (FTP) from SAPSERV<X> from the directory
/general/misc/ccms-ma/ccms-agents/sapccm4x/ntintel/sapccm4x.sar
to the instance directory
D:usrsapTVBsysexerun
By doing this, you overwrite an older version (if one exists) with a newer one. Uncompress the agent from the command line with the SAPCAR program, using the following command:
sapcar –xvf sapccm4x.sar
If SAPCAR does not exist, copy the program from the directory /general/R3server/patches/rel46C/NT/I386 (see SAP Note 212876).
- Create the working directory of the agent:
d:usrsapTVBD26logsapccm4x
- The name of the configuration file is CSMCONF. Create CSMCONF in the working directory of the agent.
Contents of the CSMCONF file:
CEN_CONFIG
CEN_SYSID=CEN
.
CEN_ADMIN_USER
CEN_ADMIN_CLIENT=000
CEN_ADMIN_USERID=ADMIN
CEN_ADMIN_LANG=en
CEN_ADMIN_LOADBALANCING=n
CEN_ADMIN_ASHOST=hs0011
CEN_ADMIN_SYSNR=31
CEN_ADMIN_TRACE=0
CEN_ADMIN_MSHOST=hs0011
CEN_ADMIN_R3NAME=CEN
CEN_ADMIN_PASSWORD=PASSWD
.
CEN_GATEWAY
CEN_GATEWAY_HOST=hs0011
CEN_GATEWAY_SYSNR=31
CEN_GATEWAY_TRACE=0
.
CEN_CSMREG_USER
CEN_CSMREG_CLIENT=000
CEN_CSMREG_USERID=READUSER
CEN_CSMREG_LANG=en
CEN_CSMREG_LOADBALANCING=y
CEN_CSMREG_TRACE=0
CEN_CSMREG_MSHOST=hs0011
CEN_CSMREG_R3NAME=CEN
CEN_CSMREG_GROUP=PUBLIC
CEN_CSMREG_PASSWORD=PASS
.
CEN_SYSID=CEN
.
CEN_ADMIN_USER
CEN_ADMIN_CLIENT=000
CEN_ADMIN_USERID=ADMIN
CEN_ADMIN_LANG=en
CEN_ADMIN_LOADBALANCING=n
CEN_ADMIN_ASHOST=hs0011
CEN_ADMIN_SYSNR=31
CEN_ADMIN_TRACE=0
CEN_ADMIN_MSHOST=hs0011
CEN_ADMIN_R3NAME=CEN
CEN_ADMIN_PASSWORD=PASSWD
.
CEN_GATEWAY
CEN_GATEWAY_HOST=hs0011
CEN_GATEWAY_SYSNR=31
CEN_GATEWAY_TRACE=0
.
CEN_CSMREG_USER
CEN_CSMREG_CLIENT=000
CEN_CSMREG_USERID=READUSER
CEN_CSMREG_LANG=en
CEN_CSMREG_LOADBALANCING=y
CEN_CSMREG_TRACE=0
CEN_CSMREG_MSHOST=hs0011
CEN_CSMREG_R3NAME=CEN
CEN_CSMREG_GROUP=PUBLIC
CEN_CSMREG_PASSWORD=PASS
.
- Create the SAPCCM4X.INI file in the working directory of the agent.
### Configuration file for CCMS agents SAPCCMSR and SAPCCM4X
###
### Format of entries for plugins:
# PlugIn <full path of shared library to load>
###
### Format of entries for logfile monitoring:
LogFile d:usrsapTVBD26logsapccm4xlogfile.ini
###
### Format of entries for the option to delete trees
### if no corresponding logfile exists:
### This Parameter is optional, if not specified tree remains
LogFileParam DelTree
###
### Format of entries for mechanism to filter out SAPOSCOL values:
OsColFile d:usrsapTVBD26logsapccm4xoscol.ini
###
### Format of entries for plugins:
# PlugIn <full path of shared library to load>
###
### Format of entries for logfile monitoring:
LogFile d:usrsapTVBD26logsapccm4xlogfile.ini
###
### Format of entries for the option to delete trees
### if no corresponding logfile exists:
### This Parameter is optional, if not specified tree remains
LogFileParam DelTree
###
### Format of entries for mechanism to filter out SAPOSCOL values:
OsColFile d:usrsapTVBD26logsapccm4xoscol.ini
- So that the agent monitors log files, you must create the file LOGFILE.INI in the working directory of the agent (you specified the name of the file in SAPCCM4X.INI):
- To hide the LAN branch, you must create the file OSCOL.INI in the working directory of the agent (you specified the name of the file in SAPCCM4X.INI):
LOGFILE_TEMPLATE
DIRECTORY='e:mssql70blog'
FILENAME='errorlog'
MTE_CLASS='MS-SQL'
PREFIX='MS'
SHOWNEWLINES=1
ANALYZEMETHOD='
PATTERN_0='ERROR'
VALUE_0=RED
SEVERITY_0=50
MESSAGECLASS_0='SAPT100'
MESSAGEID_0='rt 01'
CMPFROMBEGIN_0=0
.
DIRECTORY='e:mssql70blog'
FILENAME='errorlog'
MTE_CLASS='MS-SQL'
PREFIX='MS'
SHOWNEWLINES=1
ANALYZEMETHOD='
PATTERN_0='ERROR'
VALUE_0=RED
SEVERITY_0=50
MESSAGECLASS_0='SAPT100'
MESSAGEID_0='rt 01'
CMPFROMBEGIN_0=0
.
FilterOutComponent CPU
- Now perform the registration of the agent. During this, an RFC connection to the agent is automatically created in the CEN system. The syntax is:
sapccm4x –R –f d:usrsapTVBD26logsapccm4xcsmconf pf=d:usrsapTVBprofileTVB_D26_tvbhost
There is also now a copy of CSMCONF in the working directory of the agent, although no password is contained in the copy.
The SAPCCM4X agent is now automatically entered as a service under Windows NT and activated. The system creates all required nodes in the shared memory on TVBHOST, and the data collected by the agent is available through transaction RZ20 in the CEN system.
See Also:
Installation of the CCMS Agents