Networker

Re: [Networker] Client version report

2012-11-01 11:56:22
Subject: Re: [Networker] Client version report
From: Yaron Zabary <yaron AT ARISTO.TAU.AC DOT IL>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Thu, 1 Nov 2012 17:47:40 +0200
On 11/01/2012 02:51 PM, Stanley R. Horwitz wrote:
Greetings everyone,

Via the NetWorker Console Manager, I can get a list of every active client and 
the NetWorker version each client is running. Does anyone know of a way to 
export that list into a csv file or an alternative way to generate that list? I 
do not see a way to get it via mminfo. I am sure there's a way to generate such 
a list via nsradmin, but I have always been clumsy with using it for generating 
reports. Any suggestions will be appreciated.


  That is my perl script:

#!/usr/bin/perl

my $s;

$/ = "\n\n";

open(NSRRES,"cat /nsr/res/nsrdb/*/* |");

while (defined($resource = <NSRRES>))
{
  if ($resource =~ /type: NSR client;/ )
  {
    $start = index($resource,"name: ");
$name = substr($resource,$start + 6,index($resource,";",$start) -$start - 6 );
    $start = index($resource,"NetWorker version:");
$version = substr($resource,$start + 18,index($resource,";",$start) -$start - 17);
    printf  "%-40s %s \n",$name,$version;
  }     
}

close(NSRRES);

 Its output looks like that:

rup1.tau.ac.il                            7.6.3.Build.840;
lahavsrv.tau.ac.il                        7.6.2.1.Build.638;
micron3.eng.tau.ac.il                     7.6.3.Build.840;
tauweb-dev.tau.ac.il                      7.6.2.1.Build.638;
meshek_server                             nwnc_7_2;
efes.iucc.ac.il                           7.6.1.Build.397;
eduroam.iucc.ac.il                        7.6.1.Build.397;
samples.iucc.ac.il                        7.6.1.Build.397;
tausql1.tau.ac.il                         7.6.1.Build.397;
bohanim.tau.ac.il                         7.6.2.1.Build.638;


  Just keep in mind that the field is updated only after the first backup.



--

-- Yaron.