
INVENTORY COLLECT TOOL 2.1

DESCRIPTION
===========
	Inventory Collect Tool (ICT) is a standalone utility for collecting configuration 
	and inventory information about 7-Mode storage controllers, hosts and applications 
	running on these hosts for assessing the transition readiness of these systems. 
	The tool generates an Inventory Report Workbook and an Inventory Report XML file 
	that contain configuration details of the storage and host systems. It is best to 
	view the Inventory Report Workbook in Microsoft Excel and the Inventory Report XML
	can be used with 7-Mode Transition Tool for generating 
	an assessment report.

	ICT can be used during transition planning to prepare and inform all transition 
	stakeholders about the details of controllers running Data ONTAP operating in 7-Mode 
	and hosts (Windows, Linux & VMware).

	Note: The Inventory Collect Tool uses TLS, SSL, or SSH protocols for communicating 
	with the 7-Mode storage systems and SSH or WMI for communicating with hosts. The tool
	communicates with the storage system using the TLS protocol if TLS is enabled on the 
	storage system. If TLS is disabled and SSLv3 is enabled on a storage system, the tool 
	uses SSLv3 to communicate with the storage system. It is a best practice to enable TLS 
	and disable SSLv3 on the storage system in order to avoid SSLv3 security vulnerabilities 
	(CVE-2014-3566).

SYNTAX
======
	ict --cmd collect [--output <inventory.xml>] <uri> [<uri> ...]
	ict --cmd collect [--output <inventory.xml>] --input <credential_file.txt>
	ict --help
	ict --version

	The OPTIONS section of this readme lists the URI format.

	The ict command collects configuration and inventory information from controllers and hosts 
	specified either in the command line or in a text file that contains system details.

	The text file must contain system details of each system in a seperate line:
	uri1
	uri2
	uri3

	If a password is * or omitted (either in the command line or in the text file), then the user is 
	prompted to enter the password at the command line.


OPTIONS
=======
	The following options are available to run the Inventory Collect Tool:

	--help
		Shows this help message and exits.

	--version
		Print the tool version and exits.

	--cmd collect
		Collects configuration and  inventory information from controllers and hosts.
								   
	--output <filename[.xml[.gz]]>
		Specifies the location where the files are generated. If the file name has '.gz' 
		in the suffix, then the file is compressed. This option generates two files (reports):
		Inventory Report and Inventory Report Workbook.
								   
	--input <credentials_file.txt>
		Specifies the location where the file with system credentials is saved.
		Note: Only ASCII encoded text file is supported.
							   
	uri format 
		(ontap|windows|vmware|linux)://[(<user>|<domain_user>)[:(<password>|*)]@](<hostname>|<ip>)

		Specifies the system type, IP address, and credentials of the controller or host.
		If the password provided is * or if no passwords are provided, then the user is 
		prompted to enter the password at the command line.


OUTPUT
======
	ICT generates two reports:

	1. Inventory Report
		This is an XML file. This report can be imported to the 7-Mode Transition Tool for 
		assessing whether the 7-Mode controllers or hosts are ready for transition.
	2. Inventory Report Workbook
		It is best to view this XML file in Microsoft Excel. This report has "_InventoryWorkbook" 
		as the suffix in the file name.


EXAMPLE
=======
	ict --cmd collect --output collected_data.xml 
		ontap://root:test123@hostname1 linux://root:testpasswd@hostname2

	generates the following:

	1. Inventory report XML file: collected_data.xml 
	2. Inventory Report Workbook, MS Excel Spreadsheet: collected_data_InventoryWorkbook.xml


SYSTEM REQUIREMENTS
===================
	For details about the system requirements for running the Inventory Collect Tool
	and the storage and host version requirements for inventory collection, see the Inventory
	Collect Tool documentation on the NetApp Support Site.


LOGGING
=======
	The command execution and processing is displayed on the command line and logged in a file. 
	This file is titled "ict.log".


COMMANDS USED
=============
	Following are the list of commands used by Inventory Collect Tool.


ONTAP ZAPI
==========
	The following Data ONTAP APIs are used by Inventory Collect Tool:

	aggr-list-info
	cf-status
	cifs-homedir-paths-get
	cifs-list-config
	cifs-nbalias-names-get
	cifs-share-acl-list-iter-start
	cifs-share-list-iter-start
	cifs-status
	disk-list-info
	fcp-adapter-list-info
	fpolicy-list-info
	igroup-list-info
	iscsi-interface-list-info
	iscsi-node-get-name
	license-list-info
	license-v2-list-info
	lun-get-comment
	lun-list-info
	lun-map-list-info
	net-config-get-active
	nfs-exportfs-list-rules
	nfs-exportfs-list-rules-2
	nfs-exportfs-list-rules-2
	nfs-status
	options-get
	options-list-info
	qtree-list-iter-start
	quota-list-entries-iter-start
	quota-report-iter-start
	registry-list-info-iter-start
	sis-status
	snapmirror-get-status
	snapmirror-list-schedule
	snapmirror-list-sync-schedule
	snapshot-get-schedule
	snapshot-list-info
	snapshot-volume-info
	snapvault-primary-relationship-status-list-iter-start
	snapvault-secondary-relationship-status-list-iter-start
	snmp-status
	storage-disk-get-iter
	system-available-replication-transfers
	system-get-info
	system-get-ontapi-version
	system-get-version
	useradmin-group-list
	useradmin-role-list
	useradmin-user-list
	vfiler-get-allowed-protocols
	vfiler-get-status
	vfiler-list-info
	volume-charmap-get
	volume-get-filer-info
	volume-get-language
	volume-list-info-iter-start
	volume-options-list-info

ONTAP CLI
=========
	The following Data ONTAP commands are used by Inventory Collect Tool: 

	cifs shares
	ic primary show
	ifconfig -a
	ifconfig vip
	ifgrp status
	ls $volumes_path/metadir/slag/
	printflag wafl_metadata_visible
	rdfile $root_vol/etc/cifsconfig_share.cfg
	rdfile $root_vol/etc/group
	rdfile $root_vol/etc/hosts
	rdfile $root_vol/etc/krb5auto.conf
	rdfile $root_vol/etc/mcrc
	rdfile $root_vol/etc/netgroup
	rdfile $root_vol/etc/nsswitch.conf
	rdfile $root_vol/etc/passwd
	rdfile $root_vol/etc/resolv.conf
	rdfile $root_vol/etc/snapmirror.conf
	rdfile $root_vol/etc/symlink.translations
	rdfile $root_vol/etc/usermap.cfg
	rdfile $vfiler_roots/etc/cifsconfig_share.cfg
	rdfile $vfiler_roots/etc/group
	rdfile $vfiler_roots/etc/hosts
	rdfile $vfiler_roots/etc/krb5auto.conf
	rdfile $vfiler_roots/etc/mcrc
	rdfile $vfiler_roots/etc/netgroup
	rdfile $vfiler_roots/etc/nsswitch.conf
	rdfile $vfiler_roots/etc/passwd
	rdfile $vfiler_roots/etc/resolv.conf
	rdfile $vfiler_roots/etc/snapmirror.conf
	rdfile $vfiler_roots/etc/symlink.translations
	rdfile $vfiler_roots/etc/usermap.cfg
	rlm status
	routed status
	route -sn
	setflag wafl_metadata_visible 0
	setflag wafl_metadata_visible 1
	snapvault status -l
	sysconfig -A
	uptime
	vfiler status -a
	vlan stat

Windows
=======

	The following WMI queries are used by Inventory Collect Tool:

	HKEY_LOCAL_MACHINE\\SOFTWARE\\NetApp
	HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall
	select * from  MPIO_Registered_DSM
	select * from  MSCluster_Cluster
	select * from  MSCluster_Disk
	select * from  MSCluster_Node
	select * from  MSCluster_NodeToActiveResource
	select * from  MSCluster_Resource
	select * from  MSCluster_ResourceToDisk
	select * from  MSFC_FCAdapterHBAAttributes
	select * from  MSFC_FibrePortHBAAttributes
	select * from  MSiSCSI_HBAInformation
	select * from  MSiSCSIInitiator_MethodClass
	select * from Win32_ComputerSystem
	select * from  Win32_DiskDrive
	select * from Win32_OperatingSystem
	select * from Win32_PnPSignedDriver where DeviceClass = "SCSIADAPTER"
	select * from  Win32_Product

Linux CLI
=========

	The following Linux commands are used by Inventory Collect Tool:

	blkid
	cat /boot/grub/device.map
	cat /etc/grub.conf
	cat /etc/iscsi/initiatorname.iscsi
	cman_tool nodes
	cman_tool status
	df -h
	dmidecode -t system
	find /etc -maxdepth 1 -name *-release -type f -print -exec cat -v {} \;
	for file in /sys/block/sd*; do echo ${file/#\/sys}; scsi_id -p 0x80 -g -x -a -s ${file/#\/sys}; done
	for file in /sys/class/scsi_host/*; do echo; for ent in ${file}/*; do echo -n "$ent: "; if [ -f "${ent}" ]; 
		then if [ -r "${ent}" ]; then cat -v -s ${ent} 2>/dev/null; 
		if [ "$?" != "0" ]; then echo; fi; fi; else echo; fi; done; done
	for file in /sys/class/fc_host/*; do echo; for ent in ${file}/*; do echo -n "$ent: "; if [ -f "${ent}" ]; 
		then if [ -r "${ent}" ]; then cat -v -s ${ent} 2>/dev/null; if [ "$?" != "0" ]; then echo; fi; 
		fi; else echo; fi; done; done
	iscsiadm -m node
	lsb_release -a
	lvdisplay -m
	mount
	rpm -qa --qf "%{NAME}___%{SUMMARY}___%{VENDOR}___%{PROVIDEVERSION}\n"
	sanlun fcp show adapter -v
	sanlun lun show -pv
	sanlun lun show -v
	sanlun version
	san_version
	sfdisk -uS -l
	uname -a
	vxclustadm nidmap
	vxclustadm -v nodestate

VMware CLI
===========

	The following VMware commands are used by Inventory Collect Tool:

	esxcfg-info -a -F xml
	esxcfg-mpath -l
	esxcfg-scsidevs -a
	esxcfg-scsidevs -l
	esxcli software vib get
	find /proc/scsi -type f | while read line; do echo $line; cat $line; done
	san_version
	uname -m
	uname -n
	/usr/lib/vmware/vmkmgmt_keyval/vmkmgmt_keyval -a
	/usr/lib/vmware/vm-support/bin/dump-vmdk-rdm-info.sh $vmx_paths
	vim-cmd /vmsvc/getallvms
	vim-cmd vmsvc/snapshot.get $vm_ids
	vmkload_mod -s nmp
	vmware -l
	vmware -v
