
INVENTORY COLLECT TOOL 2.0

DESCRIPTION
===========
	Inventory Collect Tool (ICT) is a standalone utility for collecting configuration 
	and inventory information about 7-Mode storage controllers, hosts attached to 
	controllers, 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).


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:

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


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

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


Windows
=======

	The following WMI queries are used by Inventory Collect Tool:

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


Linux CLI
=========

	The following Linux commands are used by Inventory Collect Tool:

	uname -a
	lsb_release -a
	dmidecode -t system
	find /etc -maxdepth 1 -name *-release -type f -print -exec cat -v {} \;
	rpm -qa --qf "%{NAME}___%{SUMMARY}___%{VENDOR}___%{PROVIDEVERSION}\n"
	sanlun lun show -v
	sanlun lun show -pv
	for file in /sys/block/sd*; do echo ${file/#\/sys}; scsi_id -p 0x80 -g -x -a -s ${file/#\/sys}; done
	sanlun fcp show adapter -v
	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
	cat /etc/iscsi/initiatorname.iscsi
	vxclustadm nidmap
	vxclustadm -v nodestate
	cman_tool status
	cman_tool nodes
	san_version
	sanlun version
	sfdisk -uS -l
	lvdisplay -m
	df -h
	mount
	cat /etc/grub.conf
	cat /boot/grub/device.map
	iscsiadm -m node
	blkid


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

	The following VMware commands are used by Inventory Collect Tool:

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