Difference between revisions of "SQWareProduction:mssql:lib:sqwmsq GatherIndicators.lib"

From Wiki_dbSQWare
Jump to: navigation, search
m (Updated by Expdbtools)
 
m (Updated by BatchUser)
 
(19 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Librairie de fonctions shell $gvsqw_MssBin/../lib/sqwmsq_GatherIndicators.lib:<br>
+
shell functions library $gvsqw_MsqBin/../lib/sqwmsq_GatherIndicators.lib:<br>
lib for sqwmsq_GatherIndicators.ksh
+
{{SQWareProduction_sqwmsq_GatherIndicators.lib_presentation}}
 
<br>
 
<br>
echo "lfsqw_SizeInstance=$lfsqw_SizeInstance\nNbDatabases=$NbDatabases">${gvsqw_TmpFile}.size
+
Functions explanation:
echo "values @Gather_date,'$lvsqw_InstanceParam',$lfsqw_SizeInstance,'$gvsqw_MajorVersion','$VersionPatch',$NbDatabases"
+
<pre>
gfsqw_InsertIndicators "archive"
+
gfsqw_BeginningCom
grep "lfsqw_SizeInstance=" ${gvsqw_TmpFile}.size|cut -d= -f2|read lfsqw_SizeInstance
+
gfsqw_ConvertBackslashToSlash $gvsqw_TmpFile.drivesraw
lfsqw_Archivage
+
gfsqw_ExecSql ${gvsqw_TmpFile}.sql 2>&1 > ${gvsqw_TmpFile}
 +
gfsqw_ExecSql $gvsqw_TmpFile.sql 2>&1 |grep -iv Password|sed 's,  *$,,g'|sed 's,^  *,,g'|tr -d '\r' |tr '\t' ' '|sed 's,  *, ,g' > ${gvsqw_TmpFile}
 +
gfsqw_ExecSql $gvsqw_TmpFile.sql 2>&1 |grep -iv Password|tr '\t' ' '|sed 's, *$,,g'|sed 's,^  *,,g' > ${gvsqw_TmpFile}
 +
gfsqw_ExecSql $gvsqw_TmpFile.sql 2>&1 |sed 's,\\,/,g'|sed 's,^  *,,g'|tr '\t' ' '|sed 's,  *$,,g' |tee $gvsqw_TmpFile
 +
gfsqw_ExecSql "sp_helpdb" 2>&1 > ${gvsqw_TmpFile}
 +
gfsqw_ExecXpCmdShell $gvsqw_TmpFile.drives|tr -d '\r'| tr -s ' '| sed 's,  *$,,' > $gvsqw_TmpFile.drivesraw
 +
gfsqw_GatherHostInfosGenInsert
 +
gfsqw_GenDatabasesList|sed 's,\\,,g' > $gvsqw_TmpFile.lst
 +
gfsqw_InsertChanges
 +
gfsqw_InsertIndicators "Alert"
 +
gfsqw_InsertIndicators "archivingDb"
 +
gfsqw_InsertIndicators "Del Tables"
 +
gfsqw_InsertIndicators "DrivesOle"
 +
gfsqw_InsertIndicators "DrivesWmic"
 +
gfsqw_InsertIndicators "Instance"
 +
gfsqw_InsertIndicators "JobStats"
 +
gfsqw_InsertIndicators "JobStatsMonth"
 +
gfsqw_InsertIndicators "License"
 +
gfsqw_InsertIndicators "LinkedServers"
 +
gfsqw_InsertIndicators "Parameters"
 +
gfsqw_IsXpCmdShellEnabledGlobal "sqwmsq_GatherIndicators.ksh $gvsqw_InputParameters"
 +
gfsqw_PurgeLogDirAndFiles
 +
gfsqw_XpCmdShellGlobalDisable
 +
lfsqw_Archiving
 +
lfsqw_ArchivingDb =>
 +
lfsqw_ArchivingParameters
 +
lfsqw_Backups
 +
lfsqw_Backups =>
 +
lfsqw_GatherAlertLogFile
 +
lfsqw_GatherAlertLogFile =>
 +
lfsqw_GatherDatabases
 +
lfsqw_GatherDatabases =>
 +
lfsqw_GatherDrives
 +
lfsqw_GatherDrives =>
 +
lfsqw_GatherDrivesOle =>
 +
lfsqw_GatherDrivesWmic
 +
lfsqw_GatherDrivesWmic =>
 +
lfsqw_GatherHostInfos
 +
lfsqw_GatherHostInfos =>
 +
lfsqw_GatherInstance
 +
lfsqw_GatherInstance =>
 +
lfsqw_GatherOverLoaded
 +
lfsqw_GatherSpace =>
 +
lfsqw_GatherSpace_old =>
 +
lfsqw_GatherTables
 +
lfsqw_GatherTables =>
 +
lfsqw_GatherUsers
 +
lfsqw_GatherUsers =>
 
lfsqw_GenerateInsertAlert
 
lfsqw_GenerateInsertAlert
lfsqw_GenInsertDatabases
+
lfsqw_GenInsertDatabases =>
lfsqw_GenInsertDataserver
+
lfsqw_GenInsertInstance =>
lfsqw_GenInsertSpace
+
lfsqw_GenInsertInstance> ${gvsqw_TmpFile}.sql
lfsqw_SizeInstance=0
+
lfsqw_GenInsertLicense =>
        lfsqw_SizeInstance=lfsqw_SizeInstance+Size_db
+
lfsqw_GenInsertLicense|tee ${gvsqw_TmpFile}.sql
lfsqw_SqlInsertSpace
+
lfsqw_GenInsertParameters =>
 +
lfsqw_GenInsertParameters> ${gvsqw_TmpFile}.sql
 +
lfsqw_GenInsertSpace =>
 +
lfsqw_Jobs
 +
lfsqw_Jobs =>
 +
lfsqw_License
 +
lfsqw_License =>
 +
lfsqw_LinkedServers
 +
lfsqw_LinkedServers =>
 +
lfsqw_Main =>
 +
lfsqw_Parameters
 +
lfsqw_Parameters =>
 +
lfsqw_PostArchivingParameters
 +
lfsqw_SqlInsertSpace =>
 +
lfsqw_SqlInsertSpace >> ${gvsqw_TmpFile}.sql
 +
</pre>
 
<br>
 
<br>
{{SQWareProductionSurchargeLib|mssql|Mss|sqwmsq_GatherIndicators.lib}}
+
{{SQWareProductionSurchargeLib|mssql|Msq|sqwmsq_GatherIndicators.lib}}
 
<br>
 
<br>

Latest revision as of 17:46, 21 July 2024

shell functions library $gvsqw_MsqBin/../lib/sqwmsq_GatherIndicators.lib:
lib for sqwmsq_GatherIndicators.ksh
Functions explanation:

gfsqw_BeginningCom
gfsqw_ConvertBackslashToSlash $gvsqw_TmpFile.drivesraw
gfsqw_ExecSql ${gvsqw_TmpFile}.sql 2>&1 > ${gvsqw_TmpFile}
gfsqw_ExecSql $gvsqw_TmpFile.sql 2>&1 |grep -iv Password|sed 's,  *$,,g'|sed 's,^  *,,g'|tr -d '\r' |tr '\t' ' '|sed 's,  *, ,g' > ${gvsqw_TmpFile}
gfsqw_ExecSql $gvsqw_TmpFile.sql 2>&1 |grep -iv Password|tr '\t' ' '|sed 's,  *$,,g'|sed 's,^  *,,g' > ${gvsqw_TmpFile}
gfsqw_ExecSql $gvsqw_TmpFile.sql 2>&1 |sed 's,\\,/,g'|sed 's,^  *,,g'|tr '\t' ' '|sed 's,  *$,,g' |tee $gvsqw_TmpFile
gfsqw_ExecSql "sp_helpdb" 2>&1 > ${gvsqw_TmpFile}
gfsqw_ExecXpCmdShell $gvsqw_TmpFile.drives|tr -d '\r'| tr -s ' '| sed 's,  *$,,' > $gvsqw_TmpFile.drivesraw
gfsqw_GatherHostInfosGenInsert
gfsqw_GenDatabasesList|sed 's,\\,,g' > $gvsqw_TmpFile.lst
gfsqw_InsertChanges
gfsqw_InsertIndicators "Alert"
gfsqw_InsertIndicators "archivingDb"
gfsqw_InsertIndicators "Del Tables"
gfsqw_InsertIndicators "DrivesOle"
gfsqw_InsertIndicators "DrivesWmic"
gfsqw_InsertIndicators "Instance"
gfsqw_InsertIndicators "JobStats"
gfsqw_InsertIndicators "JobStatsMonth"
gfsqw_InsertIndicators "License"
gfsqw_InsertIndicators "LinkedServers"
gfsqw_InsertIndicators "Parameters"
gfsqw_IsXpCmdShellEnabledGlobal "sqwmsq_GatherIndicators.ksh $gvsqw_InputParameters"
gfsqw_PurgeLogDirAndFiles
gfsqw_XpCmdShellGlobalDisable
lfsqw_Archiving
lfsqw_ArchivingDb => 
lfsqw_ArchivingParameters
lfsqw_Backups
lfsqw_Backups => 
lfsqw_GatherAlertLogFile
lfsqw_GatherAlertLogFile => 
lfsqw_GatherDatabases
lfsqw_GatherDatabases => 
lfsqw_GatherDrives
lfsqw_GatherDrives => 
lfsqw_GatherDrivesOle => 
lfsqw_GatherDrivesWmic
lfsqw_GatherDrivesWmic => 
lfsqw_GatherHostInfos
lfsqw_GatherHostInfos => 
lfsqw_GatherInstance
lfsqw_GatherInstance => 
lfsqw_GatherOverLoaded
lfsqw_GatherSpace => 
lfsqw_GatherSpace_old => 
lfsqw_GatherTables
lfsqw_GatherTables => 
lfsqw_GatherUsers
lfsqw_GatherUsers => 
lfsqw_GenerateInsertAlert
lfsqw_GenInsertDatabases => 
lfsqw_GenInsertInstance => 
lfsqw_GenInsertInstance> ${gvsqw_TmpFile}.sql
lfsqw_GenInsertLicense => 
lfsqw_GenInsertLicense|tee ${gvsqw_TmpFile}.sql
lfsqw_GenInsertParameters => 
lfsqw_GenInsertParameters> ${gvsqw_TmpFile}.sql
lfsqw_GenInsertSpace => 
lfsqw_Jobs
lfsqw_Jobs => 
lfsqw_License
lfsqw_License => 
lfsqw_LinkedServers
lfsqw_LinkedServers => 
lfsqw_Main => 
lfsqw_Parameters
lfsqw_Parameters => 
lfsqw_PostArchivingParameters
lfsqw_SqlInsertSpace => 
lfsqw_SqlInsertSpace >> ${gvsqw_TmpFile}.sql


Nuvola apps information.png
Note:
You can overload functions contained in $gvsqw_MsqBin/../lib/sqwmsq_GatherIndicators.lib

by function with same name in $gvsqw_MsqBin/../lib_cust/sqwmsq_GatherIndicators.lib for all your environnement
or by $HOME/sqwConfig/sqwmsq_GatherIndicators.lib specifically for this user .