Our vBulletin migration is complete.
Welcome vBulletin users! All content and user information from the Micro Focus Forums (vBulletin) site has been migrated to this site. READ MORE.
Highlighted
Established Member.. kenneth.gonzale
Established Member..
616 views

SiS Support Tip: script to automate SiS 11.x backups via configuration tool

Hi Community,

 

There’s some work I’ve been doing that I’d like to share. As for now there’s no way to automate SiS 11.x backups via configuration tool as we could do with 10.x versions. There is the following ER to have this in future releases:

 

https://support.openview.hp.com/selfsolve/document/FID/DOCUMENTUM_QCCR1I34108%20?docid=QCCR1I34108%20&isEnhancementRequest=true

 

Given this, I developed the first version of a TCL “Expect” script that “talks” to Configuration tool script via console mode and commands it to do an export as a human user would do. This version is fully functional and I’ve tested it in Win2k3 and Win2k8 servers. I’d like to think of this script as Open Source so feel free to modify it and improve it; there’s a lot of room for improvement such error handling (none at the moment). Please share your improvements with the community via this thread, as well for any bugs or issues.

 

Please read carefully the attached README.txt file to find out how to use the script.

 

****DISCLAIMER****

 

This tool wasn't tested with 11.22 patch, most likely it will not work; further testing is needed. If you are using 11.22 use old 10.x silent option for config_tool that was restored in this version. Refer to 

SiteScope Deployment guidehttp://support.openview.hp.com/selfsolve/document/KM00409587 on page 143.

 

****UPDATE****

 

Uploaded version 2 of the script, from readme.txt file:

 

======================================================================
Change log
======================================================================

Added supportability for 11.13, 11.20 and 11.21 versions. For 11.13 and higher versions a new breakline catch was introduced to avoid workflow interruption. Now we spawn cmd.exe directly with configuration tool call and wait/catch its exit code to avoid timeouts while creating tmpzipfile.zip for large configurations (process hangs and zip file never gets finished and renamed to desired zip file.)

 

****New script for x64 bits OS****

 

Due to limitations of ActiveTCL+Expect on Windows x64 OS systems I needed to modify the script and create a new version. Notice that ActiveTCL x32 bits must be installed plus configuration tool must be launched in x32 mode using new attached script config_tool_x32.bat that must be placed in <SiteScope root directory>\bin\.

 

======================================================================
Change log
======================================================================

This version for x64 bits OS was created from original x32 version and modified to handle ActiveTCL limitations on x64 Windows OS systems (see section ActiveTCL limitations on x64 Windows OS systems).

Added supportability for 11.13, 11.20 and 11.21 versions.

x32 bit version:
For 11.13 and higher versions a new breakline catch was introduced to avoid workflow interruption. Now we spawn cmd.exe directly with configuration tool call and wait/catch its exit code to avoid timeouts while creating tmpzipfile.zip for large configurations (process hangs and zip file never gets finished and renamed to desired zip file.)

for x64 OS:
Created side script configuration_tool_x32.bat to be able to launch config tool process as x32 bits.
Due to issues of ActiveTCL x32 bit child-process handling we now check completion of child process by idle-looping until output zip file is created (tested with large zip files up to 100MB+).

======================================================================
ActiveTCL limitations on x64 Windows OS systems
======================================================================

There is a x64 bits version of ActiveTCL, yet there is no x64 bits version of the Expect package which this script requires. For that reason, ActiveTCL x32 version should be installed (reference: http://community.activestate.com/faq/where-expect).

Per Windows x64 architecture a x32 process can't spawn/call a x64 one for which configuration_tool_x32.bat was created based on stock SiteScope script confguration_tool.bat with the difference of avoiding OS x64 detection; internal java folder in SiteScope  is used instead of java64.

There is an issue with "wait" command in ActiveTCL x32 running on x64 OS which locks the process forever as it doesn't catch child processes exit code correctly. For that reason completion of child process is checked by idle-looping until output zip file is created (reference: http://code.activestate.com/lists/activetcl/4765/).

 

****DISCLAIMER for x64 version****

 

The config_tool_x32.bat script is looking for SiteScope/java folder assuming it is x32 as in some x64 installations SiteScope comes with java and java64 folders, yet I just found out that recent 11.2x installations come with only java folder which is x64. Since the x64 java is used an issue happens, as tool needs x32 java process to launch configuration tool. What one has to do is to get Java 7 or 6 x32 installed (http://www.oldapps.com/java.php?app=0E58B97B62C2A20FD10C62F96A31B10E) and then point the config_tool_x32.bat script to its right location:

 

:: start the JVM.

%SITESCOPEHOME%java\bin\java.exe %FM_PATH% -classpath %CLASSPATH% %OPTS% %MAINCLASS%

 

You can either point this line to x32 JRE installed on server (Program Files (x86)/Java/jre#/bin) or copy jre# folder to SiteScope, rename it as java32 and then change the line with this new path accordingly:

 

:: start the JVM.

%SITESCOPEHOME%java32\bin\java.exe %FM_PATH% -classpath %CLASSPATH% %OPTS% %MAINCLASS%

 

Notice after copying the file you can uninstall Java from the server  do this in another machine and then copy folder over to SiteScope server.

 

 

Kenneth Gonzalez
HP Support

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.

If you haven’t tried it yet, come and join us in our entitled forums at Support Customer Forums
Labels (2)
14 Replies
New Member.. Sabya
New Member..

Re: SiS Support Tip: script to automate SiS 11.x backups via configuration tool

Hi Gonzalez,

 

I am using SiteScope 11.10 and I want to take the configuration backup automatically. I tried with your TCL based Expect script by following the steps as mentiond in read me file , but getting error ( see attachment) while running the script.

Both SiteScope 11.10 & Active TCL 8.5 installed in C drive.

Please provide any suggestion to resolve this issue.

 

Thanks & Regards,

 

Sabyasachi

0 Likes
Established Member.. kenneth.gonzale
Established Member..

Re: SiS Support Tip: script to automate SiS 11.x backups via configuration tool

Hi,

I’m not sure why you get this error as I’m not able to rerpduce this in my system. Howewer, I belive the error comes from this part of the script:

exp_send "$sishome/bin/config_tool.bat -i console\r"

Please verify if config tool bat file exist an it is readable by the user you’re logged in. Also, you may want to change in tcl file that line for:

exp_send "$sishome\bin\config_tool.bat -i console\r"

It shouldn’t make any difference but in Windows you never know. 

Kenneth Gonzalez
HP Support

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.

If you haven’t tried it yet, come and join us in our entitled forums at Support Customer Forums
0 Likes
Absent Member.. Disconnected Absent Member..
Absent Member..

Re: SiS Support Tip: script to automate SiS 11.x backups via configuration tool

Thank you Kenneth, I'll check it out!!

0 Likes
Established Member.. kenneth.gonzale
Established Member..

Re: SiS Support Tip: script to automate SiS 11.x backups via configuration tool

Hi Disconnected,

You may want to try v2 instead 🙂
Kenneth Gonzalez
HP Support

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.

If you haven’t tried it yet, come and join us in our entitled forums at Support Customer Forums
0 Likes
Absent Member.. Disconnected Absent Member..
Absent Member..

Re: SiS Support Tip: script to automate SiS 11.x backups via configuration tool

Good news. It worked successfully. Thanks a ton! 🙂
0 Likes
Absent Member.. Disconnected Absent Member..
Absent Member..

Re: SiS Support Tip: script to automate SiS 11.x backups via configuration tool

Kenneth!!

I got this working on my SiteScope 32on64 bit installation (Server 2008 R2 Standard 6.1.7601 SP1 Build 7601).

Thanks a ton for this tool - it helps me feel confident about having a backup just in case. 🙂
0 Likes
Established Member.. kenneth.gonzale
Established Member..

Re: SiS Support Tip: script to automate SiS 11.x backups via configuration tool

You're welcome Disconnected 🙂
Kenneth Gonzalez
HP Support

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.

If you haven’t tried it yet, come and join us in our entitled forums at Support Customer Forums
gtodorov Absent Member.
Absent Member.

Re: SiS Support Tip: script to automate SiS 11.x backups via configuration tool

Hello,

 

The old original syntax to do it,  must be available in the comming fix SiS 11.22.

 

Best Regards,

Georgi

 

0 Likes
Absent Member.. Disconnected Absent Member..
Absent Member..

Re: SiS Support Tip: script to automate SiS 11.x backups via configuration tool

Kenneth,

 

Thanks for all of your hard work. Unfortunately it looks like 11.22 broke this script.

 

Version - HP SiteScope 11.22 32-bit JVM, Build 186

 

This is failing @ the "set BACKUPFILE=SiteScopeDailyBackup.zip".

 

I see "Stmpzipfile.zip" in the C:\Tcl\bin directory but the script isn't seeing the file to rename it (before I copy it to the network share).

0 Likes
Established Member.. kenneth.gonzale
Established Member..

Re: SiS Support Tip: script to automate SiS 11.x backups via configuration tool

Hi Disconnected,

Yes, I'm aware 11.22 breaks the script yet I'll not be developing the tool any further because in 11.22 old silent option was restored to config_tool:

From SiteScope Deployment guide http://support.openview.hp.com/selfsolve/document/KM00409587 on page 143.
Running Silent Configuration
You run a silent configuration using the configtoolparams.txt file. Since this file has a very specific format, you should create the silent configuration file using the sample file located in the <SiteScope installation directory>\examples\silent_config folder. To run a silent configuration for SiteScope (for SiteScope 11.22 or later):
1. Navigate to the configtoolparams.txt file located in the <SiteScope installation directory>\examples\silent_config folder.
2. Make a copy of the file, and save it to a location of your choice.
3. Open the file, modify it to meet your configuration needs (follow the instructions in the sample file), and then save the file.
4. Run the configuration from the command line with the -i silent and the -f <answers file> flag.
For example:
config_tool -i silent -f c:\configtoolparams.txt (Windows)
or
./config_tool.sh -i silent -f /opt/configtoolparams.txt (Linux or Solaris)

Kenneth Gonzalez
HP Support

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.

If you haven’t tried it yet, come and join us in our entitled forums at Support Customer Forums
Absent Member.. Disconnected Absent Member..
Absent Member..

Re: SiS Support Tip: script to automate SiS 11.x backups via configuration tool

I am now getting errors exporting.

 

If I run this manually I get "Cannot export configuration".

 

When I run it silently:

 

C:\SiteScope\bin>config_tool.bat -i silent -f c:\Backup\BackupSiteScope.txt
SiteScope architecture is64 OS architecture is32
set JAVA location to C:\SiteScope\java\bin\java.exe
ERROR - error exporting configuration java.io.IOException: The process cannot ac
cess the file because another process has locked a portion of the file
ERROR - execute - installation exception com.mercury.sitescope.install.exception
s.InstallationException

 

I figured it out - I had includesLogs=yes. I set it to =no and it worked. 😄

0 Likes
Established Member.. kenneth.gonzale
Established Member..

Re: SiS Support Tip: script to automate SiS 11.x backups via configuration tool

That's because SiS is up and running, writing to logs...
Kenneth Gonzalez
HP Support

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.

If you haven’t tried it yet, come and join us in our entitled forums at Support Customer Forums
0 Likes
Absent Member.. andyinsdca Absent Member..
Absent Member..

Re: SiS Support Tip: script to automate SiS 11.x backups via configuration tool

From this, is there a way to restore a single group of monitors?

0 Likes
Established Member.. kenneth.gonzale
Established Member..

Re: SiS Support Tip: script to automate SiS 11.x backups via configuration tool

No, config tool overwrites all configuration. There are ERs for that.
Kenneth Gonzalez
HP Support

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.

If you haven’t tried it yet, come and join us in our entitled forums at Support Customer Forums
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.