What are your reporting scripts ( and a link for mine )

edyesed

ADSM.ORG Member
Joined
Oct 29, 2002
Messages
7
Reaction score
0
Points
0
Website
http
Folks,



I was just wondering how y'all were doing reporting for client nodes. I've tried to add mine to the downloads section, but I'm not sure if it meets the qualifications for that area, and I'm curious as to what other folks are doing for reporting.



You can download a little ( 8k) tarball with my stuff from http://www.warispeace.org/tsm/dailybackupstatus.tar.gz , checkout the README. It's written for *nix, I don't know how or even if it can be used with MSWindows. It uses perl, bash, and mysql, and generates a text file that I email out the Systems Adminstrators here in our organization. It looks best with a fixed width font, so if you run it and send it to yourself or others, use a fixed width font.



It gives a report for all the client nodes, as that's inline with the way our organization works, but it could be easily changed to do node by node based reporting.



Well, here's to hoping someone will find it useful,

edyesed

Link to gzip
 
Before I go out and run this , id like to see what a sample report.
 
========================================

Daily Backup Status by Nodes for 02/20/2003

========================================



NODE STATUS END SCHEDULE

SERVER1 (?) 02/20/2003 05:13:10 BKUP_UX_0300

SERVER2 Failed 02/20/2003 03:06:47 BKUP_UX_0300

SERVER3 Failed 02/19/2003 21:09:18 BKUP_NW_2100

SERVER4 Missed ARCV_NTQS1_0100

SERVER5 Missed BKUP_NT_2300

SERVER6 Missed BKUP_NT_2300

SERVER7 Restarted 02/19/2003 23:33:25 BKUP_NW_2100

SERVER8 Restarted 02/20/2003 05:26:18 BKUP_UX_0300

SERVER9 Started 02/19/2003 21:01:31 BKUP_NW_2100

SERVER10 Started 02/19/2003 21:08:22 BKUP_NW_2100

SERVER11 Started 02/19/2003 21:13:51 BKUP_NW_2100



========================================

BELOW ARE THE FAILED FILES FOR YESTERDAY

========================================



Below are the files that were in use at backup time

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

SERVER8) '\\SERVER8\c$\Documents and Settings\All Users\Application Data\Microsoft\Network\Downloader \qmgr1.dat'

SERVER8) '\\SERVER8\c$\Documents and Settings\All Users\Application Data\Microsoft\Network\Downloader \qmgr0.dat'

SERVER9) '\\SERVER9\c$\Documents and Settings\Administrator\Local Settings\Temp \ DF4ABE.tmp'

SERVER10) '\\SERVER10\c$\Documents and Settings\qs1admin \ntuser.man'

SERVER10) '\\SERVER10\c$\Documents and Settings\qs1admin \ntuser.man.LOG'

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



Below are the files that TSM was denied access to

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

SERVER10) 'VOL1:/DEPTS/Hosp_Adm/NewYrBudget/budget04.dbf'

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



========================================

BELOW ARE THE COMPLETED NODES FOR LAST NIGHT

========================================

END DATE/TIME NODE AMOUNT DURATION



02/19/2003 21:17:03 SERVER12 2.30 MB 0H 5M 43S

02/20/2003 04:07:30 SERVER13 440.50 MB 0H 57M 28S

02/19/2003 22:54:18 SERVER14 1.27 GB 1H 43M 46S

02/20/2003 07:16:48 SERVER15 9.72 GB 13H 2M 50S

02/19/2003 20:16:43 SERVER16 5.47 GB 2H 1M 54S

02/20/2003 05:14:40 SERVER17 925.98 MB 2H 5M 59S

............. etc...
 
I tried to run the scripts but get the following error message:



Can't locate Date/Format.pm in @INC (@INC contains: /usr/lib/perl5/5.6.1/i386-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i386-linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.6.1/i386-linux /usr/lib/perl5/vendor_perl/5.6.1 /usr/lib/perl5/vendor_perl .) at /root/scripts/tsm-dailybackupstatus-step2.pl line 10.

BEGIN failed--compilation aborted at /root/scripts/tsm-dailybackupstatus-step2.pl line 10.



:confused:



Can anybody help me, I'm really interrested to use this script!



THX and bye
 
You miss a perl module in your configuration, the Format.pm.



Dowload it from:



http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/TimeDate-1.15.tar.gz



(I've not saw the program so i hope this is the one you need, make a try).



tar -zxvf it

Go into the directory the tar has just created, now you should only need:

perl Makefile.pl

make

make install



This could ask for more modules as prerequisites, search them at:

http://search.cpan.org/

Look at the readme for more information.



Riccardo
 
OK, now it works but i get an other error:



Use of uninitialized value in concatenation (.) or string at /root/scripts/dailybackupstatus2.pl line 146, <ACTLOG> line 3402.

Use of uninitialized value in concatenation (.) or string at /root/scripts/dailybackupstatus2.pl line 146, <ACTLOG> line 3409.

Use of uninitialized value in concatenation (.) or string at /root/scripts/dailybackupstatus2.pl line 146, <ACTLOG> line 3415.

Use of uninitialized value in concatenation (.) or string at /root/scripts/dailybackupstatus2.pl line 146, <ACTLOG> line 3421.

Use of uninitialized value in concatenation (.) or string at /root/scripts/dailybackupstatus2.pl line 146, <ACTLOG> line 3443.

Use of uninitialized value in concatenation (.) or string at /root/scripts/dailybackupstatus2.pl line 146, <ACTLOG> line 3450.



... and so on...



Mybe the developer can post here what the error may be?!?
 
Hi,



we use TSM only for Content Manager in an archiving system. Here is my simple script I use to measure how many bytes have been backed up and restored:



#!/bin/ksh



query()

{

dsmadmc -id=admin -password=admin "select bytes from summary where start_time>='$2 $3' and end_time<='$2 $4' and activity='$1' and entity='CMCLIENT'" | awk ' BEGIN{sum=0}; sum=sum+$1; END{print sum}' | tail -1 | xargs echo "Bytes processed: "

}



if [[ $1 != "RESTORE" && $1 != "BACKUP" ]]; then

echo; echo "qtsm <BACKUP|RESTORE> <DATE> <STARTTIME> <ENDTIME>"

echo "Example: qtsm RESTORE 2003-01-28 07:00 08:00"

echo "----------------------------------------------------"

exit

else

query $1 $2 $3 $4

fi

exit
 
hmm.. well.. it's a match that didn't work.. or a split that found no text.



I think that you can probably expect quite a few of these, I don't usually worry about it.. did the report look all funky?



-ed



I think that I have my email address in here now.. but if not you can shoot me one a [email protected] ( take out the capital letters ).
 
If your TSM has a lot of traffic it might take some time for the result, but for an example my output looks like this (just replace the german words ;o)



qtsm <BACKUP|RESTORE> <DATUM> <STARTZEIT> <ENDZEIT>

Beispiel: qtsm RESTORE 2003-01-28 07:00 08:00

----------------------------------------------------

root@srarhv01:/usr/local/sbin> qtsm BACKUP 2003-06-26 06:00 19:00



Bytes processed: 2.76163e+09



Thats about 2.8 GB of data backed up in the time stated in the query.



What kind of output do you get?

Maybe just check at dsmadmc with a "select * from summary where ......", if any of your entries in the TSM database differ.

Or just take parts of the script and look at the output.



The part



dsmadmc -id=admin -password=admin "select bytes from summary where start_time>='$2 $3' and end_time<='$2 $4' and activity='$1' and entity='CMCLIENT'" | awk ' BEGIN{sum=0}; sum=sum+$1; END{print sum}' | tail -1 | xargs echo "Bytes processed: "



is written as one line, maybe there is an error in your version.
 
Back
Top