• Please help support our sponsors by considering their products and services.
    Our sponsors enable us to serve you with this high-speed Internet connection and fast webservers you are currently using at ADSM.ORG.
    They support this free flow of information and knowledge exchange service at no cost to you.

    Please welcome our latest sponsor Tectrade . We can show our appreciation by learning more about Tectrade Solutions
  • Community Tip: Please Give Thanks to Those Sharing Their Knowledge.

    If you receive helpful answer on this forum, please show thanks to the poster by clicking "LIKE" link for the answer that you found helpful.

  • Community Tip: Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING)

    Click the link above to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This notice will disappear after you have made at least 3 posts.

Capturing information to an output file?

#1
Hi, I'm new to this forum, and this may have been discussed many times. I'm also new to TSM. Not sure which section to post this in? This pertains to IBM Spectrum Protect on Linux.

Is there a straightforward method to capture the output from a command run in dsmadmc (e.g. query volume), dsmc, etc?

For example, in the backup world that I come from, I can simply query the database, using the vendor's tool, directly from the Unix prompt, and redirect the output to the usual Unix filtering tools, e.g. sed, awk, grep, sort, etc., thus making it trivial to parse the output. However, I'm unclear on how to do this in the TSM world given that commands are run in these shell style interfaces like dmsc. Maybe it's patently obvious, but I have too much output to sort through manually, and I'd also like to be able to compare output from different runs and/or different volumes, backups, etc.

Thanks :)
 

Trident

TSM noob with 10 years expirience
ADSM.ORG Moderator
#2
Hi,
In short, you can.
There are a ton of options.

Admin:
dsmadmc -id=admin -pa=admin 'select * from nodes' | grep -i name

Client:
dsmc q backup "c:\" | find "temp"


All commands you can run from the client or admin can be scripted.
 

marclant

ADSM.ORG Moderator
#3
To redirect to a file, you do the same as from the OS, you use >. If you want to sort outputs, you can easily do that in dsmadmc if you set the output to comma separated.

From the OS:
dsmadmc -id=admin -pa=admin -comma 'select * from nodes' > output.csv

Or from dsmadmc:
query node > nodes.txt

The output files end up in the working directory of the computer you launched dsmadmc from. For example, I use dsmadmc on my laptop to connect to remote servers, so that's where my output files end up. Some people telnet to the Spectrum Protect Server first, then use dsmadmc there. That's too many steps for me, plus there's no tools on the server to manipulate the output files.
 
#4
Thanks much. When running from the OS, is there a way to obviate passing the password directly on the command line to avoid process visibility/shell history, etc? Does TSM provide any tool for that wherein the password can be passed encrypted?
 

marclant

ADSM.ORG Moderator
#5
Thanks much. When running from the OS, is there a way to obviate passing the password directly on the command line to avoid process visibility/shell history, etc?
No.

You can use the OC to create a report to run SQL commands and email the results to you, there's no need to pass a password with that.
 

Advertise at ADSM.ORG

If you are reading this, so are your potential customer. Advertise at ADSM.ORG right now.

UpCloud high performance VPS at $5/month

Get started with $25 in credits on Cloud Servers. You must use link below to receive the credit. Use the promo to get upto 5 month of FREE Linux VPS.

The Spectrum Protect TLA (Three-Letter Acronym): ISP or something else?

  • Every product needs a TLA, Let's call it ISP (IBM Spectrum Protect).

    Votes: 16 18.8%
  • Keep using TSM for Spectrum Protect.

    Votes: 52 61.2%
  • Let's be formal and just say Spectrum Protect

    Votes: 10 11.8%
  • Other (please comement)

    Votes: 7 8.2%

Forum statistics

Threads
31,448
Messages
133,968
Members
21,548
Latest member
cburns
Top