[펌] EMC Networker: export list of clients to csv file
EMC Networker: export list of clients to csv file
1/ Presentation
For some reasons, mainly reporting/quality ones , one might have to export a list of the clients currently backed up by a Networker server.
When it comes to access the Networker configuration from the command lines a few tools appear to be very useful:
mminfo
nsradmin
among others. Therefore you are invited to have a look at the man pages of these tools.
2/ The request one can face
In order to comply with some reporting/quality policies, one might want to get the list of Networker clients currently in use, with their Description, Groups, Save set, Browse Policy andRetention Policy.
The nsradmin
tool will then be used.
Let’s see how the nsradmin script looks like:
Running this script leads to the result one might expect, displaying every enabled clients, with their name, group, comment/description, save set and browse and retention policies. But the format of the output is not quite easy to work with when building reports (integration in an Excel spreadsheet for instance).
Let’s see an example:
3/ Building a CSV format report from these data
In order to make these data easily workable, a Perl script is being used, translating this raw output from nsradmin
to a CSV format.
You can fin the script here
Have a look at the content of this script as you might want to modify some parameters:
where tmp_csv_file
is the CSV output file.
The script is quite simple. It is simply using a hash of hashes to parse the output from thensradmin
script:
This part of the script initializes the hash of hashes with entries that stand for the header of the resulting table.
Then the hash of hashes is built using a for
loop:
An index (grpidx
) is used as a client can belong to multiple groups.
The values 28
and 30
might be adjusted but are a match on the server that I’m working with.
They are corresponding to the number of char used for the first field in the nsradmin output.
4/ Use of the output
Once the CSV file has been generated, it can be imported in Excel or in any Spreadsheet tool, and can be easily manipulated to generate reports.
Enjoy…
'테크노트 > Linux, Unix' 카테고리의 다른 글
[Linux] 신규 디스크 추가하여 파일시스템 확장 (0) | 2018.12.13 |
---|---|
Find 명령어 활용 (0) | 2012.06.19 |
[펌] [명령어] sed 및 awk 사용법 Linux (0) | 2012.05.17 |
[펌] Veritas Volume Manager (0) | 2012.05.17 |
[펌] SUN Cluster 3.1 vs 3.2 명령어 비교 (0) | 2012.05.17 |