This is a life saver in setting up your new TSM 6 instances. Always watch your permissions and who you are logged in as:
http://www-01.ibm.com/support/docview.wss?uid=swg21639501
Start at step 3 for the GSKit library configuration
Wednesday, October 23, 2013
Wednesday, October 31, 2012
Delete / Remove a Directory Linux Command
Use the rmdir command. This command remove the DIRECTORY(ies), if they are empty. Open a command-line terminal (select Applications > Accessories > Terminal), and then type the following command to remove a directory called /tmp/docs:
rmdir /tmp/docs
If a directory is not empty you will get an error:$ rmdir letters
Output:
rmdir: letters: Directory not emptyYou can cd to the directory to find out files:
$ cd letters
$ ls
Linux Remove Entire Directory Command
To remove all directories and subdirectories use rm command. For example remove letters and all subdirectories and files inside this directory, type the following command (warning all files including subdirectories will be deleted permanently):$ rm -rf letters/
Resource: nixCraft
Tuesday, October 16, 2012
IBM SVC - Fetch Performance Stats
While the IBM supported method of gathering statistics is TPC, there are occasions where you may want to gather some stats either when you don't have TPC, or if you need to get stats files to IBM, for support issues, for example.To get the stats, first of all you need to make sure that statistics collection is turned on. To check this, use the lssystem command (or lscluster for code prior to 6.3):
svcinfo lssystemAbout 15 lines down you should see the following:
statistics_status on statistics_frequency 15If statistics_status is off, then you need to switch it on. The second line is the frequency at which statistics will be collected. This is specified in minutes and can be between 1 and 60. To turn this on, or change the frequency, use the startstats command:
svctask startstats -interval intervalBear in mind if you use and interval of 1 minute, you will get a lot of stats, but doing so will make it easier to catch small spikes in performance.
Once statistics collection is running, you need to copy the resulting files from the cluster. Note that each node on the cluster will collect stats for that node only, so if you simply copy stats from the cluster, you will only copy them from the configuration node. Note also that each node will contain a maximum of 16 sets of stats files. Further stats collections will overwrite old files.
So bearing this in mind, you need to first copy the files from the non-configuration nodes to the configuration node before copying them from the cluster, and you also need to do this frequently to make sure you collect all the stats. If the statistics_frequency is X minutes, then this period will be 16 * X at the most. There is no harm in collecting statistics more frequently, as scp will simply overwrite duplicate files. I generally collect them at the same period as statistics_frequency in order to ensure I have a copy of the latest stats.
The collection needs to be performed on a host, such as the SSPC. You can use a Unix host with a cron job, or even a while loop using the sleep command to set the interval, or use a scheduled task on a Windows host. The script itself is two lines, and can be run as a cmd or shell script.
ssh admin@Choose suitable values for the destination for the files on the local host."svcinfo lsnode -nohdr -filtervalue config_node=no|while read -a node; do svctask cpdumps -prefix /dumps/iostats ${node[0]}; done" scp admin@ :/dumps/iostats/*
Note that if you're running this from a local Unix shell, you must escape the $, i.e. use \${node[0]}. If you don't the shell will try to substitute a local variable, which doesn't exist.
Note also that the filter value "config_node" is only implemented in later code. You'll need to remove this for earlier code levels. You'll get an error when the cpdumps command is run but the files will all copy OK nevertheless.
Once you have set this up as a cron job or scheduled task, you should find
Here's an example of a short cmd script which will use the $clust environment variable on the cluster to fetch the name of the cluster. The files will be fetched and added to an appropriately named zip file. I use Cygwin rather than Putty for this, but you could easily modify to use plink and pscp
set SVC=%1 set ZIP="C:\Program Files\7-zip\7z.exe" for /f %%i in ('ssh admin@%SVC% echo $clust') do set NAME=%%i ssh admin@%SVC% "svcinfo lsnode -nohdr |while read -a node; do svctask cpdumps -prefix /dumps/iostats $node; done" scp admin@%SVC%:/dumps/iostats/* . %ZIP% u -tzip -mx9 stats_%NAME%.zip *_stats_* if [%errorlevel%]==[0] del *_stats_*
IBM developerWorks
Tuesday, July 17, 2012
VTL Tape Mounting Issues - Invalid Element
We were experiencing issues mounting tapes on two VTL libraries. Upon further inspection we found this error:
ANR1401W
Mount request denied for volume XB0889 - mount
failed. (SESSION: 11744, PROCESS: 431)
ANR8300E I/O error on library NTP10B_VTL (OP=C0106C03,
CC=207, KEY=05, ASC=21, ASCQ=01, SENSE=
70.00.05.00.00.00.00.0A.00.00.00.00.21.01.00.00.00.00.00-
.00., Description=Device is not in a state capable of
performing request). Refer to the &STGM; documentation on
I/O error code descriptions. (SESSION: 11744, PROCESS:
431)
I google'd the "device is not in a state capable" line and found some references saying the element path needed to be specifically set. After reviewing a few more hits I found this site:
http://publib.boulder.ibm.com/tividd/td/TSMM/SC32-9090-01/en_US/HTML/anrcms5528.htm
If you look at the error above, you will see the ANR8300E and then the ASC and ASCQ values. Match these numbers on the website above to find the specific issue you are facing.
failed. (SESSION: 11744, PROCESS: 431)
ANR8300E I/O error on library NTP10B_VTL (OP=C0106C03,
CC=207, KEY=05, ASC=21, ASCQ=01, SENSE=
70.00.05.00.00.00.00.0A.00.00.00.00.21.01.00.00.00.00.00-
.00., Description=Device is not in a state capable of
performing request). Refer to the &STGM; documentation on
I/O error code descriptions. (SESSION: 11744, PROCESS:
431)
I google'd the "device is not in a state capable" line and found some references saying the element path needed to be specifically set. After reviewing a few more hits I found this site:
http://publib.boulder.ibm.com/tividd/td/TSMM/SC32-9090-01/en_US/HTML/anrcms5528.htm
If you look at the error above, you will see the ANR8300E and then the ASC and ASCQ values. Match these numbers on the website above to find the specific issue you are facing.
In this case it was 21 and 01 for an Invalid Element. We manually updated the elements and serials for the drives. Thanks to Kent for the help!
Friday, April 20, 2012
TSM Tape Usage Select Query
A new one I tracked down on the web for counting scratch tape usage in TSM (slight mod by the Kent)
select
DATE_TIME,count(MSGNO) from actlog where (msgno=1340 and message like
'%COPYPOOL%') group by date_time
Friday, December 16, 2011
Crontab – Quick Reference
from http://adminschoice.com/crontab-quick-reference
Crontab – Quick Reference
Setting up cron jobs in Unix and Solaris
cron is a unix, solaris utility that allows tasks to be automatically run in the background at regular intervals by the cron daemon. These tasks are often termed as cron jobs in unix , solaris. Crontab (CRON TABle) is a file which contains the schedule of cron entries to be run and at specified times.
This document covers following aspects of Unix cron jobs
1. Crontab Restrictions
2. Crontab Commands
3. Crontab file – syntax
4. Crontab Example
5. Crontab Environment
6. Disable Email
7. Generate log file for crontab activity
1. Crontab Restrictions
You can execute crontab if your name appears in the file /usr/lib/cron/cron.allow. If that file does not exist, you can use
crontab if your name does not appear in the file /usr/lib/cron/cron.deny.
If only cron.deny exists and is empty, all users can use crontab. If neither file exists, only the root user can use crontab. The allow/deny files consist of one user name per line.
2. Crontab Commands
export EDITOR=vi ;to specify a editor to open crontab file.
crontab -e Edit your crontab file, or create one if it doesn’t already exist.
crontab -l Display your crontab file.
crontab -r Remove your crontab file.
crontab -v Display the last time you edited your crontab file. (This option is only available on a few systems.)
3. Crontab file
Crontab syntax :
A crontab file has five fields for specifying day , date and time followed by the command to be run at that interval.
* * * * * command to be executed
- - - - -
| | | | |
| | | | +----- day of week (0 - 6) (Sunday=0)
| | | +------- month (1 - 12)
| | +--------- day of month (1 - 31)
| +----------- hour (0 - 23)
+------------- min (0 - 59)
* in the value field above means all legal values as in braces for that column.
The value column can have a * or a list of elements separated by commas. An element is either a number in the ranges shown above or two numbers in the range separated by a hyphen (meaning an inclusive range).
Notes
A. ) Repeat pattern like /2 for every 2 minutes or /10 for every 10 minutes is not supported by all operating systems. If you try to use it and crontab complains it is probably not supported.
B.) The specification of days can be made in two fields: month day and weekday. If both are specified in an entry, they are cumulative meaning both of the entries will get executed .
4. Crontab Example
A line in crontab file like below removes the tmp files from /home/someuser/tmp each day at 6:30 PM.
30 18 * * * rm /home/someuser/tmp/*
Changing the parameter values as below will cause this command to run at different time schedule below :
min hour day/month month day/week Execution time
30 0 1 1,6,12 * – 00:30 Hrs on 1st of Jan, June & Dec.
0 20 * 10 1-5 –8.00 PM every weekday (Mon-Fri) only in Oct.
0 0 1,10,15 * * – midnight on 1st ,10th & 15th of month
5,10 0 10 * 1 – At 12.05,12.10 every Monday & on 10th of every month
:
Note : If you inadvertently enter the crontab command with no argument(s), do not attempt to get out with Control-d. This removes all entries in your crontab file. Instead, exit with Control-c.
5. Crontab Environment
cron invokes the command from the user’s HOME directory with the shell, (/usr/bin/sh).
cron supplies a default environment for every shell, defining:
HOME=user’s-home-directory
LOGNAME=user’s-login-id
PATH=/usr/bin:/usr/sbin:.
SHELL=/usr/bin/sh
Users who desire to have their .profile executed must explicitly do so in the crontab entry or in a script called by the entry.
6. Disable Email
By default cron jobs sends a email to the user account executing the cronjob. If this is not needed put the following command At the end of the cron job line .
>/dev/null 2>&1
7. Generate log file
To collect the cron execution execution log in a file :
30 18 * * * rm /home/someuser/tmp/* > /home/someuser/cronlogs/clean_tmp_dir.log
Crontab – Quick Reference
Setting up cron jobs in Unix and Solaris
cron is a unix, solaris utility that allows tasks to be automatically run in the background at regular intervals by the cron daemon. These tasks are often termed as cron jobs in unix , solaris. Crontab (CRON TABle) is a file which contains the schedule of cron entries to be run and at specified times.
This document covers following aspects of Unix cron jobs
1. Crontab Restrictions
2. Crontab Commands
3. Crontab file – syntax
4. Crontab Example
5. Crontab Environment
6. Disable Email
7. Generate log file for crontab activity
1. Crontab Restrictions
You can execute crontab if your name appears in the file /usr/lib/cron/cron.allow. If that file does not exist, you can use
crontab if your name does not appear in the file /usr/lib/cron/cron.deny.
If only cron.deny exists and is empty, all users can use crontab. If neither file exists, only the root user can use crontab. The allow/deny files consist of one user name per line.
2. Crontab Commands
export EDITOR=vi ;to specify a editor to open crontab file.
crontab -e Edit your crontab file, or create one if it doesn’t already exist.
crontab -l Display your crontab file.
crontab -r Remove your crontab file.
crontab -v Display the last time you edited your crontab file. (This option is only available on a few systems.)
3. Crontab file
Crontab syntax :
A crontab file has five fields for specifying day , date and time followed by the command to be run at that interval.
* * * * * command to be executed
- - - - -
| | | | |
| | | | +----- day of week (0 - 6) (Sunday=0)
| | | +------- month (1 - 12)
| | +--------- day of month (1 - 31)
| +----------- hour (0 - 23)
+------------- min (0 - 59)
* in the value field above means all legal values as in braces for that column.
The value column can have a * or a list of elements separated by commas. An element is either a number in the ranges shown above or two numbers in the range separated by a hyphen (meaning an inclusive range).
Notes
A. ) Repeat pattern like /2 for every 2 minutes or /10 for every 10 minutes is not supported by all operating systems. If you try to use it and crontab complains it is probably not supported.
B.) The specification of days can be made in two fields: month day and weekday. If both are specified in an entry, they are cumulative meaning both of the entries will get executed .
4. Crontab Example
A line in crontab file like below removes the tmp files from /home/someuser/tmp each day at 6:30 PM.
30 18 * * * rm /home/someuser/tmp/*
Changing the parameter values as below will cause this command to run at different time schedule below :
min hour day/month month day/week Execution time
30 0 1 1,6,12 * – 00:30 Hrs on 1st of Jan, June & Dec.
0 20 * 10 1-5 –8.00 PM every weekday (Mon-Fri) only in Oct.
0 0 1,10,15 * * – midnight on 1st ,10th & 15th of month
5,10 0 10 * 1 – At 12.05,12.10 every Monday & on 10th of every month
:
Note : If you inadvertently enter the crontab command with no argument(s), do not attempt to get out with Control-d. This removes all entries in your crontab file. Instead, exit with Control-c.
5. Crontab Environment
cron invokes the command from the user’s HOME directory with the shell, (/usr/bin/sh).
cron supplies a default environment for every shell, defining:
HOME=user’s-home-directory
LOGNAME=user’s-login-id
PATH=/usr/bin:/usr/sbin:.
SHELL=/usr/bin/sh
Users who desire to have their .profile executed must explicitly do so in the crontab entry or in a script called by the entry.
6. Disable Email
By default cron jobs sends a email to the user account executing the cronjob. If this is not needed put the following command At the end of the cron job line .
>/dev/null 2>&1
7. Generate log file
To collect the cron execution execution log in a file :
30 18 * * * rm /home/someuser/tmp/* > /home/someuser/cronlogs/clean_tmp_dir.log
Friday, December 9, 2011
Issues with TSM server not able to talk to client...
We ran into this today:
ANR2716E Schedule prompter was not able to contact client using type 1
After some Google searching:
If you use a firewall, your clients must use the option
SCHEDMODE POLLING
The clients will then start their backup when the scheduled time has come.
ANR2716E Schedule prompter was not able to contact client
After some Google searching:
If you use a firewall, your clients must use the option
SCHEDMODE POLLING
The clients will then start their backup when the scheduled time has come.
Subscribe to:
Posts (Atom)