Hi, Jack.
Assuming you prune/archive your accounting log monthly, something like this
might do.
awk -F , '{ total_bytes_sent_received += $20 } END { print "Total bytes sent
to/from TSM: ", total_bytes_sent_received '
You can do some massaging to get a list of nodes:
cut -d, -f6 dsmaccnt.log | sort -u > list.of.nodes
Then process that list of nodes:
cat list.of.nodes | while read NODE; do
print "$NODE `grep $NODE dsmaccnt.log | awk -F , '{ nodexfer += $20 } END
{ print nodexfer }'`"
done
There are better ways of doing this (I'd parse dsmaccnt.log once with Perl
and a hash), but this was quick and dirty. Oh, you imght have to clean up
quotes and stuff, I didn't take the time to check it. :-)
Alex Paschal
Freightliner, LLC
(503) 745-6850 phone/vmail
PS: I just discovered how hard it is to use Outlook when you're typing Unix
commands. I almost closed this email 6 or 7 times. <Grin>
-----Original Message-----
From: Coats, Jack [mailto:Jack.Coats AT BANKSTERLING DOT COM]
Sent: Monday, November 03, 2003 9:15 AM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Accounting file - Reporting
Does anyone have a script that they would like to share to reduce the TSM
accounting file
to something reasonable for monthly reporting purposes?
... TIA .. Jack
|