I use a cron job to schedule the report daily and copy it to our internal web server. I then run the csv2html.pl perl script (from http://www.jpsdomain.org/source/perl.html) to convert it to an HTML output file to add to our intranet report page. This is likely the most viewed report I create on a daily basis as we always seem to be running low on available capacity.

I use Cygwin installed on a Windows server for my bash scripts, I don’t have a linux server either. I initially did that because I couldn’t find specific batch commands in Windows that had the same functionality as in bash. I’ve never used Powershell. For the unix specific commands like grep and awk you could try the open source unix tools for windows (http://unxutils.sourceforge.net/) or Cygwin (https://www.cygwin.com/). Scripts in cygwin can be called from the windows scheduler, the syntax is ‘c:\cygwin\bin\bash.exe -l -c “/home/scripts/script.sh”‘. You could also use ActivePerl for Windows for the csv2html conversion utility (http://www.activestate.com/activeperl). Sorry I can’t be of more help with windows scripting, I’m just not as familiar with it.

It looks like a syntax issue. I can see in the command you have a “vertical bar” character ( | ), and in the output it shows a “broken bar” character ( ¦ ). Also, in front
of the “{print” command you have a quote mark ( ‘ ) rather than an apostrophe ( ‘ ). If the awk commands don’t function your output will not go on the same line horizontally.
Use the Pipe and the Apostrophe and it should work for you.

1. Place your cursor in the location where you wish to insert a special character.
2. Activate the numeric key pad on the right of the keyboard by pressing Num Lock.
3. While pressing down the ALT key, type the four-digit code on the numeric key pad at the right edge of the keyboard.

All of the bash scripts on this blog were written to be used with Cygwin installed on a Windows Server, however all should work fine in Linux as well. If you’re not familiar with it, Cygwin is a free Unix-like environment and command-line interface for Windows. It provides native integration of Windows-based applications, data, and other system resources with applications, software tools, and data of the Unix-like environment, and I use it extensively for the extra functionality provided by native unix scripting commands vs. the limited capabilities of standard windows batch files. If you’d like to use the perl script that converts the csv output to an html table, you’ll need to install a perl distribution on the windows server as well. I used ActiveState Perl. That should be the only prerequisite.

We’ve VNX 5700 with Raid Groups configured but not Pools. All Output will be in Block Size. One can convert Blocks into MB or GB easliy and finally use /csv2html.pl script that this site has.

So I’m putting these lines for anyone’s reference, because sharing is caring :). My script is work of 5-8 hours with little bash knowledge, so some of you can find it stupid enough to improvise

NOTE – I’ve put the script named vnx_pool.sh under the path – /opt/Navisphere/bin/scripts. All Raid Group files will be created in the same location. The script can be easily added in crontab for schedules

##Add the current time/date stamp to the top of the report
echo $TODAY>/opt/Navisphere/bin/scripts/PoolReport.csv

#Remove Old or Previous Files [The very first time , rm commands may through error, please ignore]
cd /opt/Navisphere/bin/scripts
rm RG* #Remove any file whose name is starting with RG
rm Filter* #Remove any file whose name is starting with Filter*

#Set Environmental Variable for Naviseccli commands to be run
cd /opt/Navisphere/bin