Pages

Showing posts with label Tivoli. Show all posts
Showing posts with label Tivoli. Show all posts

Monday, November 29, 2010

Create LTO Barcode Labels

This post is more for my own memory than yours. A while back I needed to reuse some LTO cleaning cartridges. However the IBM Tape Library we use needed LTO bar codes on the tapes and they didn't have any.  I priced the labels and found the it way overpriced for simple barcodes. Rather than spending the money I followed the post here on how to create the needed LTO bar codes.

The reason I'm posting this is because it happened again with new cleaning cartridges that got ordered with out labels and I had to find out to print them again.  I did find a few products that would create the labels  and print them however they weren't free and I only needed about 10 labels.

Site what we followed: http://rogierg.blogspot.com - 80 bucks for LTO barcodes? WTF?
Create Barcodes Site: http://www.barcodesinc.com/generator/index.php

Settings for the LTO Barcode
LTO Barcode Creation




After you generate the barcode, right click the image and "Save image as" and save the jpeg. Print the label and carefully tape it to the LTO Cartridge. Be careful that there is no way the barcode can come free or hang in anyway.

Tuesday, November 9, 2010

Tivoli Storage Manager Client Install Script using Powershell

Below is the Tivoli Install Script that I wrote to install, update, or configure Tivoli Storage Manager Clients. It works great but inorder to use it you have to setup a network share with a few things. All the files listed are necessary files and are shown in the picture.

  • IBM TSM Client Install Folders - The name matters and is used in the scripts. 
  • TSM Client Install Script.ps1 - Its given below. Just save to txt file.
  • dsm.opt - set with your normal server settings, values can be set that the script will replace. Example given below.
  • tsmjbbd.ini - the jornal service file. Must use or alter the one used below.

TSM Client Install Script Share
Be sure you edit the TSM Client Install Script.ps1 Configuration Parameters section for your environment. Also check that you either use your dsm.opt file or edit the example to match your environment.

Tuesday, October 26, 2010

Useful Tivoli Storage Manager (TSM) Commands

One thing that really gets old for me is trying to remember the endless number of TSM commands that can best be described as tricking TSM to give me the information I’m looking for. In the past I’ve kept a useful list in Google Wave but sadly with that going away I’ve decided to keep them here for all of us to use.


(All Commands were tested on TSM 5.5 as of 10/26/2010)

Nodes not associated with a schedules
select node_name from nodes where node_name NOT IN (select node_name from associations)

Number of nodes associated per schedules
Select domain_name, schedule_name, count(node_name ) FROM associations GROUP BY domain_name, schedule_name

Number of Volumes per DRM State
Select state,count(*) as "Number of volumes" FROM drmedia GROUP BY state

Total client data stored (TB) - takes a bit to run
Select CAST(FLOAT(SUM(logical_mb)) / 1024 / 1024 AS DEC(8,2)) FROM occupancy

Client Schedules - The like can be used to filter
select * from associations where node_name like '%'

Number of Schedules per node
select node_name, count(node_name) as "c2" from associations group by node_name order by "c2"

Fragmentation Level of the DB
Select cast((100 - (cast( Max_Reduction_MB as float ) * 256 ) / (cast(Usable_Pages as float) - cast (Used_Pages as float) ) * 100) as decimal(4,2)) as Percent_Frag from DB


Also http://thobias.org/tsm/sql/index.html has some really great TSM SQL commands.

Friday, October 22, 2010

Passing Arguments in PowerShell to Start-Process

Recently while automating a Tivoli Storage install with a Powershell script I noticed trouble passing arguments to the normal Start-Process cmdlet. In this case I was calling msiexec.exe and then passing it arguments to it to the installer, it was an issue due to the fact that most of the arguments had quotes and spaces.

Later in on the same project I was working with a command line and wanted the command output . I noticed that Start-Process didn’t allow me to have the output lines in a string array. The result was that both problems could be solved by writing a function that wrapped Start-Process and allowed a solution to both problems.

function StartProcess ($FileToExecute,$Arguments,$ClientDir , $printCommandtoConsole) {
 $Tempfile = "$Env:TEMP\tempfile.txt"  
 New-Item $Tempfile  -ItemType file  -Force
 
 Start-Process $FileToExecute -ArgumentList $Arguments -Wait -WorkingDirectory $ClientDir -RedirectStandardOutput $Tempfile 
 
 if($printCommandtoConsole){
  Write-Host "$ClientDir\$FileToExecute" $Arguments
 }
 
 Get-Content $Tempfile
 Remove-Item $Tempfile -Force 
}

Here's an example of showing the creation of the arguments and then calling the StartProcess function.

function InstallTSMScheduler {
 $Arguments = @()
 $Arguments += "install"
 $Arguments += "scheduler"
 $Arguments += "/name:`"TSM Scheduler`""
 $Arguments += "/node:" + [Environment]::MachineName
 $Arguments += "/password:`"$NodePassword`""
 $Arguments += "/clientdir:`"$ClientDir`""
 $Arguments += "/optfile:`"$ClientDir\$OptFile`""
 $Arguments += "/autostart:no"
 $Arguments += "/startnow:no"
 
 StartProcess "$ClientDir\dsmcutil.exe" $Arguments $ClientDir $printCommands
}

$CommandLog = InstallTSMScheduler 
$CommandLog
}

I'll Post the rest of the Tivoli Client Install Script at a later date if some one wants it.

Seems i wasn't the only one with the problem (link here)