Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Clearing Cache from an Execution Stepq

SOLVED
Go to solution
Highlighted
Raka_1
Collector

Clearing Cache from an Execution Stepq

How can I clear the cache from an execution step.
18 REPLIES
shygirl
Regular Collector

Re: Clearing Cache from an Execution Stepq

You can create a batch file that is executing the kruncachemanager.sh and then call that script in your execution step.
Jim Esler
Honored Contributor
Solution

Re: Clearing Cache from an Execution Stepq

You can execute the following command in a command step. If you want to clear all caches, specify A for [CACHE_ID].

ksc_local_exec sh "cd bin;./kRunCacheManager.sh [CACHE_ID]"
Raka_1
Collector

Re: Clearing Cache from an Execution Stepq

Jim-

I tried doing that but it gives following error.
An error occurred during command parsing.
(KNTA-10127)

Exception Correlation: GUID=FC02812A-FB1A-B525-0660-2A4C968CCAF6
Generated Time=2011/01/29-14:05:25.633 EST
Server Node Name: HPPPM Unknown or out of sequence command:
[ksc_exit]

Failed
M Santosh Kumar
Super Collector

Re: Clearing Cache from an Execution Stepq

Hi Raka,
mar
Can you try below code with execution type as wokflow step command and validation as "WF - Standard Execution Results"

ksc_connect_source_server
cd /opt/ITG/bin
sh kRunCacheManager.sh A
ksc_exit

Thanks,
Kumar
kerimkilic
Super Collector

Re: Clearing Cache from an Execution Stepq

same as bat file

cd c:/ppm/bin
sh kRunCacheManager.sh A
Jim Esler
Honored Contributor

Re: Clearing Cache from an Execution Stepq

ksc_local_exec is not run within a ksc_connect_server/ksc_exit command sequence. It runs a command on the PPM server without creating an ssh connection. This is much quicker and more efficient.
Raka_1
Collector

Re: Clearing Cache from an Execution Stepq

Jim-

I tried doing the same ksc_local_exec but I keep getting the same error.
Jim Esler
Honored Contributor

Re: Clearing Cache from an Execution Stepq

Post the entire command sequence you are executing at this workflow step and I will look it over.
Raka_1
Collector

Re: Clearing Cache from an Execution Stepq

Jim-

Here is the commands
ksc_local_exec cd bin; ./kRunCacheManager.sh A
ksc_exit
Jim Esler
Honored Contributor

Re: Clearing Cache from an Execution Stepq

You can only put one command on the ksc_local_exec special command. In this case, that one command is the sh command to invode the Bourne shell. The parameters for the sh command are specified in double quotes. The parameter string specifies two commands separated by a semicolon. Since the current working directory is $PPM_HOME (or $ITG_HOME), the first command moves to the bin directory. The second command executes the cache manager script.

ksc_local_exec sh "cd bin;./kRunCacheManager.sh A"

This special command does not create a connection to the server so the ksc_exit command is not needed and, in fact, will generate an error if it is present.
Raka_1
Collector

Re: Clearing Cache from an Execution Stepq

Jim-

Here is the error that I am getting after cut and paste the same command.

I do not want to set up environment for clearing the cache as I do not have the access to do it.
Raka_1
Collector

Re: Clearing Cache from an Execution Stepq

Sorry Jim

This is the error I am getting

sh "cd bin; kRunCacheManager.sh A"
sh: SHELLOPTS: readonly variable
sh: cd bin; kRunCacheManager.sh A: No such file or directory
exit code = 127
Errors occurred during command execution.
Jason Nichols K
Honored Contributor

Re: Clearing Cache from an Execution Stepq

Try using this line for you command line:

sh "cd bin; ./kRunCacheManager.sh A"


If "./" is not in the PATH, it will not find it as an executable.
Raka_1
Collector

Re: Clearing Cache from an Execution Stepq

I tried that also but it doesn't work for some reason.
Jim Esler
Honored Contributor

Re: Clearing Cache from an Execution Stepq

Try this:

ksc_local_exec sh "cd bin;$PPM_HOME/bin/kRunCacheManager.sh A"
Raka_1
Collector

Re: Clearing Cache from an Execution Stepq

Jim-

I am getting the following error now.

sh "cd bin;$PPM_HOME/bin/kRunCacheManager.sh A"
sh: SHELLOPTS: readonly variable
sh: cd bin;$PPM_HOME/bin/kRunCacheManager.sh A: No such file or directory
exit code = 127
Errors occurred during command execution.
Jason Nichols K
Honored Contributor

Re: Clearing Cache from an Execution Stepq

All I can tell you at this point is that I've always used ksc_connect_server to flush the cache and it's never failed for me.

ksc_connect_dest_server DEST_ENV="KINTANA_SERVER"
cd bin
./kRunCacheManager.sh A
ksc_exit
Raka_1
Collector

Re: Clearing Cache from an Execution Stepq

Thanks Jason-

I am left with only that option, I will setup the environment and then try it.

Thanks to Jim also.
//Add this to "OnDomLoad" event