Scripting admin cmd outputs to a file SP 8.1.4

ILCattivo

ADSM.ORG Senior Member
Joined
Jul 9, 2013
Messages
192
Reaction score
14
Points
0
Location
Oxford, United Kingdom
I am trying to find a way to output some 'SHOW' commands to files on a regular basis to diagnose a problem?

I thought this would be easy using an admin scheduled script, but not so..

If, for example, I attempt to update a script line with the following..

update script <script_name> "SHOW DEADLOCK > /home/proinst1/show_deadlock.out w=y" line=10

.. in order to pipe the output to a file it expects to have a closed quote directly after the SHOW DEADLOCK cmd, thus by doing that it omits the rest of the cmd within the script line for the schedule to run daily..??

so it end up looking like..

Name Line Number Command
<script_name> 10 SHOW DEADLOCK


No good for the nest time it runs..??

Manually entering the whole cmd within dsmadmc doesn't require such quoting!

Have I missed something here ? Or is there another way of achieving this maybe?

Thanks
 
Try UPDATE SCRIPT script_name "show deadlock>/home/proinst1/show_deadlock.out w=y" line=10
Notice that there's no space between the 'k' the '>' and '/'
 
Good effort RO.. :cool:

Unfortunately SP now sees the '>' and all further characters within the quotes as part of the command when the script is run.

ANR2000E unknown command - SHOW DEADLOCKS>.... :(
 
Protect: SERVER1>help update script
3.67.28 UPDATE SCRIPT (Update a Tivoli Storage Manager script)

Use this command to change a command line or to add a new command line
to an IBM Tivoli Storage Manager script.

Restriction: You cannot redirect the output of a command within a Tivoli
Storage Manager script. Instead, run the script and then specify
command redirection. For example, to direct the output of script1
to the c:\temp\test.out directory, run the script and specify
command redirection as in the following example:
run script1 > c:\temp\test.out
 
Protect: SERVER1>help update script
3.67.28 UPDATE SCRIPT (Update a Tivoli Storage Manager script)

Use this command to change a command line or to add a new command line
to an IBM Tivoli Storage Manager script.

Restriction: You cannot redirect the output of a command within a Tivoli
Storage Manager script. Instead, run the script and then specify
command redirection. For example, to direct the output of script1
to the c:\temp\test.out directory, run the script and specify
command redirection as in the following example:
run script1 > c:\temp\test.out


Brilliant, just an internal workflow change is all that's needed..

Much appreciated marclant. :)
 
Ha, well I got the server to update the script. However didn't get a chance to run it before I posted. Yeah it no like that. As marclant says above, RTM :)
:eek:
 
Ha, well I got the server to update the script. However didn't get a chance to run it before I posted. Yeah it no like that. As marclant says above, RTM :)
:eek:

Yep, well given that the various types of schedules within SP also have a restriction of not being able to do redirections either, then PowerShell or a cron job is the route to go.. :cool:
 
Back
Top