Start a Conversation

This post is more than 5 years old

Solved!

Go to Solution

7781

December 9th, 2009 06:00

How to merge multiple NAR files

I'm pretty new to the CX range, and have recieved no formal training, so excuse my ignorance, but i have cut NAR files for a full week, and archived them off, i retreived my NAR files for each SP, and would like to merge them all into one large file to load into anaylzer to get some figures for the full week.  How do i go aboy combining the 20+ NAR files together?

Thanks in advance!

727 Posts

December 9th, 2009 07:00

You can only merge two files together at the same time. So, if you have three nar files that you want to merge you would merge the 1st and 2nd files together . Then repeat the process by taking that merged file and merge it to the 3rd file.

The CLI command is:

analyzer -archivemerge

The naviseccli analyzer command with the -archivemerge command lets you merge two archives from the same SP into a single archive.
 
See page 49 of the
http://powerlink.emc.com/km/live1/en_US/Offering_Technical/Technical_Documentation/300-004-210_A04.pdf?

As a side note, never merge SPA and SPB's files together. They contain the same data so there is no need to. We only really collect both side in case one logger becomes stuck and can't log the data to the file.

One last thing to point out, if you merged many days of data together and then try to display it in Navisphere, the data points will now represent more time than what the original polling rates took the data at.

The analyzer display in Navisphere can only display 156 data points, so depending on the time frame you specify (say Monday through Thursday worth of data) it will begin merging data points to satisfy this 156 point requirement. Then a two minute average turns into an average of say 1.5 hours and the data is basically useless. This is the main reason why some people do not merge files together.

The merged file does however have all of the data points, so if you wanted to dump them out to a .csv say and import them to excel, you can manipulate the data from there. Also if viewing in Navisphere you can specify shorter time frames when opening the files and the averaging will be less than viewing the file as a whole.

139 Posts

December 9th, 2009 07:00

I have come up with a script to accomplish that.  I created it for my needs, so it's not polished or anything, but it gets the job done.

I create three folders and call them Files, Merged and Script.

The nar files go in Files, and the perl script goes in Script. The output goes in Merged.  The script assumes that you have the latest naviseccli installed and that it is defined in the path variable in Windows.

You will need to point to the right folders in the perl script.  Maybe the code is not optimized, but it has helped me out a lot.

EDIT:  The slashes and comments didn't come out right on the forum, and I don't know how to attach a perl script file. So if you are having trouble running this, send me a message through this forum.

$narfiles_dir = "

$mergedfiles_dir = ""

@file_list =();

$number_of_files = "";

opendir DIR, $narfiles_dir;

while ($filename = readdir(DIR)) {

if ($filename eq "." || $filename eq "..") {

next;

}

else {

push (@file_list, $filename);

}

}

closedir(DIR);

$number_of_files = @file_list;

#$output = $mergedfiles_dir."test.txt";

#open (ABC, ">$output") || die ($!);

for ($count = 0; $count <= ($number_of_files - 1); $count++) {

if ($count < 2) {

$a = "naviseccli analyzer -archivemerge -data ".$narfiles_dir.$file_list[$count]." ".$narfiles_dir.$file_list[$count+1]." -out ".$mergedfiles_dir."merged".$count.".nar"."\n";

print $a."\n";

system($a);

$count++;

}

else {

$b =  "naviseccli analyzer -archivemerge -data ".$narfiles_dir.$file_list[$count]." ".$mergedfiles_dir."merged".($count-2).".nar"." -out ".$mergedfiles_dir."merged".($count-1).".nar"."\n";

print $b."\n";

system($b);

}

}

#close (ABC);

Ahmed Jalal

(713) 219-6742

ahmed.jalal@gcserv.com

45 Posts

December 9th, 2009 07:00

I had a feeling you would say that! :-(

Thanks

139 Posts

December 9th, 2009 08:00

The merged file does however have all of the data points, so if you wanted to dump them out to a .csv say and import them to excel, you can manipulate the data from there. Also if viewing in Navisphere you can specify shorter time frames when opening the files and the averaging will be less than viewing the file as a whole.

That is what I do. I merge a week's worth of files, display it in Navisphere analyzer and for each RG or lun I want to focus on, I do a "save as" and save the data as a CSV file. Then I use Excel to create graphs, or find average, standard deviation, etc.

4.5K Posts

December 10th, 2009 14:00

First, thanks very much for posting this method, I know that a lot of us that work with NAR files will appreciate this.

Second, when you merge two NAR files together, it does in fact get all the data points, it just can't display more than 156 in the Analyzer GUI - the points are still all in the merged file.

glen

1 Message

January 26th, 2010 02:00

Hi,

I want to try to merge multiple nar files with the script but i have an error when i try to run the command line :

NaviSECCli.exe analyser -archivemerge -data D:\FILES\CK200074200302_SPB_2009-12-16_18-09-16-GMT_P01-00.nar D:\FILES\CK200074200302_SPB_2009-12-16_20-45-16-GMT_P01-00.nar -out D:\MERGED\test.nar

Security file not found.  Already removed or check -secfilepath option.

Can you help me please ?

295 Posts

January 26th, 2010 07:00

hello

skip cli, try it via Navisphere GUI, it works for me,

Maynor

727 Posts

January 26th, 2010 08:00

naviseccli is expecting to find username, password and scope information - which you are not providing in your command. There are two options -

1. You can create a securityfile with the default username, password and scope. Once you do this, naviseccli will try to use this information whenever you issue a command from that host.

2. You can provide the login credentials along with the individual CLI command.

15 Posts

January 26th, 2010 11:00

Use ArchiveDumpSummary (ADS) is a PERL script that processes Navisphere Analyzer NAR files into flat, manageable Excel workbooks. LUNs are named using the absolute CLARiiON LUN number, not the LUN name, so there should be no confusion as to which LUN or component LUN is being represented.

44 Posts

February 4th, 2010 04:00

Could somebody provide an url link to ADS perl script?

19 Posts

July 8th, 2011 13:00

Just found the old thread I'm also wanting to merge a large number of nar files

is there a new method to do this now? or a link to the script?

5.7K Posts

August 11th, 2011 00:00

Read this: www.50mu.net

This blog post covers the retrieval, merging and the steps to take to analyze performance.

2 Posts

September 11th, 2013 07:00

I se4arch through that site and could not find the article you mentioned.  Can you post the exact link?

Thanks,

11 Posts

April 2nd, 2014 16:00

On a machine that has naviseccli installed:

Create a directory called c:\nar_files & then copy your nar files there.

Create another directory called c:\nar_merged & then copy one nar file there and rename it temp.nar

Create a third directory called scripts.

Put this batch file into the scripts directory & run it.

echo on

del c:\nar_files\nar_list.txt

dir c:\nar_files /w /p /b > c:\nar_files\nar_list.txt

for /f %%i in (c:\nar_files\nar_list.txt) do (del c:\merged_files\output.nar

     naviseccli analyzer -archivemerge -data c:\merged_files\temp.nar c:\nar_files\%%i -out c:\merged_files\output.nar

     del c:\merged_files\temp.nar

     copy c:\merged_files\output.nar c:\merged_files\temp.nar)

It takes a while to run.

But when done rename output.nar to match the array and date and open in analyzer.

No Events found!

Top