Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ppadmtool controling

Status
Not open for further replies.

Draoued

MIS
Aug 1, 2002
378
FI
Does anyone have a way to control if the ppadmtool is done without error ??

Is it possible to catch the ppadmtool output.
For example :
ppadmtool server:port USER me PASSWORD kill mycube

If mycube doesn't exist I get "Failed Object not found"
if user-id or password is not correct then it s "Failed, connect to PowerPlay Server Failed"

I would like to catch the Failed or a Return value to know if cube administration is done correctly.
 
If you're using logging, that info should be found in your log. It depends on whether you're using Unix or Windows as far as what the appropriate commands are.
Most cube builds have a built in logging process though. Look at your MDL settings to identify where the log is being placed.

Pain is stress leaving the body.

DoubleD [bigcheeks]
 
Thanks DoubleD, we are using Unix.

I don't understand what you mean by the Log.
When running the RSSERVER , we have a return value 1 or 0 depending if the cube was properly built , and we have the log file.

When the cube is created , we move it to another folder after renaming it ,here again we can catch if everything is properly done.

Then we administer the cube with ppadmtool ( Kill , Set source , Enable ) but for this specific process we can not catch any return value , or see any log files.
 
I found a solution to monitor the ppadmtool command:
Code:
ppadmtool connect  ${SERVER1} USER myuser PASSWORD mypassword KILL Sample_Cube >ppadmin.log
if [ `grep -c 'failed' ppadmin.log` -ne 0 ]; then
  /usr/bin/uuencode ppadmin.log ppadmin.log  | /usr/bin/mailx -s "${MODEL} cube has not been killed in ${SERVER1}." ${EMAILDEST}
fi

I send the output to a log file >ppadmin.log and with the grep command I can check if the word "failed" is in the output. If found then sending an email.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top