EMC Isilon Billing Script
Posted: Tue Dec 10, 2019 9:52 am
create a file: /ifs/data/Isilon_Support/emcbilling.sh
today=`date +%Y-%m-%d_%H-%M-%S`
host=`hostname | rev | cut -c3- | rev`
guid=`python -c "import isi.config.arrcfg as ac;cfg = ac.config_load(); print cfg.guid"`
echo " " > /ifs/data/Isilon_Support/emc_billing/NodeIsiSnapshotsView.txt
echo " " > /ifs/data/Isilon_Support/emc_billing/NodeIsiQuotaList.txt
echo " " > /ifs/data/Isilon_Support/emc_billing/NodeIsiDedupeStats.txt
echo " " > /ifs/data/Isilon_Support/emc_billing/NodeDisiDiskpoolsList.txt
echo " " > /ifs/data/Isilon_Support/emc_billing/SysCtl-DiskPoolDB.txt
echo " " > /ifs/data/Isilon_Support/emc_billing/ArrayIsiStatus.txt
echo " " > /ifs/data/Isilon_Support/emc_billing/ArrayIsiHWStatus.txt
echo " " > /ifs/data/Isilon_Support/emc_billing/ArrayNodeSerials.txt
echo " " > /ifs/data/Isilon_Support/emc_billing/NodeIsiStoragePoolList.txt
echo " " > /ifs/data/Isilon_Support/emc_billing/ArrayIsiVersion.txt
isi snapshot snapshots list | awk '/\d+/ {print $1}' | xargs -L 1 isi snapshot snapshots view >> /ifs/data/Isilon_Support/emc_billing/NodeIsiSnapshotsView.txt
isi quota list >> /ifs/data/Isilon_Support/emc_billing/NodeIsiQuotaList.txt
isi dedupe stats >> /ifs/data/Isilon_Support/emc_billing/NodeIsiDedupeStats.txt
disi -I diskpools list >> /ifs/data/Isilon_Support/emc_billing/NodeDisiDiskpoolsList.txt
/sbin/sysctl efs.bam.disk_pool_db >> /ifs/data/Isilon_Support/emc_billing/SysCtl-DiskPoolDB.txt
isi_for_array -s isi status >> /ifs/data/Isilon_Support/emc_billing/ArrayIsiStatus.txt
isi_for_array -s isi_hw_status >> /ifs/data/Isilon_Support/emc_billing/ArrayIsiHWStatus.txt
isi_for_array isi_hw_status | grep SerNo >> /ifs/data/Isilon_Support/emc_billing/ArrayNodeSerials.txt
isi storagepool list >> /ifs/data/Isilon_Support/emc_billing/NodeIsiStoragePoolList.txt
isi version >> /ifs/data/Isilon_Support/emc_billing/ArrayIsiVersion.txt
tar -czvf /ifs/data/Isilon_Support/ISILON_${host}_${guid}_${today}.tar.gz /ifs/data/Isilon_Support/emc_billing/
isi_gather_info --esrs --nologs -f /ifs/data/Isilon_Support/ISILON_${host}_${guid}_${today}.tar.gz
if you want this to run automatically
add this entry to /etc/mcp/override/crontab.smbtime
today=`date +%Y-%m-%d_%H-%M-%S`
host=`hostname | rev | cut -c3- | rev`
guid=`python -c "import isi.config.arrcfg as ac;cfg = ac.config_load(); print cfg.guid"`
echo " " > /ifs/data/Isilon_Support/emc_billing/NodeIsiSnapshotsView.txt
echo " " > /ifs/data/Isilon_Support/emc_billing/NodeIsiQuotaList.txt
echo " " > /ifs/data/Isilon_Support/emc_billing/NodeIsiDedupeStats.txt
echo " " > /ifs/data/Isilon_Support/emc_billing/NodeDisiDiskpoolsList.txt
echo " " > /ifs/data/Isilon_Support/emc_billing/SysCtl-DiskPoolDB.txt
echo " " > /ifs/data/Isilon_Support/emc_billing/ArrayIsiStatus.txt
echo " " > /ifs/data/Isilon_Support/emc_billing/ArrayIsiHWStatus.txt
echo " " > /ifs/data/Isilon_Support/emc_billing/ArrayNodeSerials.txt
echo " " > /ifs/data/Isilon_Support/emc_billing/NodeIsiStoragePoolList.txt
echo " " > /ifs/data/Isilon_Support/emc_billing/ArrayIsiVersion.txt
isi snapshot snapshots list | awk '/\d+/ {print $1}' | xargs -L 1 isi snapshot snapshots view >> /ifs/data/Isilon_Support/emc_billing/NodeIsiSnapshotsView.txt
isi quota list >> /ifs/data/Isilon_Support/emc_billing/NodeIsiQuotaList.txt
isi dedupe stats >> /ifs/data/Isilon_Support/emc_billing/NodeIsiDedupeStats.txt
disi -I diskpools list >> /ifs/data/Isilon_Support/emc_billing/NodeDisiDiskpoolsList.txt
/sbin/sysctl efs.bam.disk_pool_db >> /ifs/data/Isilon_Support/emc_billing/SysCtl-DiskPoolDB.txt
isi_for_array -s isi status >> /ifs/data/Isilon_Support/emc_billing/ArrayIsiStatus.txt
isi_for_array -s isi_hw_status >> /ifs/data/Isilon_Support/emc_billing/ArrayIsiHWStatus.txt
isi_for_array isi_hw_status | grep SerNo >> /ifs/data/Isilon_Support/emc_billing/ArrayNodeSerials.txt
isi storagepool list >> /ifs/data/Isilon_Support/emc_billing/NodeIsiStoragePoolList.txt
isi version >> /ifs/data/Isilon_Support/emc_billing/ArrayIsiVersion.txt
tar -czvf /ifs/data/Isilon_Support/ISILON_${host}_${guid}_${today}.tar.gz /ifs/data/Isilon_Support/emc_billing/
isi_gather_info --esrs --nologs -f /ifs/data/Isilon_Support/ISILON_${host}_${guid}_${today}.tar.gz
if you want this to run automatically
add this entry to /etc/mcp/override/crontab.smbtime
Code: Select all
5 11 * * * root /usr/bin/isi_ropc "sh /ifs/data/Isilon_Support/emcbilling.sh"