Introduction
In Documentum applications, the speed at which users can retrieve or add content to the system plays a big part in the overall end user experience. Network latency and bandwidth restrictions, physical architecture and client configuration all have an impact on the time it takes between initiating a content transfer, performing the upload or download, and returning control back to the user.
This document will discuss various tuning options available to achieve the best possible performance for UCF content transfer in your network environment.
Overview of UCF
UCF (Unified Client Facilities) is the EMC Documentum framework for performing content transfer between the client and content servers over HTTP. It provides many features that extend beyond simple file transfer protocol, such as:
Content compression to optimize transfers of larger files over the network
Support for complex documents, such as XML files
Support for compound document types, such as OLE objects inside a Microsoft Office document
Awareness of locally downloaded files, and the ability to avoid downloading the same content twice
Registry support, to allow checkout from one application and check in from another
Recoverability in the case of a brief network interruption
Location aware, to allow users to transfer content from the closest ACS or BOCS server
High-Level UCF Operations
When a content transfer is initiated, the UCF client running on the end user machine is initiated if it is not already running. The applet loads the UCF client jars and initiates contact with the UCF server, running on the application server.
The UCF client and server pass information back and forth about the environment and requested action before content is transferred between the two machines. Depending on the architecture and configuration, content may be transferred through the application server, directly to or from an ACS server on the content server, or a BOCS server located near the user.
After the content transfer is complete, there will be some additional communication from server to client to provide instructions on registry entries to be added or modified, directions on how to launch the appropriate application for view or edit operations, or instructions on how to delete the local file on check in.
Optimizing UCF for Best Performance
Tip #1 - Use ACS and BOCS for Content Transfer Whenever Possible
The introduction of ACS and BOCS servers in 5.3 SP1 have allowed content transfer to be performed directly from the content server, rather than requiring that the content always pass through the application server. This not only removes the double-hop that is required (which is very costly for small files) but also reduces the load on the application server.
In the 5.3 timeframe, ACS and BOCS could only be used for download operations such as checkout, export and view. All upload operations still passed through the application server.
From D6 onward, ACS and BOCS servers can also be used for upload operations.
Note that not all applications are network location aware and able to take advantage of remote ACS and BOCS servers.
Tip #2 - Optimize UCF Client Initialization
In 5.3 SP1 through SP5, D6 and D6SP1, the UCF client engine will time out after one minute of inactivity, and the javaw.exe process would be terminated. This means that if a user initiates another content transfer request after the timeout has occurred, the browser must re-initialize the UCF client and restart javaw.exe.
This value can be increased in the ucf.client.config.xml file as follows:
Edit the ucf.client.config.xml file (located at C:\Documents and Settings\
Commonly used DQLs for Documentum Admins. I update this blog whenever i get some good DQL to write , its for my personal reference as well as for other user if it helps anybody. Please use it at your own risk.
1- To see the audit trail for the particular user's login attempt to troubleshoot login related issues.
SELECT * FROM dm_audittrail
WHERE event_name='dm_connect'
AND user_name='user_name'
2- Group by clause by date to calcuate the number of documents create each day in the repository. Modify it accordingly as per your need.
select (DATEFLOOR(DAY, r_creation_date)) as r_MONTH , count(*)as cnt from amtrak_invoice where r_creation_date >= date('06/06/2011') GROUP BY (DATEFLOOR(DAY, r_creation_date))order by 1
Perl Script to automate starting and stopping applications for Documentum Suite on All Unix based platforms.
perl dmServices.pl
#!/usr/bin/perl
#########################WARNING-WARNING-WARNING#########################
# Use at your own RISK-please test it on your test environment before you
# jump onto the production .
#########################WARNING-WARNING-WARNING#########################
# Perl Modules required
# If you don't have these modules, this script will not run.
use strict;
use diagnostics;
use File::Basename;
use IPC::Open2;
use strict;
use diagnostics;
use Term::ANSIColor qw(:constants);
use vars qw (*INPUTP *PIPEOUT $CLIENTID $STOP $counter $path);
# Used to abort the script if set to 0;
$STOP = -1;
# Used for the data pipe
$CLIENTID = 0;
#$path = $ENV{'PWD'};
$path = "/tmp/docscript";
sub open_pipe
{
# Open the bi-directional data pipe which is very handy if
# we need to read the output from the command.
printf("Not working yet ... \n");
return;
my $cmd;
$cmd = $_[0];
$cmd='cd /opt;ls';
$CLIENTID = open2(\*PIPEOUT, \*INPUTP, $cmd);
if($CLIENTID == 0)
{ printf("CLIENTID = 0 ...\n");}
if((
{ printf("PIPE Connection Error - Must Abort\n"); exit(1);}
printf("PIPE OPEN\n");
}
sub close_pipe
{
# Close all connections
close INPUTP;
close PIPEOUT;
# Kill of the PIPEID process
if($CLIENTID != 0 && kill 0 => $CLIENTID)
{ kill 9 => $CLIENTID;}
waitpid($CLIENTID, 0);
printf("PIPE PID has been terminated\n");
}
sub pipecmd
{
# Commands run through the data pipe
# Takes the input string and pipes out to execute the command
my $str;
$str = $_[0];
# Signal handler in case the pipe is broken.
$SIG{PIPE} = sub {printf("PIPEN has been broken - must Abort\n");};
print INPUTP "$str\n";
}
sub create_path
{
if (! -d $path)
{
my $localcmd;
$localcmd = "mkdir -p $path";
system($localcmd);
}
if (! -d $path) {printf("$path could not be created.\n");exit(0);}
}
sub remove_path
{
if (-d $path)
{
my $localcmd;
my $dir;
$dir = basename $path;
$localcmd = "cd /tmp;rm -rf $dir";
system($localcmd);
}
}
sub promptUser
{
my ($promptString,$defaultValue);
($promptString,$defaultValue) = @_;
$promptString = "->" unless defined $promptString;
$defaultValue = "->" unless defined $defaultValue;
if ($defaultValue) {
print $promptString, "[", $defaultValue, "]: ";
} else {
print $promptString, ": ";
}
$| = 1; # force a flush after our print
# If no activity on the prompt for 2 mins then set the interrupt
# to alarm and we will exit.
eval
{
local $SIG{ALRM} = sub {printf("No activity for 2 mins - Doc Services aborts\n"); exit(0);};
alarm 120;
eval
{
$_ =
# Remove '\n'
chomp;
};
alarm 0;
};
alarm 0;
$_ = 'noentry' unless defined $_;
if($_ =~ /[a-z]/ || $_ =~ /[A-Z]/) {
# This is text;
return $_;
}
if($_ == 0) {return 0;}
if ("$defaultValue") {
return $_ ? $_ : $defaultValue; # return $_ if it has a value
} else {
return $_;
}
}
######################################################################
### Main
######################################################################
&input_handler();
exit(0);
######################################################################
### Subroutines
######################################################################
sub input_handler
{
my $done;
$done = 0;
my ($action, $indicator, $userid);
$userid = getpwuid($>);
while($done == 0)
{
system("clear");
&setupSigHdlrs();
$action =0;
printf("--------------------------------------------\n");
printf(" Welcome $userid to DOC SERVICES\n");
printf("--------------------------------------------\n");
if($userid ne "docinst")
{
printf("--> CURRENT USERID: $userid\n");
printf("---------------------------------------------------\n");
printf("WARNING: To perform maintenance activities on\n");
printf("DOCUMENTUM you MUST be logged in as userid: docinst\n");
printf("otherwise any processes you start or stop will not\n");
printf("operate properly.\n\n");
printf("**********YOUR SESSION IS BEING ABORTED.***********\n");
printf("---------------------------------------------------\n");
exit(0);
}
printf("Please choose one of the options:\n\n");
printf(" --> 1. START Documentum services.\n");
printf(" --> 2. STOP Documentum services.\n");
printf(" --> 3. QUERY Documentum processes.\n");
printf(" --> 4. START Application Server.\n");
printf(" --> 5. START Method Server.\n");
printf(" --> 6. STOP Application Server.\n");
printf(" --> 7. STOP Method Server.\n");
printf(" --> 8. QUERY JAVA Server Process.\n");
printf(" --> 9. START Oracle 10g Server.\n");
printf(" -->10. START Oracle DB Console.\n");
printf(" -->11. STOP DOCBROKER.\n");
printf(" -->12. START DOCBROKER.\n");
printf(" -->13. STOP FULLTEXT SERVER/AGENT.\n");
printf(" -->14. START FULLTEXT SERVER/AGENT.\n");
printf(" -->15. QUERY Index Node Controller.\n");
printf("--------------------------------------------\n");
printf(" --> QUIT: CTRL ^C\n");
printf("--------------------------------------------\n");
printf("--------------------------------------------\n");
$action = &promptUser("Enter numeric option: (1-14): \n");
&setenv_vars();
if($action == 1)
{
system("clear");
&startup_services();
}
elsif($action == 2)
{
system("clear");
&stop_services();
}
elsif($action == 3)
{
system("clear");
my $input = "query";
&terminate_processes($input);
}
elsif($action == 4)
{
system("clear");
my $input = 1;
&handle_apache_server($input);
}
elsif($action == 5)
{
system("clear");
my $input = 4;
&handle_apache_server($input);
}
elsif($action == 6)
{
system("clear");
my $input = 2;
&handle_apache_server($input);
}
elsif($action == 7)
{
system("clear");
my $input = 3;
&handle_apache_server($input);
}
elsif($action == 8)
{
system("clear");
my $input = "java";
&terminate_processes($input);
}
elsif($action == 9)
{
system("clear");
printf("Manually perform the following:\n");
printf(" --> su - oracle\n");
printf(" --> password: oracle1\n");
printf(" --> cd \$ORACLE_HOME\n");
printf(" --> bin/sqlplus /nolog\n");
printf(" --> connect SYS as SYSDBA\n");
printf(" --> oracle1\n");
printf(" --> startup\n");
printf(" --> quit\n");
}
elsif($action == 10)
{
system("clear");
printf("Manually perform the following:\n");
printf(" --> su - oracle\n");
printf(" --> password: oracle1\n");
printf(" --> cd \$ORACLE_HOME\n");
printf(" --> bin/emctl start dbconsole\n");
}
elsif($action == 11)
{
system("clear");
&stop_dmdocbroker();
}
elsif($action == 12)
{
system("clear");
&check_dmdocbroker();
}
elsif($action == 13)
{
system("clear");
&stop_fulltext();
}
elsif($action == 14)
{
system("clear");
&start_fulltext();
}
elsif($action == 15)
{
system("clear");
&get_nctrl();
}
$action = &promptUser("Would you like to exit
$action = lc($action);
if($action eq 'y')
{
printf("\n\n\n\n\nTHANK YOU FOR USING DOC SERVICES.\n");
$done = 1;
}
$action = 0;
}}
sub start_oracle
{
printf("Functionality not working yet ...\n");
# Will start the Oracle database or DBconsole
my $inputstr;
$inputstr = $_[0];
&open_pipe();
sleep(1);
&pipecmd("su - oracle;oracle1");
# Setup the environment variables
# $ENV{'ORACLE_HOME'} = '/opt/oracle/oracle/product/10.2.0/db_1';
if($inputstr eq "startup")
{
printf("Performing Oracle Startup ...\n");
# Send in the SQL commands to start up the database
&pipecmd("cd \$ORACLE_HOME;bin/sqlplus /nolog");
&pipecmd("");
while(
{
if(/SQL>/i)
{
# We are in
&pipecmd("connect SYS as SYSDBA");
# Need to sleep 2 secs or we will send in the password before the prompt
# is ready.
sleep(2);
&pipecmd("oracle1");
next;
}
if(/Connected./i)
{
&start_oracle_server();
last;
}
}
sleep(2);
}
if($inputstr eq "console")
{
printf("Performing DBCONSOLE Startup ...\n");
&start_oracle_dbconsole();
}
}
sub start_oracle_server
{
&pipecmd("startup");
while(
{
printf("STARTUP: $_");
}
&pipecmd("quit");
}
sub start_oracle_dbconsole
{
# Startup the oracle database console
&pipecmd("bin/emctl start dbconsole");
while(
{
printf("DBCONSOLE: $_");
}
}
sub terminate_processes
{
# User has the option of passing in parmeter 'query' or 'java' which will
# output processes instead of killing them.
&create_path();
my $pidout = "$path\/pidout.txt";
$counter = 0;
my $input;
$input = $_[0];
$input = 'null' unless defined $input;
my ($pidcnt, $asked, $localcmd, $printonce, $index);
$asked = 'q';
$printonce = 0;
$pidcnt = 0;
$index = 9;
$localcmd = "/bin/ps -fU docinst > $pidout";
system($localcmd);
open(PIDOUT, "< $pidout");
while(
{
if($input eq "java")
{
if($_ =~ /.\/java/i)
{
if ($printonce == 0)
{
printf("\n\n******* DOC Services QUERY JAVA Report *******\n");
$printonce = 1;
}
printf("JAVA: $_\n");
$pidcnt ++;
}
next;
}
if($_ =~ /.\/documentum/i ||
$_ =~ /.\/dmdocbroker/i)
{
$counter ++;
# Documentum processes are still alive.
my @psarray;
undef(@psarray);
@psarray = split(/ /, $_);
#$psarray[2] =~ s/\S+$//;
#$psarray[2] =~ s/^\S+//;
my $i;
for($i=0;$i<=5;$i++)
{
my $value;
$value = $psarray[$i];
if($value =~ s/\d+$//)
{ $index=$i;last;}
}
if ($index >= 5) {printf("Invalid PID ... skipping\n"); next;}
if ($input eq 'query')
{
if ($printonce == 0)
{
printf("\n\n******* DOC Services QUERY Report *******\n");
$printonce = 1;
}
printf("Owner: $psarray[1] PID: $psarray[$index]\n $_\n");
$pidcnt = $counter;
next;
}
if ($asked eq 'q' || $asked eq 'n')
{
$asked = &promptUser("One of more Documentum processes found\n Would you like to terminate ALL
$asked = lc($asked);
}
if ($asked eq 'y')
{
printf("Terminating process: $psarray[1] : $psarray[$index]\n");
$localcmd = "kill $psarray[$index]";
my $rc = system($localcmd);
if ($rc != 0)
{
printf("[FAILED] Could not terminate process: $psarray[$index]\n");
$STOP = 0;
}
else
{
$counter = $counter -1;
}
}
else
{
printf("[INFO] Process: $psarray[1] : $psarray[$index] lives\n");
$STOP = 0;
}
printf("[INFO] Documentum processes still alive: $counter.\n");
$pidcnt = $counter;
}
}
close(PIDOUT);
if($pidcnt == 0) {printf("\n\nNO PROCESSES FOUND\n");}
&remove_path();
}
sub setupSigHdlrs
{
# Re-define any signal handlers, as necessary.
# Catch Ctrl-C
$SIG{INT} = \&HandleCtrlC;
}
sub HandleCtrlC
{
# A cleanup routine called when the user types ctrl-C.
if($CLIENTID != 0)
{
#&close_pipe();
}
printf("\nControl ^C encountered - exiting.\n");
exit()
}
sub startup_services
{
# start the documentum services
my $localcmd;
printf("INITIATE STARTUP ...\n\n");
# Check for documentum processes
&terminate_processes();
printf(" CHECKING safety indicator ...\n");
# Check if safe to proceed.
&check_safety();
&setenv_vars();
# Added this here as it seems to work instead of letting the
# dm_start_dbdoc_sh19necm1_r01 script try to bring it up.
printf(" STARTING DM_DOCBROKER ...\n\n\n");
system("cd /opt/documentum/dba;./dm_launch_Docbroker");
sleep(2);
printf("\n\n STARTING DATABASE: dbdoc_sh19necm1_r01 ...\n\n\n");
# Repository
$localcmd = ('cd /opt/documentum/dba;./dm_start_dbdoc_sh19necm1_r01');
system($localcmd);
# Start Tomcat for web services.
&handle_apache_server(1);
# Start Method Server.
#&handle_apache_server(4);
&start_fulltext();
&check_dmdocbroker();
printf("\n\n\n\n");
printf("=======================================================\n");
printf("NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE\n");
printf("=======================================================\n");
printf("You must close your browser and restart using the static\n");
printf("IP address for the DOCUMENTUM services to connect to.\n");
printf("Failure to do so will RESULT in no connectivity.\n");
printf("=======================================================\n");
printf("\n\nSTARTUP INITIATE COMPLETED.\n");
}
sub start_fulltext
{
my $localcmd;
printf(" \n\n STARTING INDEX SERVER ...\n\n\n");
#Index Server
$localcmd = ('cd /opt/documentum/fulltext/IndexServer/bin;./startup.sh');
system($localcmd);
printf(" \n\n STARTING INDEX AGENT ...\n\n\n");
# Index Agent
$localcmd = ('cd /opt/documentum/shared/IndexAgents/IndexAgent1;./startupIndexAgent.sh');
system($localcmd);
&get_nctrl();
}
sub get_nctrl
{
my $localcmd;
printf("Obtaining Node Controller status Info ...");
sleep(3);
$localcmd = ('cd /opt/documentum/fulltext/IndexServer/bin; nctrl sysstatus');
system($localcmd);
}
sub handle_apache_server
{
# Handler to start or stop application server or
# Documentum Method Server.
# INPUT: 1 = START APPLICATION SERVER
# 2 = STOP APPLICATION SERVER
# 3 = STOP METHOD SERVER
# 4 = START METHOD SERVER
my ($localcmd,$input);
$input = $_[0];
if ($input == 1)
{
printf(" STARTING APACHE TOMCAT services ...\n");
# Tomcat for web services.
$ENV{'CATALINA_HOME'} = '/opt/apache/tomcat';
$ENV{'CATALINA_BASE'} = '/opt/apache/tomcat';
$localcmd = 'cd /opt/apache/tomcat/bin;./startup.sh';
system($localcmd);
}
if ($input == 2)
{
printf(" STOPPING APACHE TOMCAT services ...\n");
# Tomcat for web services.
$ENV{'CATALINA_HOME'} = '/opt/apache/tomcat';
$ENV{'CATALINA_BASE'} = '/opt/apache/tomcat';
$localcmd = 'cd /opt/apache/tomcat/bin;./shutdown.sh';
system($localcmd);
}
if ($input == 3)
{
printf(" STOPPING Documentum Method Server ...\n");
printf("\n\n THIS IS NOT RECOMMENDED !!!\n");
$ENV{'CATALINA_HOME'} = '/opt/documentum/shared/tomcat/5.0.28';
$ENV{'CATALINA_BASE'} = '/opt/documentum/shared/tomcat/5.0.28';
$localcmd = 'cd /opt/documentum/shared/tomcat/5.0.28/bin;./shutdown.sh';
system($localcmd);
}
if ($input == 4)
{
printf(" STARTING Documentum Method Server ...\n");
printf("\n\n THIS IS NOT RECOMMENDED !!!\n");
printf(" COMMAND CANCELLED.\n");
$ENV{'CATALINA_HOME'} = '/opt/documentum/shared/tomcat/5.0.28';
$ENV{'CATALINA_BASE'} = '/opt/documentum/shared/tomcat/5.0.28';
$localcmd = 'cd /opt/documentum/shared/tomcat/5.0.28/bin;./startup.sh';
system($localcmd);
}
}
sub check_dmdocbroker
{
my $found;
$found = -1;
&create_path();
system("/bin/ps -ef > $path\/dmdocb.txt");
open(DMOUT, "< $path\/dmdocb.txt");
while(
{
if($_ =~ /.\/dmdocbroker/i)
{
$found = 0;
last;
}
}
close(DMOUT);
&remove_path();
if($found != 0)
{
my $action;
printf("Docbroker failed to start therefore\n");
$action = &promptUser("would you like to start manually
$action = lc($action);
if ($action eq 'y')
{
&setenv_vars();
# Docbroker failed to start so kick it manually.
system("cd /opt/documentum/dba;./dm_launch_Docbroker");
printf("\n**DM_DOCBROKER STARTED MANUALLY FROM SCRIPT**\n");
}
else { printf("\n**Please investigate DOCBROKER LOG\n /opt/documentum/dba/log/docbroker...**\n");}
}
}
sub stop_dmdocbroker
{
my $localcmd;
printf(" Stopping DM DOCBROKER ...\n");
$localcmd = 'cd /opt/documentum/dba;./dm_stop_Docbroker';
system($localcmd);
}
sub stop_services
{
my $localcmd;
printf("SHUTDOWN INITIATING ...\n\n");
sleep(2);
&stop_fulltext();
sleep(2);
# Stop Apache and Documentum Method Server
# &handle_apache_server(3); <-- This causes errors so don't do
&handle_apache_server(2);
printf(" Stopping repository ...\n");
$localcmd = 'cd /opt/documentum/dba;./dm_shutdown_dbdoc_sh19necm1_r01';
system($localcmd);
&stop_dmdocbroker();
sleep(5);
# Check for any documentum processes
&terminate_processes();
}
sub stop_fulltext
{
my $localcmd;
printf(" Stopping Index Agent ...\n");
$localcmd = 'cd /opt/documentum/shared/IndexAgents/IndexAgent1;./shutdownIndexAgent.sh';
system($localcmd);
printf(" Stopping Index Server ...\n");
$localcmd = 'cd /opt/documentum/fulltext/IndexServer/bin;./shutdown.sh';
system($localcmd);
&get_nctrl();
}
sub check_safety
{
if ($STOP == 0 && $counter > 0)
{
# Not safe to continue.
printf("ERROR: It is unsafe to continue ... \n");
printf(" Check for previous errors!\n\n");
exit(0);
}
}
sub setenv_vars
{
# Setup the environment just in case we are not being called from
# a profile that has the proper ENV.
$ENV{'ORACLE_SID'} = 'DBDOC';
$ENV{'DOCUMENTUM_SHARED'} = '/opt/documentum/shared';
$ENV{'LD_LIBRARY_PATH'} = '/opt/documentum/fulltext/IndexServer/lib:/opt/documentum/fulltext/fast40:/opt/documentum/shared/dfc:/opt/documentum/shared/IndexAgents/ftintegrity';
$ENV{'LC_ALL'} = 'C';
$ENV{'FASTSEARCH'} = '/opt/documentum/fulltext/IndexServer';
$ENV{'JAVA_HOME'} = '/opt/documentum/shared/java/1.4.2_11';
$ENV{'ORACLE_BASE'} = '/opt/oracle/oracle/product/10.2.0/db_1';
$ENV{'ORACLE_HOME'} = '/opt/oracle/oracle/product/10.2.0/db_1';
$ENV{'DISPLAY'} = 'localhost:1';
$ENV{'DM_HOME'} = '/opt/documentum/product/5.3';
$ENV{'LOGNAME'} = 'docinst';
$ENV{'DOCUMENTUM'} = '/opt/documentum';
$ENV{'PATH'} = '/usr/bin::/usr/local/bin:/usr/openwin/bin';
$ENV{'TNS_ADMIN'} = '/opt/oracle/oracle/product/10.2.0/db_1/network/admin';
}
Problem(Abstract)
Receiving the error javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host:
Solutions
Cause
When attempting to use JMS or RMI remotely, you might run across an exception that looks like this:
javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: 127.0.0.1
This is the result of a problem in the JBoss server side configuration. You're successfully talking to the correct server, but it does not know it's own hostname or IP address.
Resolving the problem
-b option for run.bat/run.sh enables us to tell JBoss the host it is running on. That solves this problem.
Eg. run.bat -b192.168.9.6 -Djboss.bind.address=0.0.0.0
(the 2nd parameter makes jboss server accessible from remote clients)