Download Installing the Greenplum Command Center Console

Document related concepts

Microsoft SQL Server wikipedia , lookup

Entity–attribute–value model wikipedia , lookup

Database wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Navitaire Inc v Easyjet Airline Co. and BulletProof Technologies, Inc. wikipedia , lookup

Functional Database Model wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

Relational model wikipedia , lookup

Clusterpoint wikipedia , lookup

Database model wikipedia , lookup

Transcript
TableofContents
TableofContents
Overview
SettingUpGreenplumCommandCenter
DataComputingAppliance(DCA)Environments
GreenplumDatabaseSoftwareEnvironments
EnablingtheDataCollectionAgents
InstallingtheGreenplumCommandCenterConsole
AbouttheCommandCenterInstallation
ConnectingtotheGreenplumCommandCenterConsole
ConfiguringAuthenticationfortheCommandCenterConsole
SettingUpSecureTwo-WayAuthenticationforGreenplumCommandCenter
EnablingMulti-ClusterSupport
UpgradingGreenplumCommandCenter
RunningGreenplumCommandCenter2.xinParallelWith3.x
UninstallingGreenplumCommandCenter
AdministeringGreenplumCommandCenter
StartingandStoppingGreenplumCommandCenter
ConfiguringGreenplumCommandCenter
AdministeringCommandCenterAgents
AdministeringtheCommandCenterDatabase
AdministeringtheWebServer
UtilityReference
gpperfmon_install
gpcmdr
ConfigurationFileReference
CommandCenterAgentParameters
CommandCenterConsoleParameters
SetupConfigurationFile
GreenplumDatabaseServerConfigurationParameters
CommandCenterDatabaseReference
database_*
emcconnect_history
diskspace_*
filerep_*
health_*
interface_stats_*
iterators_*
IteratorMetrics
log_alert_*
queries_*
segment_*
socket_stats_*
system_*
tcp_stats_*
udp_stats_*
iterators_*_rollup
dynamic_memory_info
memory_info
©CopyrightPivotalSoftwareInc,2013-2016
1
1
3
6
7
8
9
11
15
16
17
19
26
27
29
31
32
33
34
35
36
37
38
39
41
43
44
46
47
49
50
51
52
53
54
58
59
60
64
75
77
79
80
81
82
83
84
87
88
3.0
©CopyrightPivotalSoftwareInc,2013-2016
2
3.0
Overview
PivotalGreenplumCommandCenterisamanagementtoolfortheGreenplumBigDataPlatform.ThissectionintroduceskeyconceptsaboutGreenplum
CommandCenteranditscomponents.
Introduction
GreenplumCommandCentermonitorssystemperformancemetrics,analyzessystemhealth,andallowsadministratorstoperformsomemanagement
tasksinaGreenplumenvironment.TheGreenplumCommandCenterConsoleisaninteractivegraphicalwebapplicationthatmaybeinstalledonaweb
serveronthemasterhost.UsersviewandinteractwiththecollectedGreenplumsystemdatathroughthisapplication.
GreenplumCommandCenteriscomprisedofdatacollectionagentsthatrunonthemasterhostandeachsegmenthost.Theagentscollectdataabout
queriesandsystemutilizationandsendittotheGreenplummasterhostatregularintervals.GreenplumCommandCenterstoresitsdataandmetricsina
dedicatedGreenplumdatabase(theCommandCenterdatabase,gpperfmon)whoseinformationisdistributedamongthemasterhostandsegment
hosts,likeanyotherGreenplumDatabase.YoucanaccessthedatastoredintheCommandCenterdatabasethroughtheGreenplumCommandCenter
ConsoleandthroughSQLqueries.
Note:CommandCenterrequiresGreenplumDatabasetooperatebecauseCommandCenterstoresitsinformationinaGreenplumdatabase.
SupportedGreenplumPlatforms
GreenplumCommandCenteriscurrentlycertifiedfortheGreenplumDataComputingAppliance(DCA)andGreenplumDatabasesoftware-only
environments.CommandCentermonitorsthefollowingforeachenvironment:
GreenplumDataComputingAlliance:
GreenplumDatabaseModule
GreenplumDatabase(software-onlyenvironments):
GreenplumDatabase
SeetheReleaseNotesforyourGreenplumCommandCenterreleaseforinformationaboutthesupportedsoftwareandhardwareversions.
Architecture
ThefollowingfigureillustratestheGreenplumCommandCenterarchitecture.
©CopyrightPivotalSoftwareInc,2013-2016
3
3.0
GreenplumDataCollectionAgents
GreenplumdatacollectionagentsrunonGreenplumsegmenthoststocollectthequeryandsystemstatisticstobedisplayedintheCommandCenter.
TheagentsareinstalledwiththeGreenplumDatabasedistributionbutarenotenableduntilyoucreatetheGreenplumCommandCenterdatabase
(gpperfmon)andstartthem.Theagentsmayalsobeenabledordisabledbysettingthe gp_enable_gpperfmon serverconfigurationparameter.Whenthis
parameterisenabled,thedatacollectionagentsrunonallGreenplumhosts(masterandsegments),andstartandstopalongwithGreenplumDatabase
serverprocesses.
Themasteragentpollsallsegmentagentsforsystemmetricsandotherdataataconfigurableinterval(calledthequantum).Themasteragentamasses
thedatafromallsegments,storesitinflatfiles,andperiodicallycommitsthedatainthefilestotheGreenplumCommandCenterdatabase.
GreenplumCommandCenterDatabase
TheGreenplumCommandCenterdatabase(gpperfmon)isadatabasewithinyourGreenplumsystemdedicatedtostoringandservingsystemdata.Your
GreenplumDatabaseinstallationincludesthe gpperfmon_install utilitytoinstalltheCommandCenterdatabaseandoptionallystartthedatacollection
agents.
WhenthisdocumentreferstotheCommandCenterdatabase,itisreferringtothedatabasenamedgpperfmon.
GreenplumadministratorscanconnecttotheCommandCenterdatabaseusingclientprogramssuchaspsqlorapplicationprogramminginterfaces
(APIs)suchasJDBC(JavaDatabaseConnectivity)andODBC(OpenDatabaseConnectivity).AdministratorscanalsousetheGreenplumCommandCenter
Consoletoviewreportsoncurrentandhistoricalperformanceandperformothermanagementtasks.
TheCommandCenterdatabaseconsistsofthreesetsoftables;nowtablesstoredataoncurrentsystemmetricssuchasactivequeries,historytables
storedataonhistoricalmetrics,andtailtablesarefordataintransition.Tailtablesareforinternaluseonlyandshouldnotbequeriedbyusers.Thenow
andtaildataarestoredastextfilesonthemasterhostfilesystem,andtheCommandCenterdatabaseaccessesthemviaexternaltables.Thehistory
tablesareregulardatabasetablesstoredwithintheCommandCenter(gpperfmon)database.SeeCommandCenterDatabaseReferencefortheschema
definitionsofthesetables.
GreenplumCommandCenterConsole
GreenplumCommandCenterprovidesabrowser-nativeHTML5graphicalconsoleforviewingGreenplumDatabasesystemmetricsandperforming
certaindatabaseadministrativetasks.Thisbrowser-basedapplicationprovidesthefollowingfunctionality:
Interactiveoverviewofrealtimesystemmetrics
Detailedrealtimestatisticsfortheclusterandbyserver
QueryMonitorviewlistsqueriesexecutingandwaitingtoexecute
Selectaquerytoviewquerytextandexplainplan
Adminsandoperatorscancancelexecutingqueries
HostMetricsviewlistsrealtimeCPU,memory,andIOmetrics,includingcalculatedskew,byhost
ClusterMetricsviewshowssynchronizedchartsofhistoricalsystemmetrics
Historyviewlistscompletedqueriesandsystemmetricsplottedoveraselectedtimeperiod
Selectaquerytoviewquerytextandexplainplan
SegmentStatusviewwithsummariesanddetailsbysegment
StorageStatusviewwithsummariesanddetailsbysegmentdatadirectory
IfyouhavemultipleGreenplumenvironments,youcancreateseparateCommandCenterinstancesforthem.Eachseparateconsoleinstanceoperateson
auniqueportandhasitsownuniqueconfigurationoptions.Formoreinformation,seeInstallingtheGreenplumCommandCenterConsole.
GreenplumCommandCenterWebService
TheGreenplumCommandCenterConsolequeriestheCommandCenterdatabasethroughawebserviceframeworkcomposedofalightweightgo-based
webserver.
Theconsolesetuputility, gpcmdr ,setsupthewebserverandwebservice,promptingyouforbasicconfigurationinformationonthedesiredportandSSL
options.Undernormalconditions,thewebserverandwebserviceAPIrequireminimalmaintenanceandadministration,asdescribedinWebServer
©CopyrightPivotalSoftwareInc,2013-2016
4
3.0
Administration.
©CopyrightPivotalSoftwareInc,2013-2016
5
3.0
SettingUpGreenplumCommandCenter
Note:TheGreenplumWorkloadManagerinstallerisincludedintheGreenplumCommandCenterinstaller.InstallWorkloadManagerusingitsbundled
installer.SeetheGreenplumWorkloadManagerUserGuideforinstructionstoruntheGreenplumWorkloadManagerinstaller.
InformationaboutinstallingandsettingupPivotalGreenplumCommandCenter:
DataComputingAppliance(DCA)Environments
GreenplumDatabaseSoftwareEnvironments
EnablingtheDataCollectionAgents
InstallingtheGreenplumCommandCenterConsole
AbouttheCommandCenterInstallation
ConnectingtotheGreenplumCommandCenterConsole
ConfiguringAuthenticationfortheCommandCenterConsole
EnablingMulti-ClusterSupport
UpgradingGreenplumCommandCenter
UninstallingGreenplumCommandCenter
©CopyrightPivotalSoftwareInc,2013-2016
6
3.0
DataComputingAppliance(DCA)Environments
PivotalGreenplumCommandCenteriscompatiblewiththeDataCommputingAppliance(DCA),versions1.2.x,2.x,and3.x.
PleasevisitPivotalNetwork
todownoadaninstallerforthemostrecent3.xversionforyouDCA.
©CopyrightPivotalSoftwareInc,2013-2016
7
3.0
GreenplumDatabaseSoftwareEnvironments
InstallingandenablingGreenplumCommandCenterisatwo-stepprocess.Fortheveryfirstinstall,runthe gpperfmon_install utilitytocreatethe
GreenplumCommandCenterdatabase(gpperfmon)andenablethedatacollectionagentswithinyourGreenplumsystem.
Onceyouhaveagpperfmondatabaseanddatacollectionisenabled,installandconfiguretheGreenplumCommandCenterConsole(theWeb
applicationusedtoviewthegpperfmondatastoredinGreenplumDatabase).
GreenplumCommandCentersoftwareforGreenplumDatabaseDCAandsoftware-onlyenvironmentsisavailableasaseparatedownloadfromPivotal
Network .TheinstallerfilesupportsRedHatEnterpriseLinuxandSLES64-bitplatforms.
©CopyrightPivotalSoftwareInc,2013-2016
8
3.0
EnablingtheDataCollectionAgents
ThissectiondescribeshowtocreatetheCommandCenterdatabaseandenabletheCommandCenterdatacollectionagents.Whenthedatacollection
agentsareenabled,theirprocessesarestartedandstoppedalongwiththeGreenplumDatabaseserverprocesses(using gpstart and gpstop ).
Greenplumprovidesa gpperfmon_install utilitythatperformsthefollowingtasks:
CreatestheCommandCenterdatabase(gpperfmon).
CreatestheCommandCentersuperuserrole( gpmon ).
ConfiguresGreenplumDatabaseservertoacceptconnectionsfromtheCommandCentersuperuserrole(editsthe pg_hba.conf and .pgpass files).
SetstheCommandCenterserverconfigurationparametersintheGreenplumDatabaseserver postgresql.conf files.
ToenabletheCollectionAgents
1. LogintotheGreenplummasterhostasthe gpadmin user.
$su-gpadmin
2. Sourcethepathfilefromyourmasterhost’sGreenplumDatabaseinstallationdirectory:
#source/usr/local/greenplum-db/greenplum_path.sh
3. Runthe gpperfmon_install utilitywiththe --enable option.YoumustsupplytheconnectionportoftheGreenplumDatabasemasterserverprocess,
andsetthepasswordforthe gpmon superuserthatwillbecreated.Forexample:
$gpperfmon_install--enable--passwordchangeme--port5432
Note:
The gperfmon_install utilityaddsthe gpmon usertothe pg_hba.conf authorizationconfigurationfilewithanentrythatpermitslocalconnectionsto
anydatabase.Sincethe gpmon roleisaGreenplumDatabasesuperuser,youmaywishtorestricttheroletojustthegpperfmondatabaseafteryou
run gpperfmon_install .Editthe $MASTER_DATA_DIRECTORY/pg_hba.conf fileandchangethisline:
hostallgpmon127.0.0.1/28md5
tothefollowing:
hostgpperfmongpmon127.0.0.1/28md5
4. Whentheutilitycompletes,restartGreenplumDatabaseserver.Thedatacollectionagentswillnotstartuntilthedatabaseisrestarted.
$gpstop-r
5. Usingthe ps command,verifythatthedatacollectionprocessisrunningontheGreenplummaster.Forexample:
$ps-ef|grepgpmmon
6. RunthefollowingcommandtoverifythatthedatacollectionprocessesarewritingtotheCommandCenterdatabase.Ifallofthesegmentdata
collectionagentsarerunning,youshouldseeonerowpersegmenthost.
$psqlgpperfmon-c'SELECT*FROMsystem_now;'
Thedatacollectionagentsarenowrunning,andyourGreenplumsystemnowhasagpperfmondatabaseinstalled.ThisisthedatabasewhereCommand
Centerdataisstored.Youcanconnecttoitasfollows:
$psqlgpperfmon
©CopyrightPivotalSoftwareInc,2013-2016
9
3.0
Toconfigureastandbymasterhost(ifenabled)
1. Copythe $MASTER_DATA_DIRECTORY/pg_hba.conf filefromyourprimarymasterhosttoyourstandbymasterhost.Thisensuresthattherequired
connectionoptionsarealsosetonthestandbymaster.
2. Copyyour ~/.pgpass filefromyourprimarymasterhosttoyourstandbymasterhost.Thisfileusuallyresidesinthe gpadmin user’shome
directory.Notethatthepermissionson .pgpass mustbesetto600(forexample: chmod 0600 ~/.pgpass ).
©CopyrightPivotalSoftwareInc,2013-2016
10
3.0
InstallingtheGreenplumCommandCenterConsole
TheCommandCenterConsoleprovidesagraphicalinterfaceforviewingperformancedataandforadministeringcertainaspectsofyourGreenplum
system.
TheCommandCenterConsoleistypicallyinstalledontheGreenplumDatabasemasterhost.However,youhavetheoptiontoinstalltheconsoleona
hostdifferentfromthemasterhost.Notethatthissetupincursaperformancepenaltyduetothenumerousdatabaseconnectionstheconsolemustopen
overthenetwork.
IfyouhavemultipleGreenplumDatabaseinstances,youcancreateseparateCommandCenterConsoleinstancesforeachofthem.Eachseparateconsole
instanceoperatesonauniqueportandhasitsownuniqueconfigurationoptions.
TheCommandCenterConsolesupportscurrentbrowserversionsofChrome,Safari,Firefox,andInternetExplorer.
TheCommandCenterConsolerunsonthegpmonwswebserver.Thedefaultwebserverportis28080.Formoreinformationaboutthewebserver,see
WebServerAdministration.
InstallingtheCommandCenterConsoleinvolvesthefollowinghigh-leveltasks:
InstalltheCommandCenterConsoleSoftware–Createthesoftwareinstallationdirectory.
SetUptheCommandCenterConsoleInstance–SetuptheenvironmentvariablesandthencreateandconfigureaCommandCenterConsoleinstance
anditssupportingwebservices.
InstalltheCommandCenterConsoleSoftware
IfyouareinstallingtheCommandCenterConsoleonaremotesystem(thatis,notthesamesystemonwhichyouinstalledGreenplumDatabase),you
mustalsoinstallGreenplumDatabaseinstallationbinaryfilesontheremotesystem.Afterinstallingthebinaryfiles,source greenplum_path.sh ,then
performtheConsoleinstallationstepsdescribedbelow.Notethatyoudonotneedtoinitializethedatabase.SeetheGreenplumDatabaseInstallation
Guideformoreinformation.
1. DownloadtheinstallerfilefromPivotalNetwork
.InstallerfilesareavailableforLinux64-bitplatforms.
2. Unziptheinstallerfile:
#unzipgreenplum-cc-web-3.X.X-LINUX-x86_64.zip
3. Loginas gpadmin .
4. Launchtheinstallerusing bash .Forexample:
$/bin/bashgreenplum-cc-web-3.X.X-LINUX.bin
5. Readthroughthelicenseagreement.Whenyoureachthebottom,type yes toacceptthelicenseagreement.
6. Theinstallerpromptsyoutoprovideaninstallationpath.PressEntertoacceptthedefaultinstallpath( /usr/local/greenplum-cc-web-X.X.X ),orenteran
absolutepathtoaninstalllocation.Youmusthavewritepermissionstothelocationyouspecify.
7. Oncetheinstallationhascompletedsuccessfully,createahostfilelistingallremaininghostnames,includingthestandbymasterhost.Donot
includethenameofthehostwhereyourantheinstaller.HostnamesmustbeDNSresolvable.
8. Theinstallationdirectorycontainsa gpcc_path.sh filewithpathandenvironmentsettingsfortheConsole.SourcethisandtheGreenplumpath,as
follows:
$source/usr/local/greenplum-db/greenplum_path.sh
$source/usr/local/greenplum-cc-web/gpcc_path.sh
Note:
Ifyouhaveperformedthepreviousstepsasanyuserotherthan gpadmin ,youneedtochangeownershipandpermissionstotheinstallation
directorybeforeyoucontinue.
Changetheownershipoftheinstallationdirectory:
$chown-Rgpadmin:gpadmingreenplum-cc-web-X.X.X
©CopyrightPivotalSoftwareInc,2013-2016
11
3.0
Changethepermissionsoftheinstallationdirectory:
$chmod-R755greenplum-cc-web-X.X.X
9. As gpadmin ,runthe gpccinstall utilitytoinstallCommandCenteronallhostslistedinthehostfileyoucreated.
$gpccinstall-fhostfilename
where hostfilename isthenameofthehostfileyoucreatedearlierinthisprocedure.
10. ConfiguretheConsoleasdescribedinSetUptheCommandCenterConsoleInstance.
SetUptheCommandCenterEnvironment
FollowthestepsbelowtosetuptheGreenplumCommandCenterenvironmentforthe gpadmin user.
1. Addthe GPPERFMONHOME environmentvariabletoyourstartupshellprofile(suchas ~/.bashrc ).SetthevariabletotheGreenplumCommand
Centerhomedirectory. preGPPERFMONHOME=/usr/local/greenplum-cc-websource$GPPERFMONHOME/gpcc_path.sh
Ensurethatthe $GPPERFMONHOME/gpcc_path.sh filehasentriesforthe greenplum_path.sh fileandthe MASTER_DATA_DIRECTORY environment
variable.SeetheGreenplumDatabaseInstallationGuidefordetails.
2. Saveandsourcethe .bashrc file: shell$source~/.bashrc
SetUptheCommandCenterConsoleInstance
ACommandCenterinstanceisaconnectiontoaGreenplumDatabasecluster.The gpcmdr--
commandsetsuptheCommandCenterConsole.The
setup
commandcanberuninteractively,oryoucancreateaninstallationconfigurationfiletoruntheinstallationnon-interactively.Whenyouusea
configurationfile,youcancreatemultipleCommandCenterinstancesatonce.
CommandCenterinstancesaretypicallysetupontheGreenplummasterhost;ifinstalledonanotherhost,theconsoleexperiencesslowerperformance
duetofrequentconnectionstothegpperfmondatabase.
Configurationfiles,logfiles,andruntimefilesforeachCommandCenterinstancearemanagedinasubdirectoryofthe $GPPERFMON/instances directory.
AcquireorCreateanSSLCertificate(Optional)
CreateaGreenplumCommandCenterInstance
AcquireorCreateanSSLCertificate(Optional)
ItisrecommendedthatyouenableSSLforthelighttpdWebserverthatservestheCommandCenterConsole.SSLensuresthatclientconnectionstothe
GreenplumCommandCenterarenegotiatedsecurelyandencrypted.ToenableSSL,youwillneedaservercertificateforthewebserver.
Youcanuseanexistingcertificateanddhparamfileoryoucancreateaself-signedcertificateandadhparamfilewhenyousetupaCommandCenter
Consoleinstance.Ifyouuseaself-signedcertificate,CommandCenteruserswillhavetoexplicitlyoverrideanexceptionwhentheyfirstbrowsetothe
ControlCenterURL,sincethecertificateisnotsignedbyatrustedCA.However,theconnectionisstilleffectivelyencrypted.
Ideally,youshouldacquireasignedcertificatefromacommercialCertificateAuthorityoryourorganization’sinternalCertificateAuthority.Ifyoualready
haveacertificateanddhparamfile,installthemontheserverwhereGPCCisinstalled,forexampleinthe /etc/ssl/certs directory.Thenyoucanchooseto
importthemwhenyoucreateaControlCenterinstance.
IfyouwanttoenableSSLinanexistingControlCenterinstance,youcancreatethecertificatefileyourselfandaddtheSSLparameterstothe
instances/instance-name/conf/app.conf file
ThisistherecommendedSSLconfigurationforthegpmonwswebserver:
©CopyrightPivotalSoftwareInc,2013-2016
12
3.0
ssl.engine="enable"
ssl.pemfile="/path/to/cert.pem"
ssl.ec-curve="secp384r1"
ssl.use-sslv2="disable"
ssl.use-sslv3="disable"
ssl.honor-cipher-order="enable"
ssl.use-compression="disable"
ssl.cipher-list="EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"
Thefollowingexamplecreatescertificateanddhparamfilesinthe /etc/ssl/certs directory.Notethatbecausethecertificateisself-signed,userswillhave
tooverridetheSSLexceptiontoproceedtotheControlCenter.Performthesestepsas root .
1. CreateacertificatefortheWebserver.
#cd/etc/ssl/certs
#opensslreq-newkeyrsa:2048-x509-keyoutcert.pem-outcert.pem-days3650-nodes
2. Entertherequesteddistinguishedname(DN)informationatthepromptstocreateanunsignedcertificate.Forexample:
CountryName(2lettercode)[XX]:US
StateorProvinceName(fullname)[Berkshire]:California
LocalityName(eg,city)[Newbury]:PaloAlto
OrganizationName(eg,company)[MyCompanyLtd]:PivotalSoftware,Inc.
OrganizationalUnitName(eg,section)[]:
CommonName(eg,yournameoryourserver'shostname)[]:mdw
EmailAddress[]:
CreatetheGreenplumCommandCenterInstance
Followthestepsbelowtorunthe gpcmdr--
commandtocreateaninstance.Toacceptthedisplayeddefaultvaluesforanyparametersat
setup
configurationtime,presstheENTERkey.Tomonitormultipleinstances,runthesetuputilityseparatelyforeachinstance.
1. LoginastheGreenplumadministrator( gpadmin ).
2. WiththeGreenplumDatabaseinstancerunning,launchthesetuputility.Forexample:
$gpcmdr--setup
3. ProvideaninstancenamefortheGreenplumDatabaseinstancemonitoredbythisConsole.
4. Provideadisplaynamefortheinstance.ThisnameisshownintheConsoleuserinterface.Thispromptdoesnotappearifthemasterhostis
remote.4.
5. Select y or n tospecifyiftheGreenplumDatabasemasterforthisinstanceisonaremotehost.NotethatConsoleperformanceisbetterwhenthe
ConsoleandGreenplumDatabasemasterareonthesamehost.Ifthemasterhostisremote,enter y andenterthehostnameorIPaddressofthe
masterattheprompt.
6. ProvidetheportnumberfortheGreenplumDatabasemasterinstance.
7. ProvideaportnumberfortheCommandCenterConsolewebserver.Thedefaultis28080.
8. Enter y toenableSSLconnectionsfortheCommandCenterConsole,or n ifyoudonotwantSSL.
Note:Becausedatabaselogininformationissentoverthenetwork,werecommendyouuseSSLtoencryptthesecommunications.
IfyouchoosetoenableSSL:
a. Youareaskedifyouwanttoimportacertificatefile.Ifyouhaveacertificateyouwanttouse,enter y ,thenenterthefullpathtothe
certificatefile.Thepathyouenterisaddedtothe app.conf file.
b. Ifyoudidnotimportacertificate, gpcmdr generatesaprivatekeyandthenpromptsyoutoentertheDistinguishedNameinformationneeded
togenerateaCertificateSigningRequest(CSR).Forexample:
CountryName(2lettercode)[GB]:US
StateorProvinceName(fullname)[]:California
LocalityName(eg,city)[DefaultCity]:PaloAlto
OrganizationName(eg,company)[MyCompanyLtd]:PivotalSoftware,Inc.
OrganizationalUnitName(eg,section)[]:
CommonName(eg,yournameoryourserver'shostname)[]:mdw
EmailAddress[]:
©CopyrightPivotalSoftwareInc,2013-2016
13
3.0
TheCSRissignedwiththepreviouslygeneratedprivatekeyandthecertificateissavedinthe instances/<instance-name>/conf directory.
9. Enter y or n tospecifywhetheryouwantthisinstallationcopiedtoastandbymaster.Ifyouenter y ,youarepromptedforthestandbymaster
hostname.
10. Updatethe pg_hba.conf filetoallowthe gpmon roleaccesstoeverydatabasethatwillbemonitoredusingControlCenter.Specifythemd5
authenticationmethod.Thisexampleallows gpmon accesstoalldatabaseswhenGPCCisrunningonthemasterhost:
localallgpmonmd5
11. StarttheConsoleandlogin.SeeConnectingtotheGreenplumCommandCenterConsole.
12. YoucanalsoconfigureauthenticationsothatotherGreenplumuserscanlogintotheConsole,seeConfiguringAuthenticationfortheCommand
CenterConsolefordetails.
SettingUpCommandCenterInstanceswithaConfigurationFile
Itcanbeusefultorun gpcmdr--
non-interactively,takinginputfromafile.Forexample,youcouldinstallGPCCandcreateCommandCenterinstances
setup
aspartofaGreenplumclusterinstallationscript.Toaccomplishthis,createaconfigurationfileandsupplyittothe gpcmdr utilityusingthe --config_file
option:
gpcmdr--setup--config_filefile
TheconfigurationfileisaPythonConfigParserfile,whichissimilartoaWindowsINIfile.Theconfigurationfilecontainsoneormoresections,each
sectionbeginningwithasectionheaderinsquarebraces.Parametersintheoptional [DEFAULT] sectionapplytoallsubsequentsectionsandmaybe
overridden.Eachsectionotherthan [DEFAULT] definesaCommandCenterConsoleinstancetocreate.
Parametersarespecifiedone-per-lineasname-valuepairsseparatedwithequalssigns( = )orcolons( : ).Commentsbeginwithanumbersign( # )or
semicolon( ; )andcontinuetotheendoftheline.
Hereisanexampleconfigurationfile:
[DEFAULT]
#defaultsapplytoallinstances
remote_db:false
enable_copy_standby:true
standby_master_host:smdw
enable_ssl:true
enable_user_import_cert:true
ssl_cert_file:/etc/ssl/certs/cert.pem
enable_user_import_dhe:false
enable_reuse_dhe:true
[production]
master_hostname:mdw
instance_name:prod
display_name:Production
master_port:5432
web_port:28080
[development]
master_hostname:mdw
instance_name:dev
enable_copy_standby:false;override
display_name:Development
master_port:5532
web_port:28090
IfyouenableSSLanddonotprovideanSSLcertificate, gpcmdr willrunthe openssl commandtocreateacertificate,whichrequiresinputfromtheuser.
Toavoidtheneedforuserinput,besuretosetthe enable_user_import_cert and ssl_cert_file parameters.
SeeSetupConfigurationFileforadetaileddescriptionofthesetupconfigurationfilesyntaxandparameters.
©CopyrightPivotalSoftwareInc,2013-2016
14
3.0
AbouttheCommandCenterInstallation
TheinstallationandsetupprocedurescreateasoftwareinstallationdirectoryandadirectorycontainingfilesandfolderstosupporteachGreenplum
CommandCenterConsoleinstance.
SoftwareInstallationDirectory
Thefollowingfilesandfirst-levelsubdirectoriesarecopiedintotheinstallationfolderthatyouspecifiedwhenyouinstalledGreenplumCommandCenter
Console.Thislocationisreferredtoas $GPPERFMONHOME .
gpcc_path.sh
–filecontainingenvironmentvariablesforCommandCenter
bin
–programfilesforGreenplumCommandCenter
etc
–contains openssl.cnf file
gpcc-wlm-xxx.bin
instances
lib
–installerforGreenplumWorkloadManager
–containsasubdirectoryofresourcesforeachGreenplumDatabaseinstancemonitoredbytheconsole
–libraryfilesforGreenplumCommandCenter
open_source_licenses_GPCC.txt
www

–licensesforopensourcecomponentsusedbyGreenplumCommandCenter
–webserveranduserinterfacefiles
InstancesDirectory
The $GPPERFMONHOME/instances directorycontainssubdirectoriesnamedforeachinstancecreatedduringconsolesetup.The conf subdirectory
containsconfigurationfilesthatyoucanedit.Otherfilesandfoldersareusedbythewebservicesfortheinstance,andshouldnotbemodifiedordeleted.
Eachsubdirectorycontainsthefollowingfilesandfirst-levelsubdirectories:
conf
–multi-clusterconfigurationfile, clusters.conf
webserver
–webserverlogsforthisinstanceandsymboliclinkstowebserverfilesintheinstallationdirectory
©CopyrightPivotalSoftwareInc,2013-2016
15
3.0
ConnectingtotheGreenplumCommandCenterConsole
StarttheGreenplumCommandCenterConsolebyentering:
gpcmdr--start
Ifyoudonotspecifyaninstancename,allCommandCenterConsoleinstancesarestarted.Tostartaparticularinstance,youcanspecifythenameofthe
instance.Forexample:
gpcmdr--start"instance_name"
SeeAdministeringGreenplumCommandCenterforacompletelistofadministrativecommands.
Aftertheinstanceisrunning,youcanopentheCommandCenterConsoleinasupportedbrowserusingthecorrecthostnameandport.Forexample,to
openaCommandCenterinstancerunningonport28080onthelocalhostwithSSL,usethefollowingwebaddress:
https://master_host_name:28080/
Attheloginprompt,entertheusernameandpasswordofaGreenplumrolethathasbeenproperlyconfiguredtoallowauthenticationtoGreenplum
CommandCenter,thenclickLogin.ThisopenstheDashboardpageoftheCommandCenterConsole,whichprovidesagraphicalsystemsnapshotanda
summaryviewofactivequeries.SeetheCommandCenterConsoleonlinehelpformoreinformation.
TheGreenplumCommandCenterConsolehasthreelevelsofpermissions.AdministratorsandOperatorscanviewinformationforallqueriesandsystem
metricswhileregulardatabaseuserscanonlymonitortheirownqueriesandoperators.
©CopyrightPivotalSoftwareInc,2013-2016
16
3.0
ConfiguringAuthenticationfortheCommandCenterConsole
TheinstallationutilitycreatedtheGreenplumCommandCenterdatabase,enabledthedatacollectionagents,andcreateda gpmon superuser.Thisisthe
GreenplumroleusedtomanagetheCommandCentercomponentsanddatawithintheGreenplumenvironment.The gpmon roleisconfiguredtouse
md5-encryptedpasswordauthenticationtoconnecttotheGreenplumDatabaseinstance.The gpmon rolemustbeconfiguredin pg_hba.conf toallow
accesstoeverydatabasethatwillbemonitoredusingtheCommandCenter.
GreenplumCommandCenterdoesnotacceptloginsfromthe gpadmin user,orfromlocalusersconfiguredwith trust authenticationinthe pg_hba.conf
file.Allowing trust authenticationforremoteloginsisdiscouragedbecauseitisinsecure.
TherearethreeuserlevelsinGreenplumCommandCenter.
Regularuser–Regularusersmayonlyviewtheirowndatabasequeriesanddonothaveaccesstoadministrativefunctions.
Operator–OperatorshaveaccesstomorefunctionalityintheCommandCenterConsolethanregularusers,buttheydonothavetobeaGreenplum
Databasesuperuser.Operatorscanviewandcancelallqueriesandhavelimitedaccesstoadministrativetasks.TheOperatorrolemustbecreatedand
usersmustbeassignedtothatrole.Theproceduresaredescribedbelow.
Superuser–AGreenplumDatabasesuperusercanuseallGPCCfeatures,includingviewinginformationforalldatabasequeries,systemmetrics,and
administrativetasks.
TheCommandCenterConsoleisconfiguredbydefaulttorequiremd5-encryptedpasswordauthentication,somakesureeachGPCCuserrolehasan
md5-encryptedpasswordset.
IfyouareusingGreenplumDatabaseversion4.2.1orhigher,youhavetheoptionofusingSHA-256-encryptedpasswordauthentication.Youcanspecify
SHA-256authenticationbychangingthe password_hash_algorithm serverparameter.Thisparametercanbeseteithersystem-wideoronasessionlevel.
AnyotherGreenplumDatabaseuserswithappropriateprivilegescanaccessCommandCenter.
TocreateanewCommandCenteruser,firstyouhavetocreateaGreenplumDatabaseuser,theneditthe pg_hba.conf filetogivethatuseraccessto
CommandCenter.
ThefollowingarestepstocreatenewCommandCenterusers.
SeetheGreenplumDatabaseAdministratorGuideformoredetailedinformationaboutcreatingdatabaseusersandroles.
1. Loginas gpadmin onthemasterhost.
2. Startpsql:
$psql
3. Enterthe CREATEROLE commandtocreateauser:Tocreatearegularuser-adatabaseread-onlyrole:
#CREATEROLEcc_userWITHLOGINPASSWORD'new_password';
TocreateanOperatoruser-adatabaserolethatisamemberofthe gpcc_operator role:
a. Createtherole gpcc_operator :
#CREATEROLEgpcc_operator;
b. GrantOperatorpermissionstoauserbymakingtheuseramemberofthe gpcc_operator role:
#GRANTgpcc_operatorTOcc_user;
c. GrantOperatorpermissionstoagroupbygrantingthe gpcc_operator roletothegroup:
#CREATEROLEcc_users;
#GRANTcc_userstocc_user;
#GRANTgpcc_operatortocc_users;
Tocreateasuperuser-adatabaserolewithsuperuserprivileges:
#CREATEROLEcc_adminWITHLOGINPASSWORD'new_password'SUPERUSERCREATEDB;
©CopyrightPivotalSoftwareInc,2013-2016
17
3.0
4. Verifythatroleswerecreatedsuccessfullyusingthefollowingcommand:
#\du
Thenewusersyoujustcreatedshouldbereturnedalongwiththeattributesyouspecified.
5. Exitpsql.
#\q
6. Editthe pg_hba.conf filetogivethenewuseraccesstoCommandCenter.Openthefileinaneditor:
$vi$MASTER_DATA_DIRECTORY/pg_hba.conf
7. ScrolltothebottomofthefileandinsertthefollowinglinestogivethenewusersaccessfromanyIPaddressusingpasswordauthentication:
hostgpperfmoncc_user127.0.0.1/28md5
hostgpperfmoncc_admin127.0.0.1/28md5
---
**Note:**IfyousubsequentlyhaveissuesloggingintoCommandCenteritmaybeduetoyourspecificenvironment;checkthe`$GPPERFMON/instances/instance_name/logs/gpmonws.log`logfileforauthenticationerrors.
Editthe`pg_hba.conf`filebasedontheerrormessageandyourspecificenvironment.
---
1. Savethefileandexittheeditor.
2. EnterthefollowingcommandtoreloadGreenplumDatabaseprocesses.
#gpstop-u
©CopyrightPivotalSoftwareInc,2013-2016
18
3.0
SettingUpSecureTwo-WayAuthenticationforGreenplumCommandCenter
ThistopichelpsyoutosetupGreenplumCommandCentertoauthenticateuserswithdigitalcertificatesandtoencryptconnectionsbetweenusers’web
browsersandtheCommandCenterwebserver.
GreenplumCommandCenterisabrowser-basedapplicationthat,bydefault,usesbasicauthenticationtoallowconnections.Whentheuserbrowsesto
theGreenplumCommandCenterwebserver,theserverpromptsforausernameandpassword.TheuserenterstheirGreenplumDatabaserolenameand
passwordandtheserverusesittologintothegpperfmondatabase.Thepasswordismd5-encoded,butthedatatransferredoverthenetworkis
otherwiseunencrypted.
Toencryptdataovertheconnectionrequiresasecure,two-wayauthenticatedconnectionbetweentheuser’sbrowserandtheGreenplumCommand
Centerwebserver.TheCommandCenterwebserverandusers’browsersareconfiguredwithX.509certificates.Theclientusestheserver’scertificateto
verifytheyhaveconnectedtothecorrectserverandtheserverusestheclient’scertificatetoverifytheuser’sidentityandtolookuptheuser’sGreenplum
Databaserolename.Oncethecertificatesareinstalledintheserverandusers’browsers,connectionsareestablishedautomaticallywhenusersbrowseto
theCommandCenterURL.
Certificate-basedauthenticationrequiresthatboththeserverandclientcertificatesaredigitallysignedbyatrustedCertificateAuthority(CA).Anyweb
serveraccessibleontheInternetshouldhaveacertificatesignedbyawell-knowncommercialCA,suchasSymantec,topreventman-in-the-middle
attacksandothermaliciousattacks.
Ifyourusersandserversareconfinedtoanintranet,youcansetupapublickeyinfrastructure(PKI)thatallowsyoutoactastheCAforyourorganization,
orevenforjusttheGreenplumCommandCenter.Youcreateapublic/privatekeypairforyourCA,useittogenerateacertificatesigningrequest(CSR),
andthensignitwithyourowncertificate,resultinginaself-signedcertificate.ThiscertificatecanthenbeusedtosignCSRsfortheCommandCenterweb
serverandforGPCCusers.TheCApublickeymustbeinstalledintousers’webbrowsers,alongwiththeirownsignedusercertificates.
Auser’scertificatecontainsanattribute,CommonName(CN),whichCommandCenterusestolookuptheuser’sGreenplumDatabaserole.TheCN
attributeismappedtothedatabaseroleintheuser_cert_mappingtableinthegpperfmondatabase.WhentheuserconnectstotheCommandCenter
webserver,theCommandCenterwebapplicationlogsintothegpperfmondatabasewiththe gpmon roleandlooksuptheCNintheuser_cert_mapping
tabletofindtheuser’sGreenplumDatabaserole.
Note:
WhenSSLisenabledforaGreenplumCommandCenterinstallation,allwebbrowsersconnectingtoGreenplumCommandCentermustbeconfigured
withaclientSSLcertificate.Inamulti-clusterconfiguration,allhostsmusthavethesameSSLconfiguration.SSLmustbeenabledordisabledforall
hosts.Forinformationaboutmulti-clusterconfiguration,seeEnablingMulti-ClusterSupport.
Thesetasksenablecertificate-basedauthenticationandencryptionofCommandCentersessions:
SettingUpanOpenSSLPKI
ConfiguringtheCommandCenterWebServer
CreatingaClientSSLCertificate
ConfiguringtheGPCCDatabase(gpperfmon)
ConfiguringaWebBrowser
ThisprocesssetsupasimplePKIusingOpenSSL.TheOpenSSL openssl command-lineutilityisincludedwithGPCCandisaddedtoyourpathwhenyou
sourcethe gpcc_path.env file.SeetheOpenSSLdocumentationforinformationaboutOpenSSLandthecommandsthatareused.
SettingUpanOpenSSLPKI
TheinstructionsinthissectionsetupanOpenSSLpublickeyinfrastructure(PKI)thatenablesyoutogenerateandsignGreenplumCommandCenteruser
certificates.
1. LogintotheserverwhereyouinstalledGreenplumCommandCenterandsourcetheGreenplumenvironmentfiles.
$source/usr/local/greenplum-db/greenplum_path.sh
$source/usr/local/greenplum-cc-web/gpcc_path.sh
2. Changetothe $GPPERFMONHOME/etc directory,wherethe openssl.cnf islocated.
$cd$GPPERFMONHOME/etc
3. (Optional)The openssl.cnf filecontainsdefaultsettingsforaCertificateAuthoritynamed demoCA .Youcaneditthefile,oracopyofthefile,and
changethesettingstosuityourownorganization.RefertotheOpenSSLdocumentation forhelp.Notethatthe [Default_CA] sectiondefines
©CopyrightPivotalSoftwareInc,2013-2016
19
3.0
directoryandfilenamesthatareusedinthefollowingsteps.Ifyouchangethem,besuretousethenewvaluesinthefollowingcommands.
4. Createadirectorynamed demoCA atthelocationwherethe openssl.cnf fileislocated.
$mkdirdemoCA
5. CreatethePKIdirectorystructureinthe demoCA directory.
$mkdirdemoCA/certs
$mkdirdemoCA/newcerts
$mkdirdemoCA/private
6. Create serial , crlnumber and index.txt filesinthe demoCA directory.
$echo"00">>demoCA/serial
$echo"00">>demoCA/crlnumber
$touchdemoCA/index.txt
7. GenerateaprivateRSAkeyfortheCA.ThiscommandgeneratesanRSA2048bitprivatekeyfortheCA:
$opensslgenrsa-outdemoCA/cakey.key2048
8. Usethegeneratedprivatekeytosignitself.YouarepromptedtoentertheinformationabouttheCAyouareestablishing:
CountryName:Thetwo-lettercodeforthecountry,withnopunctuation.
StateorProvince:Spelloutthestatenamecompletely.
LocalityorCity:Thecityortownname.
Company:Thenameofthecompany.Ifthecompanyordepartmenthasan&,@,oranyothersymbolusingtheshiftkeyinitsname,spellout
thesymboloromitit.
OrganizationalUnit:(Optional)Canbeusedtohelpidentifycertificatesregisteredtoanorganization.
CommonName:ThenameofthisCA.
EmailAddress:(Optional)Theemailaddressoftheownerofthiscertificate.
Thefollowingexamplecreatesanewself-signedX.509certificatethatisvalidfortenyearsforthekeypairinthe certAut.key file.Thiskeywillbeused
tosigncertificatesgeneratedforthewebserverandclientCommandCenterusers.
$opensslreq-new-x509-days3650-keydemoCA/cakey.key-outdemoCA/cacert.crt-configopenssl.cnf
Youareabouttobeaskedtoenterinformationthatwillbeincorporated
intoyourcertificaterequest.
WhatyouareabouttoenteriswhatiscalledaDistinguishedNameoraDN.
Therearequiteafewfieldsbutyoucanleavesomeblank
Forsomefieldstherewillbeadefaultvalue,
Ifyouenter'.',thefieldwillbeleftblank.
----CountryName(2lettercode)[AU]:US
StateorProvinceName(fullname)[Some-State]:California
LocalityName(eg,city)[]:PaloAlto
OrganizationName(eg,company)[InternetWidgitsPtyLtd]:PivotalSoftware,Inc.
OrganizationalUnitName(eg,section)[]:
CommonName(e.g.serverFQDNorYOURname)[]:GPCCCA
EmailAddress[]:
9. MovetheCAkeyandcertificatefilesintoplaceinthe demoCA directory.Thenamesandlocationsofthefilesarespecifiedinthe openssl.cnf file.
$mvdemoCA/cakey.keydemoCA/private/cakey.pem
$mvdemoCA/cacert.crtdemoCA/cacert.pem
ConfiguringtheCommandCenterWebServer
1. GenerateaprivatekeyfortheCommandCenterwebserver.
$opensslgenrsa-outdemoCA/private/wskey.key2048
1. CreateaCSRforthewebserver’sprivatekey.Youarepromptedtoenterinformationabouttheserverwherethecertificatewillbeinstalled.Setthe
CommonNametothenameofthehostweretheCommandCenterwebserverisrunning.
CountryName:Thetwo-lettercodeforthecountry,withnopunctuation.
©CopyrightPivotalSoftwareInc,2013-2016
20
3.0
StateorProvince:Spelloutthestatenamecompletely.
LocalityorCity:Thecityortownname.
Company:Thenameofthecompany.Ifthecompanyordepartmenthasan&,@,oranyothersymbolusingtheshiftkeyinitsname,spellout
thesymboloromitit.
OrganizationalUnit:(Optional)Canbeusedtohelpidentifycertificatesregisteredtoanorganization.
CommonName:Theexactnameofthewebserver.
EmailAddress:(Optional)Theemailaddressoftheownerofthiscertificate.
opensslreq-new-keydemoCA/private/wskey.key-outwskey.csr-configopenssl.cnf
EnterpassphrasefordemoCA/private/wskey.key:
Youareabouttobeaskedtoenterinformationthatwillbeincorporated
intoyourcertificaterequest.
WhatyouareabouttoenteriswhatiscalledaDistinguishedNameoraDN.
Therearequiteafewfieldsbutyoucanleavesomeblank
Forsomefieldstherewillbeadefaultvalue,
Ifyouenter'.',thefieldwillbeleftblank.
----CountryName(2lettercode)[AU]:US
StateorProvinceName(fullname)[Some-State]:California
LocalityName(eg,city)[]:PaloAlto
OrganizationName(eg,company)[InternetWidgitsPtyLtd]:PivotalSoftware,Inc.
OrganizationalUnitName(eg,section)[]:
CommonName(e.g.serverFQDNorYOURname)[]:mdw.pivotal.lan
EmailAddress[]:
Pleaseenterthefollowing'extra'attributes
tobesentwithyourcertificaterequest
Achallengepassword[]:many_secret
Anoptionalcompanyname[]:
2. Signthewebserver’sprivatekeyusingyourCAcertificate:
$opensslca-inwskey.csr-outdemoCA/certs/wscert.crt-configopenssl.cnf
Usingconfigurationfromopenssl.cnf
Checkthattherequestmatchesthesignature
Signatureok
CertificateDetails:
SerialNumber:0(0x0)
Validity
NotBefore:Jun523:16:302015GMT
NotAfter:Jun423:16:302016GMT
Subject:
countryName=US
stateOrProvinceName=California
organizationName=PivotalSoftware,Inc.
commonName=mdw.pivotal.lan
X509v3extensions:
X509v3BasicConstraints:
CA:FALSE
NetscapeComment:
OpenSSLGeneratedCertificate
X509v3SubjectKeyIdentifier:
09:20:A4:74:43:12:72:24:C3:F3:14:34:7E:A8:3A:BD:42:CA:3B:0E
X509v3AuthorityKeyIdentifier:
keyid:4D:4A:F1:FA:50:B8:EA:19:D4:1F:6F:18:34:E6:B8:CD:26:61:71:96
CertificateistobecertifieduntilJun423:16:302016GMT(365days)
Signthecertificate?[y/n]:y
1outof1certificaterequestscertified,commit?[y/n]y
Writeoutdatabasewith1newentries
DataBaseUpdated
3. CreateaPEMfilecontainingthewebserver’sprivatekeyandcertificate.Thewebserverrequiresthisfile.
$catdemoCA/private/wskey.keydemoCA/certs/wscert.crt>wscert.pem
4. Edittheconfigurationfile app.conf fortheinstanceconfiguredforGreenplumCommandCenter.Theconfigurationfileislocatedin
$GPPERFMONHOME/instances/instance/conf ,whereinstanceisthevalueyouspecifiedwhenyoucreatedtheinstance.
AddthefollowingparameterstoenableSSL-basedclientauthentication:
©CopyrightPivotalSoftwareInc,2013-2016
21
3.0
ssl.engine="enable"
ssl.ca-file="/usr/local/greenplum-cc-web/etc/demoCA/cacert.pem"
ssl.pemfile="/usr/local/greenplum-cc-web/etc/wscert.pem"
ssl.verifyclient.activate="enable"
ssl.verifyclient.enforce="enable"
ssl.verifyclient.username="SSL_CLIENT_S_DN_CN"
Note:
Forthe ssl.ca-file and ssl.pemfile parameters,youmustspecifythefullyqualifiedpathstothe cacert.pem and wscert.pem files,respectively.
Enter gpcmdr--restart
torestartthewebserverafterupdatingtheconfigurationfile.
instance_name
CreatingaClientSSLCertificate
FollowthesestepsforeachGPCCusertocreateasignedcertificatetoinstallintheuser’swebbrowsers.
1. OpenacommandlineterminalandsourcetheGreenplumenvironmentfiles.
$source/usr/local/greenplum-db/greenplum_path.sh
$source/usr/local/greenplum-cc-web/gpcc_path.sh
2. Changetothe $GPPERFMONHOME/etc directory.-pp
$cd$GPPERFMONHOME/etc
3. Generateaclientprivatekeybyexecutingthefollowingcommand.Replaceclientinthisandfollowingcommandswithastringsuchastheuser’s
loginnameordatabaserolename.
$opensslgenrsa-outdemoCA/private/client.key2048
4. Generateacertificatesigningrequestfortheuser’sprivatekey.ThevalueyouenterfortheCommonNamefieldmustbeuniqueforeachuser;itis
usedtomaptheusertotheirGreenplumDatabaserole.
$opensslreq-new-keydemoCA/private/client.key-outclient.csr-configopenssl.cnf
Youareabouttobeaskedtoenterinformationthatwillbeincorporated
intoyourcertificaterequest.
WhatyouareabouttoenteriswhatiscalledaDistinguishedNameoraDN.
Therearequiteafewfieldsbutyoucanleavesomeblank
Forsomefieldstherewillbeadefaultvalue,
Ifyouenter'.',thefieldwillbeleftblank.
----CountryName(2lettercode)[AU]:US
StateorProvinceName(fullname)[Some-State]:California
LocalityName(eg,city)[]:PaloAlto
OrganizationName(eg,company)[InternetWidgitsPtyLtd]:PivotalSoftware,Inc.
OrganizationalUnitName(eg,section)[]:
CommonName(e.g.serverFQDNorYOURname)[]:gpcc_user_1
EmailAddress[]:
Pleaseenterthefollowing'extra'attributes
tobesentwithyourcertificaterequest
Achallengepassword[]:many_secret
Anoptionalcompanyname[]:
5. SigntheclientcertificatewiththeCAcertificate:
©CopyrightPivotalSoftwareInc,2013-2016
22
3.0
$opensslca-inclient.csr-outdemoCA/certs/client.crt-configopenssl.cnf-policypolicy_anything
Usingconfigurationfromopenssl.cnf
Checkthattherequestmatchesthesignature
Signatureok
CertificateDetails:
SerialNumber:1(0x1)
Validity
NotBefore:Jun523:46:392015GMT
NotAfter:Jun423:46:392016GMT
Subject:
countryName=US
stateOrProvinceName=California
localityName=PaloAlto
organizationName=PivotalSoftware,Inc.
commonName=gpcc_user_1
X509v3extensions:
X509v3BasicConstraints:
CA:FALSE
NetscapeComment:
OpenSSLGeneratedCertificate
X509v3SubjectKeyIdentifier:
C9:1D:18:66:FB:0F:7E:FA:40:FB:EA:DF:94:B5:FD:3E:FC:FC:46:41
X509v3AuthorityKeyIdentifier:
keyid:4D:4A:F1:FA:50:B8:EA:19:D4:1F:6F:18:34:E6:B8:CD:26:61:71:96
CertificateistobecertifieduntilJun423:46:392016GMT(365days)
Signthecertificate?[y/n]:y
1outof1certificaterequestscertified,commit?[y/n]y
Writeoutdatabasewith1newentries
DataBaseUpdated
Note:Thevalueforthe -days optionmustbelessthanorequaltothevaluespecifiedfortheCAcertificate.
6. Createa .pem filecontainingtheclient’sprivatekeyandcertificate.
$catdemoCA/private/client.keydemoCA/certs/client.crt>client.pem
7. ConvertthesignedclientcertificatetoPKCS#12format.ThePKCS#12formatisanarchivefileformatforstoringmanycryptographicobjectsasa
singlefile.ItiscommonlyusedtobundleaprivatekeywithitsX.509certificate.
$opensslpkcs12-export-indemoCA/certs/client.crt-inkeydemoCA/private/client.key-certfiledemoCA/cacert.pem-outclient.p12
EnterExportPassword:
Verifying-EnterExportPassword:
Important:Theexportpasswordisrequiredwhentheclientcertificateisimportedintoaclientwebbrowser.SeeConfiguringaWebBrowser.
8. Sendthe client.pem fileandthe client.p12 filetotheGPCCuser.Securelycommunicatetheexportpasswordforthe .p12 filetotheuser.
ConfiguringtheGPCCDatabase(gpperfmon)
WhentheGPCCwebserverisconfiguredtouseSSLbasedclientauthentication,theGPCCwebserverqueriestheuser_cert_mappingtableinthe
gpperfmondatabaseaspartoftheauthenticationprocess.Theuser_cert_mappingtablemapstheclientcertificateuserID(thecommonnameinthe
clientcertificate)withthegpperfmonuserrole.
Youmustcreatetheuser_cert_mappingtableandpopulateitwiththeproperuserinformation.
1. Createtheuser_cert_mappingtableinthegpperfmondatabase.
=#psqlgpperfmon
=#CREATETABLEpublic.user_cert_mapping(mappingtextprimarykey,usernametext);
2. ForeachGreenplumCommandCenteruserwhoaccessesthegpperfmondatabase,arowmustexistintheuser_cert_mappingtable.Themapping
columncontainsthecommonnamethatyouspecifiedwhencreatingtheclientcertificate.Thecorrespondingusernamecolumncontainsthe
gpperfmonuserrole.
Theformatofthecommonnameinthemappingcolumnis 'common_name,common_name' .Thecommonnamelistedtwice,separatedbyacommaand
space.Forthisexample,thecommonnameis gpcc_user1 ,andthegpperfmonuserroleis perfmon_user1 :
=#INSERTINTOpublic.user_cert_mappingVALUES('gpcc_user1,gpcc_user1','perfmon_user1');
©CopyrightPivotalSoftwareInc,2013-2016
23
3.0
ConfiguringaWebBrowser
WhenGreenplumCommandCenterisconfiguredtouseSSL,webbrowsersconnectingtoGreenplumCommandCentermusthaveaclientcertificateand
CAcertificate.YouimportthecreatedclientcertificateandCAcertificatetoyourbrowsersothatitcanforwardthecertificatestoGreenplumCommand
CenterwhenconnectingtoaGreenplumdatabasefromGreenplumCommandCenter.
FollowthesestepstoimportthecertificatesintoFirefoxandChromebrowsers,orintotheMacOSXKeychainAccessutility.
MozillaFirefox
1. Fromthemenu,selectPreferences.
2. ClickAdvancedandthenclicktheCertificatestab.
3. ClickViewCertificates.
4. IntheCertificateManagerdialog,opentheAuthoritiestab,andclickImport.SelectyourCAcertificate(forexample, cacrt.crt ).
IntheDownloadingCertificatedialog,checkTrustthisCAtoidentifywebsites.
5. IntheYourCertificatestab,clickImportandselectyourclientcertificate(forexample client.p12 ).
Theimportprocesspromptsforapasswordfortheclientcertificate.Entertheexportpasswordthatyouenteredwhenyouconvertedtheclient
certificatetoPKCS#12.SeeCreatingaClientSSLCertificate.
6. ClickOKtoapplytheconfigurationchanges.
GoogleChrome
1. Fromthecustomizationmenu,selectSettingsandthenselectShowAdvancedSettings.
2. InthesectionHTTPS/SSL,clickManagecertificates….
3. IntheManageCertificatesdialog,opentheTrustedRootCertificationAuthoritiestab.ClickImportandselectyourCAcertificate(forexample,
certAut.crt ).
4. OpenthePersonaltab.ClickImportandselecttheclientcertificate(forexample, client.p12 ).
Theimportprocesspromptsforapasswordtheclientcertificate.Entertheexportpasswordthatyouenteredwhenyouconvertedtheclient
certificatetoPKCS#12.SeeCreatingaClientSSLCertificate.
5. ClickOktoapplyconfigurationchanges.
6. BrowsetotheGreenplumCommandCenterURL,forexample https://mdw:28080 .AUserIdentificationRequestwindowwillappear.Choosethe
clientcertificateyouimportedandclickOK.
MacOSX
MacOSXhasabuilt-incertificatemanager,KeychainAccess.GoogleChrome,Safari,andMozillaFirefoxuseKeychainAccessforcertificatemanagement.
YouwillbeaskedtoauthenticateasanadminuseronyourMacseveraltimeswhilefollowingthesesteps.
Tobegin,theuserneedsthe cacert.pem CAcertificateandthe .pem filecontainingtheuser’sprivatekeyandcertificate.
1. OpenKeychainAccess(Applications>Utilities>KeychainAccess.
2. ChooseFile>Import,selecttheCA .pem filefortheCAyousetup( cacert.pem ),andclickOpen.
3. Onthedialogwindowthatdisplays,clickAlwaysTrust.
4. ChooseFile>Import,selectthe .pem filefortheGPCCuseryousetup( client.pem ),andclickOpen.
5. Inawebbrowser,browsetotheGPCCCommandCenter( https://gpcc_host:28080 ).
6. ChoosetheGPCCclientcertificateintheSelectacertificatedialogandclickOK.
©CopyrightPivotalSoftwareInc,2013-2016
24
3.0
©CopyrightPivotalSoftwareInc,2013-2016
25
3.0
EnablingMulti-ClusterSupport
Multi-clusterfunctionalityallowsyoutoviewthestatusofmultipleGreenplumDatabaseclustersatonetimeintheCommandCenteruserinterface.The
clusterscanbeorganizedintogroups.
Typically,oneGreenplumclusterisdesignatedthemastercluster;itsCommandCenterinstancehoststhemulti-clusterviewforallCommandCentermanagedclusters.
SeeMonitoringMultipleGreenplumDatabaseClusters
forinformationaboutaccessingthemulti-clusterview.
SettingUpMultipleClusters
Multi-clustersupportisenabledwithamulti-clusterconfigurationfile.Thereisatemplateforthisconfigurationfileintheinstancedirectoryofeach
CommandCenterinstanceatthefollowinglocation:
$GPCCHOME/instances/<instance_name>/conf/clusters.conf
Locatethe clusters.conf templateontheCommandCenterinstanceyouwanttoidentifyasthemasterinstance.Thiswillbethewebserverthathoststhe
multi-clusterwebpage.
Theconfigurationfileconsistsofthefollowingvaluesseparatedbycolons:
SERVER:HOST:PORT:TABGROUP:AUTOLOGIN:SSL
Forexample:
Miracle:www.example.com:28080:Production:True:false
Deforest:192.51.100.186:28080:Development:False:false
Grandalpha:grandalpha:32020:Development:False:false
Allfieldsarerequired.
SERVER
Theservervalueisaprimarykey,usedtouniquelyidentifyeachGreenplumDatabasecluster.
Thenamemaynotcontainspecialcharacters,otherthanthespacecharacter,underscore( _ ),orhyphen( - ).
CommandCenterthrowsanerrorifthereareanyentrieswiththesameprimarykey.
HOST
ThisisthehostnameorIPaddressforthecluster’sCommandCenterUI.
PORT
TheCommandCenterportnumber.
TABGROUP
ThisfieldisusedtodivideGreenplumDatabaseclustersintocategories;forexample,Testing,Production,andDeployment.
AUTOLOGIN
Thisfieldenablesautomaticlogintotheclusterfromthemulti-clusterview.Whenautomaticloginisenabled,clickingthecluster’shealthcharton
themulti-clusterpageloadsthecluster’sCommandCenterUIinanewbrowserwindow.
TheAUTOLOGINfieldisatrueorfalsevalue.Itisnotcase-sensitive.
SSL
ThisfieldindicateswhetherSSLisenabledforthehost.Ittakesatrueorfalsevalueandisnotcase-sensitive.Anyothervalueisanerror,whichwill
beshownintheUI.
Important:AllhostsmusthavethesameSSLconfiguration.SSLmustbeenabledordisabledforallhosts.
©CopyrightPivotalSoftwareInc,2013-2016
26
3.0
UpgradingGreenplumCommandCenter
ThissectionprovidesstepsforupgradingPivotalGreenplumCommandCentertoanewversion.
UpgradingGreenplumCommandCenterrequiresinstallingthenewdistribution,andthenmigratingCommandCenterinstancesfromaprevious
installation.
AnewGreenplumCommandCentersoftwarereleasemaybeinstalledinthesameparentdirectoryasthecurrentrelease,bydefault /usr/local .The
installerupdatesthesymboliclink greenplum-cc-web topointtothenewreleasedirectoryandleavestheoldreleasedirectoryinplace.Afterthesoftware
isinstalled,runthe gpcmdr-commandtorecreateyourCommandCenterinstances.
migrate
InstalltheNewSoftwareRelease
1. Loginasthe gpadmin user.
2. Sourcethe greenplum_path.sh and gpcc_path.sh filesfromthecurrentrelease:
$source/usr/local/greenplum-db/greenplum_path.sh
$source/usr/local/greenplum-cc-web/gpcc_path.sh
3. DownloadthelatestCommandCenterreleasefromPivotalNetwork
format:
.InstallerfilesareavailableforLinux64-bitplatforms,andhavenamesinthe
greenplum-cc-web-X.X.X-PLATFORM.zip
4. Unziptheinstallerfile.Forexample:
#unzipgreenplum-cc-web-X.X.X-PLATFORM.zip
5. Launchtheinstallerforthenewreleasewiththebashshell:
$/bin/bashgreenplum-cc-web-X.X.X-PLATFORM.bin
Note:Theinstallerrequireswritepermissionintheinstallationdirectory( /usr/local ,bydefault).Ifthe gpadmin userdoesnothavewritepermission
intheinstallationdirectory,runtheinstallationas root .Youwillneedtochangefileownershipandpermissionsafterthesoftwareisinstalled.
6. Readthroughthelicenseagreement.Whenyoureachthebottom,type yes toacceptthelicenseagreement.
7. Theinstallerpromptsyoutoprovideaninstallationpath.EnterafullpathorpressENTERtoacceptthedefault, /usr/local .Youmusthavewrite
permissioninthedirectoryyouspecify.
8. Ifyourantheinstallationas root oranyuserotherthan gpadmin ,changetheownershipandpermissionsoftheinstallationdirectory:
#chown-Rgpadmin:gpadmin/usr/local/greenplum-cc-web-versionx.x
#chmod-R755/usr/local/greenplum-cc-web-versionx.x
Changetothe gpadmin userbeforeyoucontinuetothenextstep:
#su-gpadmin
9. EnsurethatyouhaveacurrentahostfilelistingthenamesofalloftheotherhostsparticipatingintheGreenplumDatabasecluster,includingthe
standbymasterhost.ThehostnamesmustberesolvableinDNS.
10. As gpadmin ,runthe gpccinstall utilitytoinstallthenewCommandCenterfilesonallhostslistedinthehostfile:
$gpccinstall-fhostfilename
where hostfilename isthenameofthehostfileyoucreated.
©CopyrightPivotalSoftwareInc,2013-2016
27
3.0
MigrateCommandCenterInstances
AfterthenewCommandCentersoftwareisinstalled,migrateyourinstancesbyrunningthe gpcmdr--
command.
migrate
Tomigrateallinstancesfromapreviousinstallation,run gpcmdr--
withnoarguments.Forexample:
migrate
$gpcmdr--migrate
Tomigrateasingleinstance,run gpcmdr--migrate
andprovideitsfullinstallationpath.Forexample:
<instance_name>
$gpcmdr--migratemyinstance
Customchangestothe ssh-wrapper filearenothandledbyinstancemigration.Ifyouhavesetacustom ssh pathinthisfile,youmustcopyittothe
currentinstallation.
Forexample:
cp/usr/local/greenplum-cc-web-3.0.0/bin/ssh-wrapper/usr/local/greenplum-cc-web/bin
SeeSetupaGreenplumCommandCenterInstanceforinstructionstocreatenewinstanceswith gpcmdr--
.
setup
©CopyrightPivotalSoftwareInc,2013-2016
28
3.0
RunningGreenplumCommandCenter2.xinParallelWith3.x
TousefeaturesofGPCC2.xnotavailablein3.x,youcanrunaGPCC2.xinstanceonaseparateportonthemasterhostandmanageitindependentlyfrom
GPCC3.x.
ContinueRunninganInstalledGPCC2.xVersion
AfteryouinstallGPCC3.x:
1. Run gpcmdr--status toidentifyanavailableportthatisnotinusebyaGPCC3.xinstance.
2. Changethesymboliclinkinyourinstallationdirectorytothe2.xversion:
$ln-sfn/usr/local/greenplum-cc-web-2.x.x/usr/local/greenplum-cc-web
3. Edit $GPPERFMONHOME/instances/<instance_name>/conf/lighttpd.conf .
Changethe server.port parametersoitdoesnotconflictwiththe3.xport.Forexample:
server.port=28090
Changethesevenoccurrencesof greenplum-cc-web totheabsolutepathofthe2.xinstallationdirectory.Forexample:
server.document-root="/usr/local/greenplum-cc-web/./instances/demo/web"
becomes
server.document-root="/usr/local/greenplum-cc-web-2.5.0/instances/demo/web"
4. StarttheGPCC2.xinstance:
$gpcmdr--start<instance_name>
5. Changethesymboliclinkinyourinstallationdirectorytopointtoyourcurrent3.xversion:
$ln-sfn/usr/local/greenplum-cc-web-3.0.0/usr/local/greenplum-cc-web
InstallGPCC2.xinAdditiontoGPCC3.x
AfteryouinstallGPCC3.x:
1. Run gpcmdr--status toidentifyanavailableportnotinusebyaGPCC3.xinstance.
2. DownloadtheGPCC2.5.0installerfromPivotalNetwork
.
3. Unzipandruntheinstaller:
$unzipgreenplum-cc-web-2.5.0-RHEL5-x86_64.zip
$bashgreenplum-ccweb-2.5.0-RHEL5-x86_64.bin
Thiswillchangethesymlinkat /usr/local/greenplum-cc-web totheGPCC2.5.0installationdirectory.
Note:Donotrun gpccinstall ,justthedownloadedinstallerbinary.
4. CreateaGPCC2.xinstance:
$gpcmdr--setup
SpecifyaportthatisnotusedbyanyexistingGPCC3.xinstances.
5. Edit $GPPERFMONHOME/instances/<instance_name>/conf/lighttpd.conf .
©CopyrightPivotalSoftwareInc,2013-2016
29
3.0
Changethesevenreferencestothe greenplum-cc-web symboliclinktotheabsolutepathoftheGPCC2.xinstallationdirectory.Forexample:
server.document-root="/usr/local/greenplum-cc-web/./instances/demo/web"
becomes
server.document-root="/usr/local/greenplum-cc-web-2.5.0/instances/demo/web"
6. StarttheGPCC2.xinstance:
$gpcmdr--start<instance_name>
Attheprompt“Doyouwanttostartthebetaserver?”enter N .
7. ChangethesymboliclinkinyourinstallationdirectorytopointtoyourcurrentGPCC3.xversion:
$ln-sfn/usr/local/greenplum-cc-web-3.0.0/usr/local/greenplum-cc-web
ManagingConcurrentGPCC2.xand3.xVersions
The gpcmdr utilitymanagestheinstancesfortheversionofGPCCinthecurrent gpcc_path.sh .Assumingyour.bashrcorothersourcefilecontainssource
$GPPERFMONHOME/gpcc_path.sh ,toswitchbetweenversions,justmodifythesymboliclink greenplum-cc-web (inthe /usr/local directory,bydefault)topoint
totheappropriateversion.
Tomanage2.xinstances:
$ln-sfn/usr/local/greenplum-cc-web-2.x.x/usr/local/greenplum-cc-web
Tomanage3.xinstances:
$ln-sfn/usr/local/greenplum-cc-web-3.x.x/usr/local/greenplum-cc-web
©CopyrightPivotalSoftwareInc,2013-2016
30
3.0
UninstallingGreenplumCommandCenter
TouninstallGreenplumCommandCenter,youmuststopboththeCommandCenterConsoleanddisablethedatacollectionagents.Optionally,youmay
alsoremoveanydataassociatedwithGreenplumCommandCenterbyremovingyourCommandCenterConsoleinstallationandtheCommandCenter
database.
1. StopCommandCenterConsoleifitiscurrentlyrunning.Forexample:
$gpcmdr--stop
2. RemovetheCommandCenterinstallationdirectoryfromallhosts.Forexample:
$rm-rf/usr/local/greenplum-cc-web-version
3. DisabletheDataCollectionAgents.
a. LogintothemasterhostastheGreenplumadministrativeuser( gpadmin ):
$su-gpadmin
b. Editthe $MASTER_DATA_DIRECTORY/postgresql.conf fileanddisablethedatacollectionagents:
gp_enable_gpperfmon=off
c. Removeorcommentoutthegpmonentriesin pg_hba.conf .Forexample:
#localgpperfmongpmonmd5
#hostgpperfmongpmon0.0.0.0/0md5
d. DroptheCommandCentersuperuserrolefromthedatabase.Forexample:
$psqltemplate1-c'DROPROLEgpmon;'
e. RestarttheGreenplumDatabaseinstance:
$gpstop-r
f. CleanupanyuncommittedCommandCenterdataandlogfilesthatresideonthemasterfilesystem:
$rm-rf$MASTER_DATA_DIRECTORY/gpperfmon/data/*
$rm-rf$MASTER_DATA_DIRECTORY/gpperfmon/logs/*
g. IfyoudonotwanttokeepyourhistoricalCommandCenterdata,dropthegpperfmondatabase:
$dropdbgpperfmon
©CopyrightPivotalSoftwareInc,2013-2016
31
3.0
AdministeringGreenplumCommandCenter
SystemadministrationinformationfortheGreenplumCommandCenter.
StartingandStoppingGreenplumCommandCenter
ConfiguringGreenplumCommandCenter
AdministeringCommandCenterAgents
AdministeringtheCommandCenterDatabase
WebServerAdministration
©CopyrightPivotalSoftwareInc,2013-2016
32
3.0
StartingandStoppingGreenplumCommandCenter
GreenplumCommandCenterincludesthecommandcenterconsoleandthecommandcenteragents.
StartingandStoppingCommandCenterAgents
WhenevertheGreenplumDatabaseserverconfigurationparameter gp_enable_gpperfmon isenabledinthemaster postgresql.conf file,theCommandCenter
agentswillrunandcollectdata.TheseagentsareautomaticallystoppedandstartedtogetherwiththeGreenplumDatabaseinstance.
TodisabletheCommandCenterdatacollectionagents,youmustdisablethe gp_enable_gpperfmon parameter,andrestarttheGreenplumDatabase
instance.
StartingandStoppingCommandCenterConsole
Usethefollowing gpcmdr commandstostart,stopandrestartGreenplumCommandCenterConsoleinstances:
$gpcmdr--start["instancename"]
$gpcmdr--stop["instancename"]
$gpcmdr--restart["instancename"]
Ifyoudonotspecifyaninstancename,allinstancesarestarted,stopped,orrestartedatonce.Youcancheckthestatusofinstancesusing:
$gpcmdr--status["instancename"]
©CopyrightPivotalSoftwareInc,2013-2016
33
3.0
ConfiguringGreenplumCommandCenter
ConfigurationparametersforGreenplumCommandCenterarestoredintheAgentandConsoleconfigurationfiles.
AgentConfiguration
ChangestothesefilesrequirearestartoftheGreenplumDatabaseinstance( gpstop- ).
r
$MASTER_DATA_DIRECTORY/gpperfmon/conf/gpperfmon.conf
$MASTER_DATA_DIRECTORY/postgresql.conf
ConsoleConfiguration
ChangestothesefilesrequirearestartofCommandCenterConsole( gpcmdr--restart ).
$GPPERFMONHOME/instances/<instance_name>/conf/clusters.conf
$GPPERFMONHOME/instances/<instance_name>/webserver/conf/app.conf
SeetheConfigurationFileReferencesectionforadescriptionoftheconfigurationparametersinthesefiles.
Youshouldnotneedtomanuallyeditanyofthefiles.RunningtheCommandCentersetuputilitywillmakeallthenecessarymodificationstothese
configurationfiles.
ChangingthegpmonPassword
GreenplumCommandCentermanagesthe gpperfmon databaseusingthe gpmon databaserole.Tochangethe gpmon password,followthesesteps:
1. LogintoGreenplumDatabaseasasuperuserandchangethe gpmon passwordwiththe ALTERROLE command:
#ALTERROLEgpmonWITHPASSWORD'new_password';
2. Updatethepasswordinthe .pgpass file,whichisusedbyGreenplumCommandCenter.Thedefaultlocationforthisfileisthe gpadmin home
directory( ~/.pgpass ).The .pgpass filecontainsalinewiththe gpmon password.Replacetheexistingpasswordwiththenewpassword.
*:5432:gpperfmon:gpmon:new_password
Thefileshouldbeownedby gpadmin andRW-accessibleby gpadmin only.
3. RestartGreenplumCommandCenterwiththe gpcmdr utility.
$gpcmdr--restart
©CopyrightPivotalSoftwareInc,2013-2016
34
3.0
AdministeringCommandCenterAgents
Thissectiondescribesbasicagentadministrationtasks,includingaddinghostsandviewingagentlogfiles.
AddingandRemovingHosts
Segmentagentsonnewhostsaredetectedautomaticallybythemasteragent.Whenever gp_enable_gpperfmon isenabledonthemaster,themaster
monitoragentautomaticallydetects,starts,andbeginsharvestingdatafromnewsegmentagents.
Toverifytheadditionofanewmonitoredhost,youcancheckforthenewhostnameintheGreenplumCommandCenterConsoleSystemMetricsview
describedintheGreenplumCommandCenterConsoleonlinehelp.Alternately,youcanquerythe system_now tablefortherowcontainingcurrentmetrics
foreachhost.Forexample:
#SELECT*FROMsystem_nowWHEREhostname='new_hostname';
ViewingandMaintainingMasterAgentLogFiles
Logmessagesforthemasteragentarewrittentothefollowingfilebydefault:
$MASTER_DATA_DIRECTORY/gpperfmon/logs/gpmmon.log
Tochangethelogfilelocation,editthe log_location parameterin gpperfmon.conf .
Onthesegmenthosts,agentlogmessagesarewrittentoa gpsmon.log fileinthesegmentinstance’sdatadirectory.Forahostwithmultiplesegments,the
agentlogfileislocatedinthedatadirectoryofthefirstsegment,aslistedinthe gp_configuration tablebydbid.Ifthesegmentagentisunabletologinto
thisdirectory,itwilllogmessagestothehomedirectoryoftheuserrunningCommandCenter(typically gpadmin )
ConfiguringLogFileRollover
Athigherlogginglevels,thesizeofthelogfilesmaygrowdramatically.Topreventthelogfilesfromgrowingtoexcessivesize,youcanaddanoptionallog
rolloverparameterto gpperfmon.conf .Thevalueofthisparameterismeasuredinbytes.Forexample:
max_log_size=10485760
Withthissetting,thelogfileswillgrowto10MBbeforethesystemrollsoverthelogfile.Thetimestampisaddedtothelogfilenamewhenitisrolledover.
Administratorsmustperiodicallycleanoutoldlogfilesthatarenolongerneeded.
©CopyrightPivotalSoftwareInc,2013-2016
35
3.0
AdministeringtheCommandCenterDatabase
DatacollectedbyCommandCenteragentsisstoredinadedicateddatabasecalledgpperfmonwithintheGreenplumDatabaseinstance.Thisdatabase
requiresthetypicaldatabasemaintenancetasks,suchascleanupofoldhistoricaldataandperiodic ANALYZE .
SeetheCommandCenterDatabaseReferencesectionforareferenceofthetablesandviewsinthegpperfmondatabase.
ConnectingtotheCommandCenterDatabase
DatabaseadministratorscanconnectdirectlytotheCommandCenterdatabase( gpperfmon )usinganyGreenplumDatabase-compatibleclientprogram
(suchas psql ).Forexample:
$psql-dgpperfmon-hmaster_host-p5432-Ugpadmin
BackingUpandRestoringtheCommandCenterDatabase
ThehistorytablesoftheCommandCenterdatabase( gpperfmon )canbebackedupandrestoredusingtheGreenplumDatabaseparallelbackupand
restoreutilities( gp_dump , gp_restore , gpcrondump , gpdbrestore ).SeetheGreenplumDatabaseUtilityGuideformoreinformation.
BecausetheCommandCenterdatabasehasalownumberoftables,youmayprefertodeviseabackupplanusingthetable-levelbackupfeaturesof
gp_dump .Forexample,youcancreatescriptstorun gp_dump tobackupthemonthlypartitionsofthehistoricaldatatablesonamonthlyschedule.
Alternately,youcanbackupyourCommandCenterdatabaseatthedatabaselevel.
MaintainingtheHistoricalDataTables
Allofthe *_history tablesstoredintheCommandCenterdatabase(gpperfmon)arepartitionedintomonthlypartitions.AJanuary2010partitionis
createdatinstallationtimeasatemplatepartition(itcanbedeletedoncesomecurrentpartitionsarecreated).TheCommandCenteragents
automaticallycreatenewpartitionsintwomonthincrementsasneeded.Administratorsmustperiodicallydroppartitionsforthemonthsthatareno
longerneededinordertomaintainthesizeoftheCommandCenterdatabase.
SeetheGreenplumDatabaseAdministratorGuideformoreinformationondroppingpartitionsofapartitionedtable.
©CopyrightPivotalSoftwareInc,2013-2016
36
3.0
AdministeringtheWebServer
Thegpmonwswebserverisinstalledinthe www directoryofyourGreenplumCommandCenterinstallation.
ConfiguringtheWebServer
Thewebserverconfigurationfileisstoredin $GPPERFMONHOME/instances/instance_name/webserver/conf/app.conf .Someoftheparametersinthisconfiguration
filearesetbythe gpcmdr setuputility,includingthewebserverportandSSLoptions.SeetheWebServerParameterssectionofConfigurationFile
Referenceforadescriptionoftheparametersinthisfile.
Youshouldnotneedtomanuallyeditthisfile,ifyoudo,youmaybreaksomefunctionality.ContactSupportifyouwanttomakecustommodificationsto
thisfile.
ViewingandMaintainingWebServerLogFiles
Webserveraccessanderrorlogmessagesarewrittento $GPPERFMONHOME/instances/<instance_name>/webserver/logs/gpmonws.log .
IfyouexperienceerrorsviewingtheGreenplumCommandCenterConsole,refertothisfileformoreinformation.
Topreventthewebserverlogfromgrowingtoexcessivesize,youcansetuplogfilerotationusing logrotate or cronolog .
©CopyrightPivotalSoftwareInc,2013-2016
37
3.0
UtilityReference
ReferenceinformationforthetwoGreenplumCommandCenterutilityprograms:the gpperfmon_install utilitythatenablesthedatacollectionagentsand
the gpcmdr utilitythatsetsupandmanagesthewebapplication.
gpperfmon_install
gpcmdr
©CopyrightPivotalSoftwareInc,2013-2016
38
3.0
gpperfmon_install
InstallstheCommandCenterdatabase(gpperfmon)andoptionallyenablesthedatacollectionagents.
gpperfmon_install
[--enable--passwordgpmon_password--portgpdb_port]
[--pgpasspath_to_file]
[–verbose]
gpperfmon_install--help|-h|-?
Inadditiontocreatingthe gpperfmon database,performstheadditional
stepsrequiredtoenabletheCommandCenterdatacollectionagents.
When --enable isspecifiedtheutilitywillalsocreateandconfigurethe
gpmonsuperuseraccountandsettheCommandCenterserver
configurationparametersinthe postgresql.conf files.
–enable
Requiredif --enable isspecified.Setsthepasswordofthegpmon
–passwordgpmon_password
superuser
–port gpdb_port
Requiredif --enable isspecified.Specifiestheconnectionportofthe
GreenplumDatabasemaster.
–pgpasspath_to_file
Optionalif --enable isspecified.Ifthepasswordfileisnotinthedefault
locationof ~/.pgpass ,specifiesthelocationofthepasswordfile.
–verbose
Setstheloggingleveltoverbose.
–help|-h|-?
Displaystheonlinehelp.
Description
The gpperfmon_install utilityautomatesthestepstoenabletheCommandCenterdatacollectionagents.YoumustbetheGreenplumsystemuser( gpadmin
)torunthisutility.Ifusingthe --enable option,theGreenplumDatabaseinstancemustberestartedaftertheutilitycompletes.
Whenrunwithoutanyoptions,theutilitywilljustcreatetheCommandCenterdatabase(gpperfmon).Whenrunwiththe–enableoption,theutilitywill
alsorunthefollowingadditionaltasksnecessarytoenabletheCommandCenterdatacollectionagents:
1. Createsthe gpmon superuserroleinGreenplumDatabase.TheCommandCenterdatacollectionagentsrequirethisroletoconnecttothedatabase
andwritetheirdata.The gpmon superuserroleusesMD5-encryptedpasswordauthenticationbydefault.Usethe–passwordoptiontosetthe
gpmon
superuser’spassword.Usethe --port optiontosupplytheportoftheGreenplumDatabasemasterinstance.
2. Updatesthe $MASTER_DATA_DIRECTORY/pg_hba.conf file.Theutilityaddsthefollowinglinestothehost-basedauthenticationfile( pg_hba.conf ).This
allowsthe gpmon usertolocallyconnecttoanydatabaseusingMD5-encryptedpasswordauthentication:
localgpperfmongpmonmd5
hostallgpmon127.0.0.1/28md5
3. Updatesthepasswordfile( .pgpass ).Inordertoallowthedatacollectionagentstoconnectasthe gpmon rolewithoutapasswordprompt,you
musthaveapasswordfilethathasanentryforthe gpmon user.Theutilityaddsthefollowingentrytoyourpasswordfile(ifthefiledoesnotexist,
theutilitycreatesit):
*:5432:gpperfmon:gpmon:gpmon_password
Ifyourpasswordfileisnotlocatedinthedefaultlocation( ~/.pgpass ),usethe --pgpass optiontospecifythefilelocation.
4. SetstheserverconfigurationparametersforCommandCenter.Thefollowingparametersmustbeenabledinorderforthedatacollectionagentsto
begincollectingdata.Theutilitywillsetthefollowingparametersinthe postgresql.conf configurationfiles:
gp_enable_gpperfmon=on (inall postgresql.conf files)
gpperfmon_port=8888
(inall postgresql.conf files)
(inthemaster postgresql.conf file)
gp_external_enable_exec=on
©CopyrightPivotalSoftwareInc,2013-2016
39
3.0
Examples
CreatetheCommandCenterdatabase( gpperfmon )only:
$su-gpadmin
$gpperfmon_install
CreatetheCommandCenterdatabase( gpperfmon ),createthe gpmon superuser,andenabletheCommandCenteragents:
$su-gpadmin
$gpperfmon_install--enable--passwordchangeme--port5432
$gpstop-r
©CopyrightPivotalSoftwareInc,2013-2016
40
3.0
gpcmdr
ConfiguresandmanagesinstancesoftheCommandCenterConsole.
gpcmdr[--ssh_full_path<path>]
--setup[[<section_header]>--config_file<path>]
|--start[<instance_name>]
|--stop[<instance_name>]
|--restart[<instance_name>]
|--migrate[<instance_name>]
|--remove[<instance_name>]
|--status[<instance_name>]
Type
--setup
Description
Configuresconsolecomponentsontheinstallationhost.Withthisoption, gpcmdr promptsforvaluestoconfigurethe
componentsandwritesthevaluesto app.conf .Formoreinformationontheseconfigurationparameters,seeConfigurationFile
Reference.
SetsthepathtoaconfigurationfiletousetosetupnewCommandCenterinstances.Thisoptionmustbeusedwiththe --setup
-config_file
option.SeeSetupConfigurationFileforinformationabouttheformatandcontentofthisconfigurationfile.Ifsection_headeris
supplied, gpcmdr onlysetsuptheinstancedefinedinthenamedsectionintheconfigurationfile.Otherwise, gpcmdr setsupall
instancesintheconfigurationfile.
--start
Startsthespecifiedinstance(orallinstancesbydefault)anditsassociatedwebservice.
--stop
Stopsthespecifiedinstance(orallinstancesbydefault)anditsassociatedwebservice.
--migrate
CopiesCommandCenterinstances(orallinstancesbydefault)fromapreviousinstallation.
--remove
Removesthespecifiedinstanceanditsassociateddatabaseschema.
--restart
Restartsthespecifiedinstance(orallinstancesbydefault)anditsassociatedwebservice.
--status
Displaysthestatus,either Running or Stopped ,ofthewebservice.
--version
Displaystheversionofthe gpcmdr utility.
-ssh_full_path
Setsthefullpathtothesshcommand.Usethistooverridethesshcommandfoundonthepath.
Description
The gpcmdr utilitysetsupandconfiguresCommandCenterConsoleinstances,startsandstopsinstances,andprovidesstatusinformation.
YoucansetupanewCommandCenterConsoleinstanceinteractivelyor,byprovidingaconfigurationfile,non-interactively.
Foractions --start , --stop , --restart , --migrate ,and --status youcanspecifyaconsoleinstancename.Ifyoudonotspecifyaname,theactionappliestoall
existingconsoleinstances.
The --migrate optionpromptsyoutoenterthepathtotheCommandCenterinstallationwithinstancesyouwanttomigrate.Theutilitycheckswhether
theinstancetocopyalreadyexistsinthenewlocationbeforecopying.Iftheinstanceexistsinthenewlocation,apromptaskswhetheryouwantto
overwritetheinstance.
Examples
InteractivelycreateanewCommandCenterConsoleinstance:
$gpcmdr--setup
SetuptheCommandCenterConsoleinstancedefinedinthe [development] sectionofaconfigurationfile:
$gpmcdr--setupdevelopmentgpccinstances.cfg
CheckthestatusofallCommandCenterConsoleinstances:
©CopyrightPivotalSoftwareInc,2013-2016
41
3.0
$gpcmdr--status
©CopyrightPivotalSoftwareInc,2013-2016
42
3.0
ConfigurationFileReference
ReferencesforGreenplumCommandCenterconfigurationfiles.
ConfigurationparametersforGreenplumCommandCenterarestoredinthefollowingfiles:
$MASTER_DATA_DIRECTORY/gpperfmon/conf/gpperfmon.conf
StoresconfigurationparametersfortheGreenplumCommandCenteragents.
$GPPERFMONHOME/instances/<instance_name>/webserver/conf/app.conf
StoresconfigurationparametersfortheCommandCenterwebapplicationandwebserver.
$MASTER_DATA_DIRECTORY/postgresql.conf
StoresconfigurationparameterstoenabletheGreenplumCommandCenterfeatureforGreenplumDatabaseserver.
$GPPERFMONHOME/bin/ssh-wrapper
GreenplumCommandCenternormallyfindsthe ssh commandonthepath.Ifyourenvironmenthasanincompatibleimplementationofthis
commandonthepath,youcanprovidetheabsolutepathtoyourversioninthe ssh-wrapper script,locatedat
$GPPERFMONHOME/bin/ssh-wrapper .
Forexample:
ssh="/home/me/bin/myssh"
Anysystemuserwithwritepermissionstothesedirectoriescanedittheseconfigurationfiles.
©CopyrightPivotalSoftwareInc,2013-2016
43
3.0
CommandCenterAgentParameters
The $MASTER_DATA_DIRECTORY/gpperfmon/conf/gpperfmon.conf filestoresconfigurationparametersfortheCommandCenteragents.Forconfiguration
changestotheseoptionstotakeeffect,youmustsave gpperfmon.conf andthenrestartGreenplumDatabaseserver( gpstop- ).
r
ToenabletheCommandCenteragentswithinGreenplumDatabaseserver,youmustalsosettheGreenplumDatabaseServerConfigurationParameters,
seeCommandCenterDatabaseReferencefordetails.
log_location
SpecifiesadirectorylocationforCommandCenterlogfiles.Defaultis $MASTER_DATA_DIRECTORY/gpperfmon/logs .
min_query_time
Specifiestheminimumqueryruntimeinsecondsforstatisticscollection.CommandCenterlogsallqueriesthatrunlongerthanthisvalueinthe
queries_historytable.Forquerieswithshorterruntimes,nohistoricaldataiscollected.Defaultsto20seconds.
Ifyouknowthatyouwanttocollectdataforallqueries,youcansetthisparametertoalowvalue.Settingtheminimumqueryruntimetozero,
however,collectsdataevenforthenumerousqueriesrunbyCommandCenteritself,creatingalargeamountofdatathatmaynotbeuseful.
min_detailed_query_time
Specifiestheminimumiteratorruntimeinsecondsforstatisticscollection.CommandCenterlogsalliteratorsthatrunlongerthanthisvalueinthe
iterators_historytable.Foriteratorswithshorterruntimes,nodataiscollected.Minimumvalueis10seconds.
Thisparameter’svaluemustalwaysbeequalto,orgreaterthan,thevalueof min_query_time .Setting min_detailed_query_time higherthan
min_query_time allowsyoutologdetailedqueryplaniteratordataonlyforespeciallycomplex,long-runningqueries,whilestillloggingbasicquery
dataforshorterqueries.
Giventhecomplexityandsizeofiteratordata,youmaywanttoadjustthisparameteraccordingtothesizeofdatacollected.Ifthe iterators_* tables
aregrowingtoexcessivesizewithoutprovidingusefulinformation,youcanraisethevalueofthisparametertologiteratordetailforfewerqueries.
max_log_size
Thisparameterisnotincludedingpperfmon.conf,butitmaybeaddedtothisfileforusewithGreenplumCommandCenter.
Topreventthelogfilesfromgrowingtoexcessivesize,youcanaddthe max_log_size parameterto gpperfmon.conf .Thevalueofthisparameteris
measuredinbytes.Forexample:
max_log_size=10485760
Withthissetting,thelogfileswillgrowto10MBbeforethesystemrollsovertoanewlogfile.
partition_age
ThenumberofmonthsthatGreenplumCommandCenterstatisticsdatawillberetained.Thedefaultitis0,whichmeanswewon’tdropanydata.
quantum
SpecifiesthetimeinsecondsbetweenupdatesfromCommandCenteragentsonallsegments.Validvaluesare10,15,20,30,and60.Defaultsto15
seconds.
Ifyoupreferalessgranularviewofperformance,orwanttocollectandanalyzeminimalamountsofdataforsystemmetrics,chooseahigher
quantum.Tocollectdatamorefrequently,choosealowervalue.
ignore_qexec_packet
Whensettotrue,GreenplumCommandCenteragentsdonotcollectperformancedatainthe gpperfmon database queries_* tables:
rows_out , cpu_elapsed , cpu_currpct , skew_cpu ,and skew_rows .Thedefaultsetting,true,reducestheamountofmemoryconsumedby
thegpmmonprocess.Setthisparametertofalseifyourequirethisadditionalperformancedata.
smdw_aliases
Thisparameterallowsyoutospecifyadditionalhostnamesforthestandbymaster.Forexample,ifthestandbymasterhastwoNICs,youcanenter:
smdw_aliases=smdw-1,smdw-2
ThisoptionalfaulttoleranceparameterisusefuliftheGreenplumCommandCenterlosesconnectivitywiththestandbymaster.Insteadof
continuouslyretryingtoconnecttohostsmdw,itwilltrytoconnecttotheNIC-basedaliasesof smdw-1 and/or smdw-2 .Thisensuresthatthe
CommandCenterConsolecancontinuouslypollandmonitorthestandbymaster.
©CopyrightPivotalSoftwareInc,2013-2016
44
3.0
©CopyrightPivotalSoftwareInc,2013-2016
45
3.0
CommandCenterConsoleParameters
EachinstanceoftheCommandCenterConsolehasaconfigurationfilelocatedat $GPPERFMONHOME/instances/<instance_name>/webserver/conf/app.conf .
Aftereditingthisfile,reloadtheconfigurationbyrestartingtheCommandCenterConsoleinstance( gpperfmon--restart
).
<instance_name>
appname = gpmonws
Thewebserverbinaryfile.Donotchange.
listentcp4 = [true | false]
When true ,theaddresstypeistcp4.Thedefaultis true .
runmode = [prod | dev | test]
Theapplicationmode,whichcanbe dev , prod or test .Thedefaultis dev .In dev modeCommandCentershowsuserfriendlyerrorpages.
Userfriendlyerrorpagesarenotrenderedin prod mode.
session = [true | false]
Usesessionstomanageuserexperience.Thedefaultis true .Sessionsarestoredinmemory.
enablexsrf = [true | false]
EnableCSRFprotection.
xsrfexpire = <seconds>
CSRFexpiretime.Thedefaultis 43200 seconds.
xsrfkey = <token_string>
TheCSRFtoken.
rendertype = json
Therendertypeofwebserver.Donotchange.
printallsqls = [true | false]
PrintallbackendgpperfmonSQLtothewebserverconsole.Thedefaultis false .
sessionname = webserver_gpperfmon_instance_<instance_name>
ThenameofthesessioninGreenplumDatabase.Donotchange.
display_name = <display_name>
Thedisplaynameforconsole.
master_host = <hostname>
TheGreenplumDatabasehostname.Thedefaultis localhost .
master_port = <port>
TheGreenplumDatabasemasterport.Thedefaultis 5432 .
HTTPSCertFile = </path/to/cert.pem>
Thefullpathtotheserver’sSSLcertificate,ifSSLisenabled.
HTTPSKeyFile = <path/to/cert.pem>
ThecertificatefileforSSL,ifSSLisenabled.
EnableHTTPS = [true | false]
EnablelisteningonthesecureSSLport.Thedefaultis true .
EnableHTTP = [true | false]
EnablelisteningontheHTTPport.Defaultis false .
httpsport = [port]
Thewebserverport.Thedefaultis28080.
©CopyrightPivotalSoftwareInc,2013-2016
46
3.0
SetupConfigurationFile
AsetupconfigurationfilecontainspropertiesusedtodefineoneormoreGreenplumCommandCenterinstanceswhen gpcmdr isrunwiththe
--config_file option.
TheconfigurationfileusesthePythonconfigurationfileformat,similartotheMicrosoftINIfileformat.Thefilecontainssections,introducedbya
[section] header,andfollowedby name:value or name=value entries,oneperline.Commentsbeginwitha # or ; characterandcontinuethroughthe
endoftheline.A [DEFAULT] sectionsetsdefaultvaluesforparametersthatmaybeoverrideninothersections.
SeeSettingUpCommandCenterInstanceswithaConfigurationFileformoreinformation.
Parameters
remote_db
True
iftheinstanceistorunonadifferenthost.Default: False .
master_host
ThenameofthehostwheretheGreenplumCommandCenterConsoleistobesetup,if remote_db is True .
instance_name
Thenameoftheinstancetosetup.Thiswillbecomethenameofasubdirectoryinthe instances directorywheretheinstancesconfigurationand
logfilesarestored.Instancenamesmaycontainletters,digits,andunderscoresandarenotcasesensitive.
display_name
ThenametodisplayfortheinstanceintheCommandCenteruserinterface.Displaynamesmaycontainletters,digits,andunderscoresandarecase
sensitive. instance_name isusedfor display_name ifthisparameterisnotprovided.
master_port
TheGreenplumDatabasemasterport.Default: 5432 .
webserver_port
ThelistenportfortheCommandCentergowebserver.ThisportmustbedifferentforeachCommandCenterConsoleinstanceonthehost.Default:
28080 .
enable_ssl
True
ifclientconnectionstotheCommandCenterwebservershouldbesecuredwithSSL.Default: False .
enable_user_cert
True iftheservercertificateissuppliedbytheuser.If False (default)and enable_ssl is True , gpcmdr generatesacertificateduringsetup.
Dataforthecertificate’sCNisenteredinteractivelyduringsetup.Default: False .
ssl_cert_file
If enable_user_cert is True ,setthisparametertothefullpathtoavalidcertificateinPEMfileformat.
enable_copy_standby
Setto True tohave gpcmdr installtheinstanceconfigurationontheGreenplumstandbymasterhost.
standby_master_host
ThenameoftheGreenplumstandbymasterhost.Requiredwhen enable_copy_standby is True .
Examples
ThisexampleconfigurationsetsuptwoCommandCenterinstances, prod and dev .Parametersinthe [DEFAULT] sectionapplytoallinstancesand
maybeoverriddenbyparametersinthe [production] and [development] sections.
©CopyrightPivotalSoftwareInc,2013-2016
47
3.0
[DEFAULT]
remote_db=false
master_port=5432
#Youneedtoset'enable_user_cert'totruetoimportyourownpemfile
enable_user_cert=true
ssl_cert_file=/tmp/cert.pem
[development]
instance_name=development
enable_copy_standby=false
webserver_port=28080
enable_ssl=false
[production]
instance_name=production
display_name=OurProduction
remote_db=true
master_host=mdw
master_port=15432
webserver_port=28081
enable_ssl=true
enable_user_cert=true
enable_copy_standby=true
standby_master_host=smdw
Thisexampleconfigurationhasonlyoneinstance,sothe [DEFAULT] sectionandsectionheadersarenotnecessary.
instance_name=single
display_name=SINGLE
remote_db=true
master_host=10.152.10.149
master_port=5432
webserver_port=28082
enable_ssl=true
enable_user_cert=true
ssl_cert_file=/tmp/cert.pem
enable_copy_standby=true
standby_master_host=192.0.2.156
©CopyrightPivotalSoftwareInc,2013-2016
48
3.0
GreenplumDatabaseServerConfigurationParameters
Thefollowingparametersmustbeuncommentedandsetintheserverconfigurationfile( postgresql.conf )inordertoenabletheCommandCenterdata
collectionagents:
gp_enable_gpperfmon
and gpperfmon_port mustbesetinboththemasterandsegment postgresql.conf files.
gp_enable_gpperfmon
and gp_enable_gpperfmon onlyneedtobesetinthemaster postgresql.conf file.
Afterchangingthesesettings,theGreenplumDatabaseinstancemustberestartedforthechangestotakeeffect.
gp_enable_gpperfmon
TurnsontheCommandCenterdatacollectionagentforasegment.Mustbesetinall postgresql.conf files(masterandallsegments).
gpperfmon_port
ThedefaultportfortheCommandCenteragentsis8888,butyoucansetthisparametertoadifferentportifrequired(masterandallsegments).
gp_gpperfmon_send_interval
SetsthefrequencyinsecondsthattheGreenplumDatabaseserverprocessessendqueryexecutionupdatestotheCommandCenteragent
processes.
gp_external_enable_exec
Thisparameterisenabledbydefaultandmustremainenabled.ItallowstheuseofexternaltablesthatexecuteOScommandsorscriptsonthe
segmenthosts.TheCommandCenteragentsusethistypeofexternaltablestocollectcurrentsystemmetricsfromthesegments.
gpperfmon_log_alert_level
Controlswhichmessagelevelsarewrittentothegpperfmonlog.Eachlevelincludesallthelevelsthatfollowit.Thelaterthelevel,thefewer
messagesaresenttothelog.Thedefaultvalueiswarning.
©CopyrightPivotalSoftwareInc,2013-2016
49
3.0
CommandCenterDatabaseReference
ReferencesfortheGreenplumCommandCenter gpperfmon databasetables.
TheCommandCenterdatabaseconsistsofthreesetsoftables; now tablesstoredataoncurrentsystemmetricssuchasactivequeries, history tables
storedataonhistoricalmetrics,and tail tablesarefordataintransition. Tail tablesareforinternaluseonlyandshouldnotbequeriedbyusers.The
now and tail dataarestoredastextfilesonthemasterhostfilesystem,andaccessedbytheCommandCenterdatabaseviaexternaltables.The
history tablesareregulardatabasetablesstoredwithintheCommandCenter( gpperfmon )database.
Thedatabaseconsistsofthreesetsoftables:
now
tablesstoredataoncurrentsystemmetricssuchasactivequeries.
history
tail
tablesstoredatahistoricalmetrics.
tablesarefordataintransition.Thesetablesareforinternaluseonlyandshouldnotbequeriedbyendusers.
Thedatabasecontainsthefollowingcategoriesoftables:
Thedatabase_*tablesstorequeryworkloadinformationforaGreenplumDatabaseinstance.
Theemcconnect_historytabledisplaysinformationaboutConnectEMCeventsandalerts.ConnectEMCeventsaretriggeredbasedonahardware
failure,afixtoafailedhardwarecomponent,oraGreenplumDatabasestartup.OnceanConnectEMCeventistriggered,analertissenttoEMC
Support.
Thediskspace_*tablesstorediskspacemetrics.
Thefilerep_*tablesstorehealthandstatusmetricsforthefilereplicationprocess.Thisprocessishowhigh-availability/mirroringisachievedin
GreenplumDatabaseinstance.Statisticsaremaintainedforeachprimary-mirrorpair.
Thehealth_*tablesstoresystemhealthmetricsfortheEMCDataComputingAppliance.
Theinterface_stats_*tablesstorestatisticalmetricsforeachactiveinterfaceofaGreenplumDatabaseinstance.Note:Thesetablesareinplacefor
futureuseandarenotcurrentlypopulated.
Theiterators_*tablesstoreinformationaboutqueryplaniteratorsandtheirmetrics.Aqueryiteratorreferstoanodeoroperationinaqueryplan.
Thelog_alert_*tablesstoreinformationaboutpg_logerrorsandwarnings.
Thequeries_*tablesstorehigh-levelquerystatusinformation.
Thesegment_*tablesstorememoryallocationstatisticsfortheGreenplumDatabasesegmentinstances.
Thesocket_stats_*tablesstorestatisticalmetricsaboutsocketusageforaGreenplumDatabaseinstance.Note:Thesetablesareinplaceforfuture
useandarenotcurrentlypopulated.
Thesystem_*tablesstoresystemutilizationmetrics.
Thetcp_stats_*tablesstorestatisticalmetricsaboutTCPcommunicationsforaGreenplumDatabaseinstance.Note:Thesetablesareinplacefor
futureuseandarenotcurrentlypopulated.
Theudp_stats_*tablesstorestatisticalmetricsaboutUDPcommunicationsforaGreenplumDatabaseinstance.Note:Thesetablesareinplacefor
futureuseandarenotcurrentlypopulated.
TheCommandCenterdatabasealsocontainsthefollowingviews:
Thedynamic_memory_infoviewshowsanaggregateofallthesegmentsperhostandtheamountofdynamicmemoryusedperhost.
Theiterators_*_rollupsetofviewssummarizethequeryiteratormetricsacrossallsegmentsinthesystem.
Thememory_infoviewshowsper-hostmemoryinformationfromthe system_history and segment_history tables.
©CopyrightPivotalSoftwareInc,2013-2016
50
3.0
database_*
The database_* tablesstorequeryworkloadinformationforaGreenplumDatabaseinstance.Therearethreedatabasetables,allhavingthesame
columns:
database_now isanexternaltablewhosedatafilesarestoredin $MASTER_DATA_DIRECTORY/gpperfmon/data .Currentqueryworkloaddataisstored
in database_now duringtheperiodbetweendatacollectionfromtheCommandCenteragentsandautomaticcommitmenttothe
database_history table.
database_tail isanexternaltablewhosedatafilesarestoredin $MASTER_DATA_DIRECTORY/gpperfmon/data .Thisisatransitionaltableforquery
workloaddatathathasbeenclearedfromdatabase_nowbuthasnotyetbeencommittedto database_history .Ittypicallyonlycontainsafew
minutesworthofdata.
database_history isaregulartablethatstoreshistoricaldatabase-widequeryworkloaddata.Itispre-partitionedintomonthlypartitions.
Partitionsareautomaticallyaddedintwomonthincrementsasneeded.Administratorsmustdropoldpartitionsforthemonthsthatarenolonger
needed.
Column
Type
Description
ctime
timestamp
Timethisrowwascreated.
queries_total
int
ThetotalnumberofqueriesinGreenplumDatabaseatdatacollectiontime.
queries_running
int
Thenumberofactivequeriesrunningatdatacollectiontime.
queries_queued
int
Thenumberofquerieswaitinginaresourcequeueatdatacollectiontime.
©CopyrightPivotalSoftwareInc,2013-2016
51
3.0
emcconnect_history
The emcconnect_history tabledisplaysinformationaboutConnectEMCeventsandalerts.ConnectEMCeventsaretriggeredbasedonahardwarefailure,a
fixtoafailedhardwarecomponent,oraGreenplumDatabaseinstancestartup.OnceanConnectEMCeventistriggered,analertissenttoEMCSupport.
Thistableispre-partitionedintomonthlypartitions.Partitionsareautomaticallyaddedinonemonthincrementsasneeded.Administratorsmustdrop
oldpartitionsforthemonthsthatarenolongerneeded.
Note:ThistableonlyappliestoGreenplumDataComputingApplianceplatforms.
ctime
timestamp(0)withouttimezone
TimethisConnectEMCeventoccurred.
hostname
varchar(64)
ThehostnameassociatedwiththeConnectEMC
event.
symptom_code
int
Ageneralsymptomcodeforthistypeofevent.
Foralistofsymptomcodes,seetheEMC
GreenplumDCAInstallationandConfiguration
Guide.
detailed_symptom_code
int
Aspecificsymptomcodeforthistypeofevent.
description
text
Adescriptionofthistypeofevent,basedonthe
detailed_symptom_code .
snmp_oid
text
TheSNMPobjectIDoftheelement/component
wheretheeventoccurred,whereapplicable.
TheseverityleveloftheConnectEMCevent.One
of:
WARNING :Aconditionthatmightrequire
immediateattention.
ERROR
:AnerroroccurredontheDCA.System
operationand/orperformanceislikelyaffected.
Thisalertrequiresimmediateattention.
severity
text
UNKNOWN :Thisseveritylevelisassociated
withhostsanddevicesontheDCAthatare
eitherdisabled(duetohardwarefailure)or
unreachableforsomeotherreason.Thisalert
requiresimmediateattention.
INFO :Apreviouslyreportederrorconditionis
nowresolved.GreenplumDatabasestartupalso
triggersanINFOalert.
status
Thecurrentstatusofthesystem.Thestatusis
always OK unlessaconnectiontothe
server/switchcannotbemade,inwhichcasethe
statusis FAILED .
text
True ifanattemptwasmadetosendanalertto
EMCsupport.
attempted_transport
message
boolean
False ifyoursystemwasconfigurednottosend
alerts.
Thetextoftheerrormessagecreatedasaresult
ofthisevent.
text
©CopyrightPivotalSoftwareInc,2013-2016
52
3.0
diskspace_*
The diskspace_* tablesstorediskspacemetrics.
diskspace_now isanexternaltablewhosedatafilesarestoredin $MASTER_DATA_DIRECTORY/gpperfmon/data .Currentdiskspacemetricsarestored
in database_now duringtheperiodbetweendatacollectionfromtheCommandCenteragentsandautomaticcommitmenttothe
diskspace_history table.
diskspace_tail isanexternaltablewhosedatafilesarestoredin $MASTER_DATA_DIRECTORY/gpperfmon/data .Thisisatransitionaltablefor
diskspacemetricsthathavebeenclearedfrom diskspace_now buthasnotyetbeencommittedto diskspace_history .Ittypicallyonlycontainsa
fewminutesworthofdata.
diskspace_history isaregulartablethatstoreshistoricaldiskspacemetrics.Itispre-partitionedintomonthlypartitions.Partitionsare
automaticallyaddedintwomonthincrementsasneeded.Administratorsmustdropoldpartitionsforthemonthsthatarenolongerneeded.
Column
Type
Description
ctime
timestamp(0)withouttimezone
Timeofdiskspacemeasurement.
hostname
varchar(64)
Thehostnameassociatedwiththediskspacemeasurement.
Filesystem
text
Nameofthefilesystemforthediskspacemeasurement.
total_bytes
bigint
Totalbytesinthefilesystem.
bytes_used
bigint
Totalbytesusedinthefilesystem.
bytes_available
bigint
Totalbytesavailableinfilesystem.
©CopyrightPivotalSoftwareInc,2013-2016
53
3.0
filerep_*
The filerep* tablesstorehigh-availabilityfilereplicationprocessinformationforaGreenplumDatabaseinstance.Therearethreefilereptables,allhaving
thesamecolumns:
filerep_now
filerep_now
isanexternaltablewhosedatafilesarestoredin $MASTER_DATA_DIRECTORY/gpperfmon/data .Currentfilereplicationdataisstoredin
duringtheperiodbetweendatacollectionfromtheCommandCenteragentsandautomaticcommitmenttothe filerep_history
table.
filerep_tail isanexternaltablewhosedatafilesarestoredin $MASTER_DATA_DIRECTORY/gpperfmon/data .Thisisatransitionaltableforfile
replicationdatathathasbeenclearedfrom filerep_now buthasnotyetbeencommittedto filerep_history .Ittypicallyonlycontainsafew
minutesworthofdata.
filerep_history isaregulartablethatstoreshistoricaldatabase-widefilereplicationdata.Itispre-partitionedintomonthlypartitions.Partitions
areautomaticallyaddedintwomonthincrementsasneeded.Administratorsmustdropoldpartitionsforthemonthsthatarenolongerneeded.
ctime
timestamp
Timethisrowwascreated.
primary_measurement_microsec
bigint
Thelengthoftimeoverwhichprimarymetrics
(containedinUDPmessages)weregathered.
mirror_measurement_microsec
bigint
Thelengthoftimeoverwhichmirrormetrics
(containedinUDPmessages)weregathered.
primary_hostname
varchar(64)
Thenameoftheprimaryhost.
primary_port
int
Theportnumberoftheprimaryhost.
mirror_hostname
varchar(64)
Thenameofthemirrorhost.
mirror_port
int
Theportnumberofthemirrorhost.
primary_write_syscall_bytes_avg
bigint
Theaverageamountofdatawrittentodiskon
theprimaryforwritesystemcallsperinterval.
primary_write_syscall_byte_max
bigint
Themaximumamountofdatawrittentodisk
ontheprimaryforwritesystemcallsper
interval.
primary_write_syscall_microsecs_avg
bigint
Theaveragetimerequiredforawritesystem
calltowritedatatodiskontheprimaryper
interval.
primary_write_syscall_microsecs_max
bigint
primary_write_syscall_per_sec
doubleprecision
Thenumberofwritesystemcallsonthe
primarypersecond.Itreflectsonlythetimeto
queuethewritetodiskinmemory.
primary_fsync_syscall_microsec_avg
bigint
Theaverageamountoftimerequiredforafile
syncsystemcalltowritedatatodiskonthe
primaryperinterval.
primary_fsync_syscall_microsec_max
bigint
Themaximumamountoftimerequiredforafile
syncsystemcalltowritedatatodiskonthe
primaryperinterval.
primary_fsync_syscall_per_sec
doubleprecision
Thenumberoffilesyncsystemcallsonthe
primarypersecond.Unlikewritesystemcalls
whichreturnimmediatelyafterthedatais
posted/queued,filesyncsystemcallswaitfor
alloutstandingwritestobewrittentodisk.File
syncsystemcallvaluesinthiscolumnreflect
actualdiskaccesstimesforpotentiallylarge
amountsofdata.
primary_write_shmem_bytes_avg
bigint
Themaximumtimerequiredforawritesystem
©CopyrightPivotalSoftwareInc,2013-2016
calltowritedatatodiskontheprimaryper
interval.
Theaverageamountofdatawrittentoshared
54
3.0
primary_write_shmem_bytes_avg
bigint
primary_write_shmem_bytes_max
bigint
Themaximumamountofdatawrittentoshared
memoryontheprimaryperinterval.
primary_write_shmem_microsec_avg
bigint
Theaverageamountoftimerequiredtowrite
datatosharedmemoryontheprimaryper
interval.
primary_write_shmem_microsec_max
bigint
Themaximumamountoftimerequiredtowrite
datatosharedmemoryontheprimaryper
interval.
primary_write_shmem_per_sec
doubleprecision
Thenumberofwritestosharedmemoryonthe
primarypersecond.
memoryontheprimaryperinterval.
Theaverageamountoftimerequiredbythefile
syncsystemcalltowritedatatosharedmemory
ontheprimaryperinterval.
primary_fsync_shmem_microsec_avg
bigint
primary_fsync_shmem_microsec_max
bigint
Themaximumamountoftimerequiredbythe
filesyncsystemcalltowritedatatoshared
memoryontheprimaryperinterval.
primary_fsync_shmem_per_sec
doubleprecision
Thenumberoffilesynccallstosharedmemory
ontheprimarypersecond.Filesyncsystemcall
valuesinthiscolumnreflectactualdiskaccess
timesforpotentiallylargeamountsofdata.
primary_write_shmem_per_sec
doubleprecision
Thenumberofwritestosharedmemoryonthe
primarypersecond.
primary_fsync_shmem_microsec_avg
bigint
Theaverageamountoftimerequiredbythefile
syncsystemcalltowritedatatosharedmemory
ontheprimaryperinterval.
primary_fsync_shmem_microsec_max
bigint
Themaximumamountoftimerequiredbythe
filesyncsystemcalltowritedatatoshared
memoryontheprimaryperinterval.
doubleprecision
Thenumberoffilesynccallstosharedmemory
ontheprimarypersecond.Filesyncsystemcall
valuesinthiscolumnreflectactualdiskaccess
timesforpotentiallylargeamountsofdata.
primary_fsync_shmem_per_sec
Theaverageamountoftimerequiredfora
roundtripfilesyncbetweentheprimaryandthe
mirrorperinterval.Thisincludes:
1. Thequeuingofafilesyncmessagefrom
theprimarytothemirror.
primary_roundtrip_fsync_msg_microsec_avg
bigint
2. Themessagetraversingthenetwork.
3. Theexecutionofthefilesyncbythe
mirror.
4. Thefilesyncacknowledgementtraversing
thenetworkbacktotheprimary.
Themaximumamountoftimerequiredfora
roundtripfilesyncbetweentheprimaryandthe
mirrorperinterval.Thisincludes:
©CopyrightPivotalSoftwareInc,2013-2016
55
3.0
1. Thequeuingofafilesyncmessagefrom
theprimarytothemirror.
primary_roundtrip_fsync_msg_microsec_max
bigint
2. Themessagetraversingthenetwork.
3. Theexecutionofthefilesyncbythe
mirror.
4. Thefilesyncacknowledgementtraversing
thenetworkbacktotheprimary.
primary_roundtrip_fsync_msg_per_sec
primary_roundtrip_test_msg_microsec_avg
primary_roundtrip_test_msg_microsec_max
primary_roundtrip_test_msg_per_sec
doubleprecision
Thenumberofroundtripfilesyncspersecond.
bigint
Theaverageamountoftimerequiredfora
roundtriptestmessagebetweentheprimary
andthemirrortocompleteperinterval.Thisis
similarto primary_roundtrip_fsync_msg_microsec_avg ,
exceptitdoesnotincludeadiskaccess
component.Becauseofthis,thisisauseful
metricthatshowstheaverageamountof
networkdelayinthefilereplicationprocess.
bigint
Themaximumamountoftimerequiredfora
roundtriptestmessagebetweentheprimary
andthemirrortocompleteperinterval.Thisis
similarto primary_roundtrip_fsync_msg_microsec_max
,exceptitdoesnotincludeadiskaccess
component.Becauseofthis,thisisauseful
metricthatshowsthemaximumamountof
networkdelayinthefilereplicationprocess.
Thenumberofroundtripfilesyncspersecond.
Thisissimilarto
primary_roundtrip_fsync_msg_per_sec ,exceptitdoes
notincludeadiskaccesscomponent.Assuch,
thisisausefulmetricthatshowstheamountof
networkdelayinthefilereplicationprocess.
doubleprecision
Notethattestmessagestypicallyoccuronce
perminute,soitiscommontoseeavalueof“0”
fortimeperiodsnotcontainingatestmessage.
mirror_write_syscall_size_avg
bigint
Theaverageamountofdatawrittentodiskon
themirrorforwritesystemcallsperinterval.
mirror_write_syscall_size_max
bigint
Themaximumamountofdatawrittentodisk
onthemirrorforwritesystemcallsperinterval.
mirror_write_syscall_microsec_avg
bigint
Theaveragetimerequiredforawritesystem
calltowritedatatodiskonthemirrorper
interval.
mirror_write_syscall_microsec_max
bigint
Themaximumtimerequiredforawritesystem
calltowritedatatodiskonthemirrorper
interval.
primary_roundtrip_test_msg_per_sec
Thenumberofroundtripfilesyncspersecond.
Thisissimilarto
primary_roundtrip_fsync_msg_per_sec ,exceptitdoes
notincludeadiskaccesscomponent.Assuch,
thisisausefulmetricthatshowstheamountof
networkdelayinthefilereplicationprocess.
doubleprecision
©CopyrightPivotalSoftwareInc,2013-2016
56
3.0
Notethattestmessagestypicallyoccuronce
perminute,soitiscommontoseeavalueof“0”
fortimeperiodsnotcontainingatestmessage.
mirror_write_syscall_size_avg
Theaverageamountofdatawrittentodiskon
themirrorforwritesystemcallsperinterval.
bigint
Themaximumamountofdatawrittentodisk
mirror_write_syscall_size_max
bigint
onthemirrorforwritesystemcallsperinterval.
mirror_write_syscall_microsec_avg
bigint
Theaveragetimerequiredforawritesystem
calltowritedatatodiskonthemirrorper
interval.
©CopyrightPivotalSoftwareInc,2013-2016
57
3.0
health_*
The health_* tablesstoresystemhealthmetricsfortheEMCDataComputingAppliance.Therearethreehealthtables,allhavingthesamecolumns:
Note:ThistableonlyappliestoGreenplumDataComputingApplianceplatforms.
health_now
system_now
isanexternaltablewhosedatafilesarestoredin $MASTER_DATA_DIRECTORY/gpperfmon/data .Currentsystemhealthdataisstoredin
duringtheperiodbetweendatacollectionfromtheCommandCenteragentsandautomaticcommitmenttothe system_history table.
health_tail isanexternaltablewhosedatafilesarestoredin $MASTER_DATA_DIRECTORY/gpperfmon/data .Thisisatransitionaltableforsystem
healthdatathathasbeenclearedfrom system_now buthasnotyetbeencommittedto system_history .Ittypicallyonlycontainsafewminutes
worthofdata.
health_history isaregulartablethatstoreshistoricalsystemhealthmetrics.Itispre-partitionedintomonthlypartitions.Partitionsare
automaticallyaddedintwomonthincrementsasneeded.Administratorsmustdropoldpartitionsforthemonthsthatarenolongerneeded.
Column
Type
Description
ctime
timestamp(0)
withouttimezone
Timethissnapshotofhealthinformationaboutthissystemwascreated.
hostname
varchar(64)
Segmentormasterhostnameassociatedwiththishealthinformation.
symptom_code
int
Thesymptomcoderelatedtothecurrenthealth/statusofanelementorcomponentofthesystem.
detailed_symptom_code
int
Amoregranularsymptomcoderelatedtothehealth/statusofaelementorcomponentofthe
system.
description
text
Adescriptionofthehealth/statusofthissymptomcode.
snmp_oid
text
TheSNMPobjectIDoftheelement/componentwheretheeventoccurred,whereapplicable.
status
text
message
text
Thecurrentstatusofthesystem.Thestatusisalways OK unlessaconnectiontotheserver/switch
cannotbemade,inwhichcasethestatusis FAILED .
Thetextoftheerrormessagecreatedasaresultofthisevent.
©CopyrightPivotalSoftwareInc,2013-2016
58
3.0
interface_stats_*
The interface_stats_* tablesstorestatisticalmetricsaboutcommunicationsovereachactiveinterfaceforaGreenplumDatabaseinstance.
Thesetablesareinplaceforfutureuseandarenotcurrentlypopulated.
Therearethree interface_stats tables,allhavingthesamecolumns:
interface_stats_now
isanexternaltablewhosedatafilesarestoredin $MASTER_DATA_DIRECTORY/gpperfmon/data .
interface_stats_tail isanexternaltablewhosedatafilesarestoredin $MASTER_DATA_DIRECTORY/gpperfmon/data .Thisisatransitionaltablefor
statisticalinterfacemetricsthathasbeenclearedfrom interface_stats_now buthasnotyetbeencommittedto interface_stats_history .It
typicallyonlycontainsafewminutesworthofdata.
interface_stats_history isaregulartablethatstoresstatisticalinterfacemetrics.Itispre-partitionedintomonthlypartitions.Partitionsare
automaticallyaddedinonemonthincrementsasneeded.Administratorsmustdropoldpartitionsforthemonthsthatarenolongerneeded.
Column
Type
Description
interface_name
string
Nameoftheinterface.Forexample:eth0,eth1,lo.
bytes_received
bigint
Amountofdatareceivedinbytes.
packets_received
bigint
Numberofpacketsreceived.
receive_errors
bigint
Numberoferrorsencounteredwhiledatawasbeingreceived.
receive_drops
bigint
Numberoftimespacketsweredroppedwhiledatawasbeingreceived.
receive_fifo_errors
bigint
NumberoftimesFIFO(firstinfirstout)errorswereencounteredwhiledatawasbeingreceived.
receive_frame_errors
bigint
Numberofframeerrorswhiledatawasbeingreceived.
receive_compressed_packets
int
Numberofpacketsreceivedincompressedformat.
receive_multicast_packets
int
Numberofmulticastpacketsreceived.
bytes_transmitted
bigint
Amountofdatatransmittedinbytes.
packets_transmitted
bigint
Amountofdatatransmittedinbytes.
packets_transmitted
bigint
Numberofpacketstransmitted.
transmit_errors
bigint
Numberoferrorsencounteredduringdatatransmission.
transmit_drops
bigint
Numberoftimespacketsweredroppedduringdatatransmission.
transmit_fifo_errors
bigint
Numberoftimesfifoerrorswereencounteredduringdatatransmission.
transmit_collision_errors
bigint
Numberoftimescollisionerrorswereencounteredduringdatatransmission.
transmit_carrier_errors
bigint
Numberoftimescarriererrorswereencounteredduringdatatransmission.
transmit_compressed_packets
int
Numberofpacketstransmittedincompressedformat.
©CopyrightPivotalSoftwareInc,2013-2016
59
3.0
iterators_*
The iterators_* tablesstoreinformationaboutqueryplaniteratorsandtheirmetrics.Aqueryiteratorreferstoanodeoroperationinaqueryplan.For
example,asequentialscanoperationonatablemaybeonetypeofiteratorinaparticularqueryplan.
The tmid , ssid and ccnt columnsarethecompositekeythatuniquelyidentifiesaparticularquery.Thesecolumnscanbeusedtojoinwiththe
queries_* datatables.
Therearethreeiteratortables,allhavingthesamecolumns:
iterators_now isanexternaltablewhosedatafilesarestoredin $MASTER_DATA_DIRECTORY/gpperfmon/data .Currentqueryplaniteratordatais
storedin iterators_now duringtheperiodbetweendatacollectionfromtheCommandCenteragentsandautomaticcommitmenttothe
iterators_history table.
iterators_tail isanexternaltablewhosedatafilesarestoredin $MASTER_DATA_DIRECTORY/gpperfmon/data .Thisisatransitionaltableforquery
planiteratordatathathasbeenclearedfrom iterators_now buthasnotyetbeencommittedto iterators_history .Ittypicallyonlycontainsa
fewminutesworthofdata.
iterators_history isaregulartablethatstoreshistoricalqueryplaniteratordata.Itispre-partitionedintomonthlypartitions.Partitionsare
automaticallyaddedintwomonthincrementsasneeded.Administratorsmustdropoldpartitionsforthemonthsthatarenolongerneeded.
Seealsotheiterator_rollupviewsforsummarymetricsofthequeryplaniteratordata.
ctime
timestamp
Timethisrowwascreated.
tmid
int
Atimeidentifierforaparticularquery.All
iteratorrecordsassociatedwiththequerywill
havethesametmid.
ssid
int
Thesessionidasshownbythe gp_session_id
ccnt
int
segid
int
pid
int
parameter.Alliteratorrecordsassociatedwith
thequerywillhavethesame ssid .
Thecommandnumberwithinthissessionas
shownby gp_command_count parameter.All
iteratorrecordsassociatedwiththequerywill
havethesame ccnt .
ThesegmentID( dbid from
gp_segment_configuration
).
ThepostgresprocessIDforthisiterator.
ThequeryplannodeIDfromtheGreenplum
nid
int
sliceplan.
pnid
int
TheparentqueryplannodeIDfromthe
Greenplumsliceplan.
hostname
varchar(64)
Segmenthostname.
ntype
varchar(64)
Theiteratoroperationtype.Possiblevaluesare
listedin[IteratorMetrics](db-iteratormetrics.html).
nstatus
varchar(64)
Thestatusofthisiterator.Possiblevaluesare:
Initialize,ExecutingandFinished.
tstart
timestamp
Starttimefortheiterator.
tduration
int
Durationoftheexecution.
pmemsize
bigint
Maximumworkmemoryallocatedbythe
Greenplumplannertothisiterator’squery
process.
memsize
bigint
OSmemoryallocatedtothisiterator’sprocess.
memresid
bigint
Residentmemoryallocatedtothisiterator’s
process(asopposedtosharedmemory).
Sharedmemoryallocatedtothisiterator’s
©CopyrightPivotalSoftwareInc,2013-2016
60
3.0
memshare
bigint
Sharedmemoryallocatedtothisiterator’s
process.
cpu_elapsed
bigint
TotalCPUusageoftheprocessexecutingthe
iterator.
cpu_currpct
float
ThepercentageofCPUcurrentlybeingutilized
bythisiteratorprocess.Thisvalueisalwayszero
forhistorical(completed)iterators.
rowsout
bigint
Theactualnumberofrowsoutputbythe
iterator.
rowsout_est
bigint
Thequeryplanner’sestimateofrowsoutputby
theiterator.
Eachoperationinaqueryplan(ntype)has
m0_name
varchar(64)
m0_unit
varchar(64)
m0_val
bigint
Thevalueofthismetric.
m0_est
bigint
Theestimatedvalueofthismetric.
varchar(64)
Eachoperationinaqueryplan( ntype )has
metricsassociatedwithit.See[IteratorMetrics]
(db-iterator-metrics.html)foracompletelistof
iteratorattributesandtheircorresponding
units.
m1_unit
varchar(64)
Theunitofmeasureforthismetric.See[Iterator
Metrics](db-iterator-metrics.html)fora
completelistofiteratorattributesandtheir
correspondingunits.
m1_val
bigint
Thevalueofthismetric.
m1_est
bigint
Theestimatedvalueofthismetric.
varchar(64)
Eachoperationinaqueryplan( ntype )has
metricsassociatedwithit.See[IteratorMetrics]
(db-iterator-metrics.html)foracompletelistof
iteratorattributesandtheircorresponding
units.
m2_unit
varchar(64)
Theunitofmeasureforthismetric.See[Iterator
Metrics](db-iterator-metrics.html)fora
completelistofiteratorattributesandtheir
correspondingunits.
m2_val
bigint
Thevalueofthismetric.
m2_est
bigint
Theestimatedvalueofthismetric.
varchar(64)
Eachoperationinaqueryplan( ntype )has
metricsassociatedwithit.See[IteratorMetrics]
(db-iterator-metrics.html)foracompletelistof
iteratorattributesandtheircorresponding
units.
m1_name
m2_name
m3_name
metricsassociatedwithit.Foralloperations,
thismetricnameis Rows In .
Theunitofmeasureforthismetric.Forall
operations( ntype ),thisunitofmeasureis
Rows .
Theunitofmeasureforthismetric.See[Iterator
Metrics](db-iterator-metrics.html)fora
varchar(64)
m3_val
bigint
completelistofiteratorattributesandtheir
correspondingunits.
Thevalueofthismetric.
m3_est
bigint
Theestimatedvalueofthismetric.
m3_unit
m4_name
Eachoperationinaqueryplan( ntype )has
metricsassociatedwithit.See[IteratorMetrics]
(db-iterator-metrics.html)foracompletelistof
iteratorattributesandtheircorresponding
varchar(64)
©CopyrightPivotalSoftwareInc,2013-2016
61
3.0
iteratorattributesandtheircorresponding
units.
m4_unit
varchar(64)
Theunitofmeasureforthismetric.See[Iterator
Metrics](db-iterator-metrics.html)fora
completelistofiteratorattributesandtheir
correspondingunits.
m4_val
bigint
Thevalueofthismetric.
m4_est
bigint
Theestimatedvalueofthismetric.
Eachoperationinaqueryplan( ntype )has
m5_name
metricsassociatedwithit.See[IteratorMetrics]
(db-iterator-metrics.html)foracompletelistof
iteratorattributesandtheircorresponding
units.
varchar(64)
m5_unit
varchar(64)
Theunitofmeasureforthismetric.See[Iterator
Metrics](db-iterator-metrics.html)fora
completelistofiteratorattributesandtheir
correspondingunits.
m5_val
bigint
Thevalueofthismetric.
m5_est
bigint
Theestimatedvalueofthismetric.
m6_name
varchar(64)
Eachoperationinaqueryplan( ntype )has
metricsassociatedwithit.See[IteratorMetrics]
(db-iterator-metrics.html)foracompletelistof
iteratorattributesandtheircorresponding
units.
m6_unit
varchar(64)
Theunitofmeasureforthismetric.See[Iterator
Metrics](db-iterator-metrics.html)fora
completelistofiteratorattributesandtheir
correspondingunits.
m6_val
bigint
Thevalueofthismetric.
m6_est
bigint
Theestimatedvalueofthismetric.
varchar(64)
Eachoperationinaqueryplan( ntype )has
metricsassociatedwithit.See[IteratorMetrics]
(db-iterator-metrics.html)foracompletelistof
iteratorattributesandtheircorresponding
units.
m7_unit
varchar(64)
Theunitofmeasureforthismetric.See[Iterator
Metrics](db-iterator-metrics.html)fora
completelistofiteratorattributesandtheir
correspondingunits.
m7_val
bigint
Thevalueofthismetric.
m7_est
bigint
Theestimatedvalueofthismetric.
varchar(64)
Eachoperationinaqueryplan( ntype )has
metricsassociatedwithit.See[IteratorMetrics]
(db-iterator-metrics.html)foracompletelistof
iteratorattributesandtheircorresponding
units.
m8_unit
varchar(64)
Theunitofmeasureforthismetric.See[Iterator
Metrics](db-iterator-metrics.html)fora
completelistofiteratorattributesandtheir
correspondingunits.
m8_val
bigint
Theactualvalueofthismetric.
m8_est
bigint
Theestimatedvalueofthismetric.
varchar(64)
Eachoperationinaqueryplan( ntype )has
metricsassociatedwithit.See[IteratorMetrics]
(db-iterator-metrics.html)foracompletelistof
iteratorattributesandtheircorresponding
units.
m7_name
m8_name
m9_name
Theunitofmeasureforthismetric.See[Iterator
©CopyrightPivotalSoftwareInc,2013-2016
62
3.0
m9_unit
varchar(64)
Theunitofmeasureforthismetric.See[Iterator
Metrics](db-iterator-metrics.html)fora
completelistofiteratorattributesandtheir
correspondingunits.
m9_val
bigint
Theactualvalueofthismetric.
m9_est
bigint
Theestimatedvalueofthismetric.
Theiteratorname( ntype )associatedwiththis
metric.Metrics m10 through m15 are
currentlynotused.
Theunitofmeasureforthismetric.Metrics
m10 through m15 arecurrentlynotused.
m10_name
- m15_name
varchar(64)
m10_unit
- m15_unit
varchar(64)
m10_value
m10_est
t0_name
t0_val
- m15_value
- m15_est
bigint
Theactualvalueofthismetric.Metrics m10
through m15 arecurrentlynotused.
bigint
Theestimatedvalueofthismetric.Metrics m10
through m15 arecurrentlynotused.
varchar(64)
Thiscolumnisalabelfor t0_val .Itsvalueis
always Name .
varchar(128)
Thenameoftherelationbeingscannedbyan
iterator.Thismetriciscollectedonlyfor
iteratorsthatperformscanoperationssuchasa
sequentialscanorfunctionscan.
©CopyrightPivotalSoftwareInc,2013-2016
63
3.0
IteratorMetrics
ThetablesinthissectionlistallpossibleiteratorsinaqueryonGreenplumDatabaseinstance.Theiteratortablesincludethemetricname,thecolumnin
the iterators_* tableinthe gpperfmon databasewherethemetricappears,howthemetricismeasured(unit),andadescriptionofthemetric.
MetricTerminology
ThefollowinginformationexplainssomeofthedatabasetermsandconceptsthatappeariniteratormetricsinGreenplumDatabase:
Node
Referstoastepinaqueryplan.AqueryplanhassetsofoperationsthatGreenplumDatabaseperformstoproducetheanswertoagivenquery.Anodein
theplanrepresentsaspecificdatabaseoperation,suchasatablescan,join,aggregation,sort,etc.
Iterator
Representstheactualexecutionofthenodeinaqueryplan.Nodeanditeratoraresometimesusedinterchangeably.
Tuple
Referstoarowreturnedaspartofaresultsetfromaquery,aswellasarecordinatable.
Spill
Whenthereisnotenoughmemorytoperformadatabaseoperation,datamustbewritten(orspilled)todisk.
Passes
Occurwhenaniteratormustscan(orpass)overspilleddatatoobtainaresult.Apassrepresentsonepassthroughallinputtuples,oralldatainbatch
filesgeneratedafterspill,whichhappenshierarchically.Inthefirstpass,allinputtuplesareread,andintermediateresultsarespilledtoaspecified
numberofbatchfiles.Inthesecondpass,thedatainallbatchfilesisprocessed.Iftheresultsarestilltoolargetostoreinmemory,theintermediate
resultsarespilledtothesecondlevelofspillfiles,andtheprocessrepeatsagain.
Batches
Referstotheactualfilescreatedwhendataisspilledtodisk.ThisismostoftenassociatedtoHashoperations.
Join
Thisclauseinaqueryjoinstwoormoretables.TherearethreetypesofJoinalgorithmsinGreenplumDatabaseinstance:
HashJoin
MergeJoin
NestedLoop
EachoftheseoperationsincludetheirownrespectiveJoinsemantics.TheCommandCenterConsoledisplaysiteratormetricsforeachofthese
semantics.
Append
AnAppenditeratorhastwoormoreinputsets.Appendreturnsallrowsfromthefirstinputset,thenallrowsfromthesecondinputset,andsoon,untilall
rowsfromallinputsetsareprocessed.Appendisalsousedwhenyouselectfromatableinvolvedinaninheritancehierarchy.
Metric
Unit
Description
Rowsin
MetricColumn
m0_name
Rows
Thenumberoftuplesreceivedbytheiterator.
AppendCurrentInputSource
m1_name
Inputs
Thenumberofthecurrenttablebeingscanned.
Append-OnlyScan
Thisiteratorscansappend-onlytype-tables.
Rowsin
m0_name
Rows
Thenumberoftuplesreceivedby
theiterator.
Append-onlyScanRescan
m1_name
Rescans
Thenumberofappend-only
rescansbythisiterator.
Append-onlyColumnarScan
Thisiteratorscansappend-onlycolumnar-typetables.
Rowsin
m0_name
©CopyrightPivotalSoftwareInc,2013-2016
Rows
64
Thenumberoftuplesreceivedby
3.0
theiterator.
Append-OnlyColumnarScan
Rescan
Rescans
m1_name
Thenumberofappend-only
columnarrescansbythisiterator.
Aggregate
Thequeryplannerproducesanaggregateiteratorwheneverthequeryincludesanaggregatefunction.Forexample,thefollowingfunctionsare
aggregatefunctions: AVG() , COUNT() , MAX() , MIN() , STDDEV() , SUM() ,and VARIANCE() .Aggregatereadsalltherowsintheinputsetand
computestheaggregatevalues.Iftheinputsetisnotgrouped,Aggregateproducesasingleresultrow.
Rowsin
m0_name
Rows
Thenumberoftuplesreceivedby
theiterator.
AggregateTotalSpillTuple
m1_name
Tuples
Thenumberoftuplesspilledto
disk
AggregateTotalSpillBytes
m2_name
Bytes
Thenumberofbytesspilledtodisk.
AggregateTotalSpillBatches
m3_name
Batches
Thenumberofspillbatches
required.
AggregateTotalSpillPass
m4_name
Passes
Thenumberofpassesacrossallof
thebatches.
AggregateCurrentSpillPassRead
Tuples
m5_name
Tuples
Thenumberofbytesreadinforthis
spillbatch.
AggregateCurrentSpillPassRead
Bytes
m6_name
Bytes
Thenumberoftuplesreadinfor
thisspillbatch.
AggregateCurrentSpillPassTuples
m7_name
Tuples
Thenumberoftuplesthatarein
eachspillfileinthecurrentpass.
AggregateCurrentSpillPassBytes
m8_name
Bytes
Thenumberofbytesthatarein
eachspillfileinthecurrentpass.
AggregateCurrentSpillPass
Batches
m9_name
Batches
Thenumberofbatchescreatedin
thecurrentpass.
BitmapAnd
ThisiteratortakesthebitmapsgeneratedfrommultipleBitmapIndexScaniterators,putsthemtogetherwithan AND clause,andgeneratesanew
bitmapasitsoutput.
Metric
Rowsin
MetricColumn
m0_name
Unit
Description
Rows
Thenumberoftuplesreceivedbytheiterator.
BitmapOr
ThisiteratortakesthebitmapsgeneratedfrommultipleBitmapIndexScaniterators,putsthemtogetherwithan OR clause,andgeneratesanewbitmap
asitsoutput.
Metric
Rowsin
MetricColumn
m0_name
Unit
Description
Rows
Thenumberoftuplesreceivedbytheiterator.
BitmapAppend-OnlyScan
ThisiteratorretrievesallrowsfromthebitmapgeneratedbyBitmapAnd,BitmapOr,orBitmapIndexScanandaccessestheappend-onlytabletoretrieve
therelevantrows.
Metric
Rowsin
MetricColumn
m0_name
Unit
Description
Rows
Thenumberoftuplesreceivedbytheiterator.
BitmapHeapScan
ThisiteratorretrievesallrowsfromthebitmapgeneratedbyBitmapAnd,BitmapOr,orBitmapIndexScanandaccessestheheaptabletoretrievethe
relevantrows.
©CopyrightPivotalSoftwareInc,2013-2016
65
3.0
Metric
MetricColumn
Unit
Description
Rowsin
m0_name
Rows
Thenumberoftuplesreceivedbytheiterator.
BitmapHeapScanPages
m1_name
Pages
Thenumberofbitmapheappagesscanned.
BitmapHeapScanRescan
m2_name
Rescans
Thenumberofbitmapheappagerescansbythisiterator.
BitmapIndexScan
Thisiteratorproducesabitmapthatcorrespondstotherulesthatsatisfythequeryplan.
Metric
Unit
Description
Rowsin
MetricColumn
m0_name
Rows
Thenumberoftuplesreceivedbytheiterator.
BitmapIndexScanRescan
m1_name
Rescans
Thenumberofbitmapindexrescansbythisiterator.
BroadcastMotion
Notethatthe Motion metricsfortheiteratorareusefulwheninvestigatingpotentialnetworkingissuesintheGreenplumDatabasesystem.Typically,the
“AckTime”valuesshouldbeverysmall(microsecondsormilliseconds).Howeverifthe“AckTime”valuesareoneormoreseconds(particularlythe
“MotionMinAckTime”metric),thenanetworkperformanceissuelikelyexists.
Also,iftherearealargenumberofpacketsbeingdroppedbecauseofqueueoverflow,youcanincreasethevalueforthe gp_interconnect_queue_depth system
configurationparametertoimproveperformance.SeetheGreenplumDatabaseReferenceGuideformoreinformationaboutsystemconfiguration
parameters.
Rowsin
m0_name
Rows
Thenumberoftuplesreceivedby
theiterator.
MotionBytesSent
m1_name
Bytes
Thenumberofbytessentbythe
iterator.
MotionTotalAckTime
MotionAverageAckTime
MotionMaxAckTime
MotionMinAckTime
MotionCountResent
m2_name
m3_name
m4_name
m5_name
m6_name
Microseconds
Thetotalamountoftimethatthe
iteratorwaitedforan
acknowledgementaftersendinga
packetofdata.
Microseconds
Theaverageamountoftimethat
theiteratorwaitedforan
acknowledgementaftersendinga
packetofdata.
Microseconds
Themaximumamountoftimethat
theiteratorwaitedforan
acknowledgementaftersendinga
packetofdata.
Microseconds
Theminimumamountoftimethat
theiteratorwaitedforan
acknowledgementaftersendinga
packetofdata.
Packets
Thetotalnumberofpacketsthat
theiteratordidnotacknowledge
whentheyfirstarrivedinthe
queue.
MotionMaxResent
m7_name
Packets
Themaximumnumberofpackets
thattheiteratordidnot
acknowledgewhentheyfirst
arrivedinthequeue.Thismetricis
appliedonaperpacketbasis.For
example,avalueof“10”indicates
thataparticularpacketdidnotget
acknowledgedbythisiterator10
times,andthatthiswasthe
maximumforthisiterator.
MotionBytesReceived
m8_name
Bytes
Thenumberofbytesreceivedby
theiterator.
©CopyrightPivotalSoftwareInc,2013-2016
66
3.0
MotionCountDropped
m9_name
Packets
Thenumberofpacketsdroppedby
theiteratorbecauseofbuffer
overruns.
ExplicitRedistributeMotion
TheExplicitRedistributeiteratormovestuplestosegmentsexplicitlyspecifiedinthesegmentIDcolumnofthetuples.ThisdiffersfromaRedistribute
Motioniterator,wheretargetsegmentsareindirectlyspecifiedthroughhashexpressions.TheExplicitRedistributeiteratorisusedwhenthequeryportion
ofaDMLplannedstatementrequiresmovingtuplesacrossdistributedtables.
NotethattheMotionmetricsfortheiteratorareusefulwheninvestigatingpotentialnetworkingissuesintheGreenplumDatabasesystem.Typically,the
“AckTime”valuesshouldbeverysmall(microsecondsormilliseconds).Howeverifthe“AckTime”valuesareoneormoreseconds(particularlythe
“MotionMinAckTime”metric),thenanetworkperformanceissuelikelyexists.
Also,iftherearealargenumberofpacketsbeingdroppedbecauseofqueueoverflow,youcanincreasethevalueforthe gp_interconnect_queue_depth
systemconfigurationparametertoimproveperformance.SeetheGreenplumDatabaseReferenceGuideformoreinformationaboutsystem
configurationparameters.
.
Rowsin
m0_name
Rows
Thenumberoftuplesreceivedby
theiterator.
MotionBytesSent
m1_name
Bytes
Thenumberofbytessentbythe
iterator.
Microseconds
Thetotalamountoftimethatthe
iteratorwaitedforan
acknowledgementaftersendinga
packetofdata.
Microseconds
Theaverageamountoftimethat
theiteratorwaitedforan
acknowledgementaftersendinga
packetofdata.
Microseconds
Themaximumamountoftimethat
theiteratorwaitedforan
acknowledgementaftersendinga
packetofdata.
Microseconds
Theminimumamountoftimethat
theiteratorwaitedforan
acknowledgementaftersendinga
packetofdata.
Packets
Thetotalnumberofpacketsthat
theiteratordidnotacknowledge
whentheyfirstarrivedinthe
queue.
MotionTotalAckTime
MotionAverageAckTime
MotionMaxAckTime
MotionMinAckTime
MotionCountResent
m2_name
m3_name
m4_name
m5_name
m6_name
Themaximumnumberofpackets
thattheiteratordidnot
acknowledgewhentheyfirst
arrivedinthequeue.Thismetricis
appliedonaperpacketbasis.For
example,avalueof“10”indicates
thataparticularpacketdidnotget
acknowledgedbythisiterator10
times,andthatthiswasthe
maximumforthisiterator.
MotionMaxResent
m7_name
Packets
MotionBytesReceived
m8_name
Bytes
Thenumberofbytesreceivedby
theiterator.
MotionCountDropped
m9_name
Packets
Thenumberofpacketsdroppedby
theiteratorbecauseofbuffer
overruns.
©CopyrightPivotalSoftwareInc,2013-2016
67
3.0
ExternalScan
Thisiteratorscansanexternaltable.
Metric
Unit
Description
Rowsin
MetricColumn
m0_name
Rows
Thenumberoftuplesreceivedbytheiterator.
ExternalScanRescan
m1_name
Rescans
Thenumberofexternaltablerescansbythisiterator.
FunctionScan
Thisiteratorreturnstuplesproducedbyafunction.
Metric
MetricColumn
Rowsin
m0_name
Unit
Description
Rows
Thenumberoftuplesreceivedbytheiterator.
GatherMotion
Thisiteratorgathersstreamsoftuplesthataresentby“sending”motions.Ifamergekeyisspecified,itmergesmanystreamsintoasingleorderpreservedstream.
NotethattheMotionmetricsfortheiteratorareusefulwheninvestigatingpotentialnetworkingissuesintheGreenplumDatabasesystem.Typically,the
“AckTime”valuesshouldbeverysmall(microsecondsormilliseconds).Howeverifthe“AckTime”valuesareoneormoreseconds(particularlythe
“MotionMinAckTime”metric),thenanetworkperformanceissuelikelyexists.
Also,iftherearealargenumberofpacketsbeingdroppedbecauseofqueueoverflow,youcanincreasethevalueforthe gp_interconnect_queue_depth
systemconfigurationparametertoimproveperformance.SeetheGreenplumDatabaseReferenceGuideformoreinformationaboutsystem
configurationparameters.
Rowsin
m0_name
Rows
Thenumberoftuplesreceivedby
theiterator.
MotionBytesSent
m1_name
Bytes
Thenumberofbytessentbythe
iterator.
Microseconds
Thetotalamountoftimethatthe
iteratorwaitedforan
acknowledgementaftersendinga
packetofdata.
Microseconds
Theaverageamountoftimethat
theiteratorwaitedforan
acknowledgementaftersendinga
packetofdata.
Microseconds
Themaximumamountoftimethat
theiteratorwaitedforan
acknowledgementaftersendinga
packetofdata.
Microseconds
Theminimumamountoftimethat
theiteratorwaitedforan
acknowledgementaftersendinga
packetofdata.
Packets
Thetotalnumberofpacketsthat
theiteratordidnotacknowledge
whentheyfirstarrivedinthe
queue.
Packets
Themaximumnumberofpackets
thattheiteratordidnot
acknowledgewhentheyfirst
arrivedinthequeue.Thismetricis
appliedonaperpacketbasis.For
example,avalueof“10”indicates
thataparticularpacketdidnotget
acknowledgedbythisiterator10
times,andthatthiswasthe
maximumforthisiterator.
MotionTotalAckTime
MotionAverageAckTime
m2_name
m3_name
MotionMaxAckTime
m4_name
MotionMinAckTime
m5_name
MotionCountResent
MotionMaxResent
m6_name
m7_name
©CopyrightPivotalSoftwareInc,2013-2016
68
3.0
MotionBytesReceived
m8_name
Bytes
MotionCountDropped
m9_name
Packets
Thenumberofbytesreceivedby
theiterator.
Thenumberofpacketsdroppedby
theiteratorbecauseofbuffer
overruns.
GroupAggregate
TheGroupAggregateiteratorisawaytocomputevectoraggregates,anditisusedtosatisfya GROUPBY clause.Asingleinputsetisrequiredbythe
GroupAggregateiterator,anditmustbeorderedbythegroupingcolumn(s).Thisiteratorreturnsasinglerowforauniquevalueofgroupingcolumns.
Rowsin
m0_name
Rows
Thenumberoftuplesreceivedby
theiterator.
AggregateTotalSpillTuples
m1_name
Tuples
Thenumberoftuplesspilledto
disk.
AggregateTotalSpillBytes
m2_name
Bytes
Thenumberofbytesspilledtodisk.
AggregateTotalSpillBatches
m3_name
Batches
Thenumberofspillbatches
required.
AggregateTotalSpillPass
m4_name
Passes
Thenumberofpassesacrossallof
thebatches.
AggregateCurrentSpillPassRead
Tuples
m5_name
Tuples
Thenumberofbytesreadinforthis
spillbatch
AggregateCurrentSpillPassRead
Bytes
m6_name
Bytes
Thenumberoftuplesreadinfor
thisspillbatch
AggregateCurrentSpillPassTuples
m7_name
Tuples
Thenumberoftuplesthatarein
eachspillfileinthecurrentpass.
AggregateCurrentSpillPassBytes
m8_name
Bytes
Thenumberofbytesthatarein
eachspillfileinthecurrentpass.
AggregateCurrentSpillPass
Batches
m9_name
Batches
Thenumberofbatchescreatedin
thecurrentpass.
HashJoin
TheHashJoiniteratorrequirestwoinputsets-theouterandinnertables.
TheHashJoiniteratorstartsbycreatingitsinnertableusingtheHashoperator.TheHashoperatorcreatesatemporaryHashindexthatcoversthejoin
columnintheinnertable.Whenthehashtable(thatis,theinnertable)iscreated,HashJoinreadseachrowintheoutertable,hashesthejoincolumn
(fromtheoutertable),andsearchesthetemporaryHashindexforamatchingvalue.
InaGreenplumDatabaseinstance,aHashJoinalgorithmcanbeusedwiththefollowingjoinsemantics:
LeftJoin
LeftAntiSemiJoin
FullJoin
RightJoin
EXISTSJoin
ReverseInJoin
UniqueInnerJoin
UniqueOuterJoin
Metric
Unit
Description
Rowsin
MetricColumn
m0_name
Rows
Thenumberoftuplesreceivedbytheiterator.
HashSpillBatches
m1_name
Batches
Thecurrentbatchbeingspilled.
HashSpillTuples
m2_name
Tuples
Thecurrentnumberofspilledtuples.
HashSpillBytes
m3_name
Bytes
Thecurrentnumberofbytesspilledtodisk.
©CopyrightPivotalSoftwareInc,2013-2016
69
3.0
HashAggregate
TheHashAggregateiteratorissimilartotheGroupAggregateiterator.AsingleinputsetisrequiredbytheHashAggregateiteratoranditcreatesahash
tablefromtheinput.However,itdoesnotrequireitsinputtobeordered.
Rowsin
m0_name
Rows
Thenumberoftuplesreceivedby
theiterator.
AggregateTotalSpillTuples
m1_name
Tuples
Thenumberoftuplesspilledto
disk.
AggregateTotalSpillBytes
m2_name
Bytes
Thenumberofbytesspilledtodisk.
AggregateTotalSpillBatches
m3_name
Batches
Thenumberofspillbatches
required.
AggregateTotalSpillPass
m4_name
Passes
Thenumberofpassesacrossallof
thebatches.
AggregateCurrentSpillPassRead
Tuples
m5_name
Tuples
Thenumberofbytesreadinforthis
spillbatch
AggregateCurrentSpillPassRead
Bytes
m6_name
Bytes
Thenumberoftuplesreadinfor
thisspillbatch
AggregateCurrentSpillPassTuples
m7_name
Tuples
Thenumberoftuplesthatarein
eachspillfileinthecurrentpass.
AggregateCurrentSpillPassBytes
m8_name
Bytes
Thenumberofbytesthatarein
eachspillfileinthecurrentpass.
AggregateCurrentSpillPass
Batches
m9_name
Batches
Thenumberofbatchescreatedin
thecurrentpass.
IndexScan
AnIndexScanoperatortraversesanindexstructure.Ifyouspecifyastartingvalueforanindexedcolumn,theIndexScanwillbeginattheappropriate
value.Ifyouspecifyanendingvalue,theIndexScanwillcompleteassoonasitfindsanindexentrygreaterthantheendingvalue.Aqueryplanneruses
anIndexScanoperatorwhenitcanreducethesizeoftheresultsetbytraversingarangeofindexedvalues,orwhenitcanavoidasortbecauseofthe
implicitorderingofferedbyanindex.
Metric
MetricColumn
Unit
Description
Rowsin
m0_name
Rows
Thenumberoftuplesreceivedbytheiterator.
IndexScanRestore
m1_name
Restores
Thenumberofrestores.
IndexScanRescan
m2_name
Rescans
Thenumberofrescans.
Limit
TheLimitoperatorisusedtolimitthesizeofaresultset.AGreenplumDatabaseinstanceusestheLimitoperatorforbothLimitandOffsetprocessing.The
Limitoperatorworksbydiscardingthefirstxrowsfromitsinputset,returningthenextyrows,anddiscardingtheremainder.Ifthequeryincludesan
OFFSETclause,xrepresentstheoffsetamount;otherwise,xiszero.IfthequeryincludesaLIMITclause,yrepresentstheLimitamount;otherwise,yisat
leastaslargeasthenumberofrowsintheinputset.
Metric
Rowsin
MetricColumn
m0_name
Unit
Description
Rows
Thenumberoftuplesreceivedbytheiterator.
Materialize
Thematerializeiteratorisusedforsomesub-selectoperations.Thequeryplannercandecidethatitislessexpensivetomaterializeasub-selectonetime
thanitistorepeattheworkforeachtop-levelrow.Materializeisalsousedforsomemerge/joinoperations.
Metric
MetricColumn
Unit
Description
Rowsin
m0_name
Rows
Thenumberoftuplesreceivedbytheiterator.
MaterializeRescan
m1_name
Rescans
Thenumberoftimestheexecutorrequestedtorescanthedateforthisiterator.
MergeJoin
TheMergeJoiniteratorjoinstwotables.LiketheNestedLoopiterator,MergeJoinrequirestwoinputsets:Anoutertableandaninnertable.Eachinput
©CopyrightPivotalSoftwareInc,2013-2016
70
3.0
setmustbeorderedbythejoincolumns.InaGreenplumDatabaseinstance,theMergeJoinalgorithmcanbeusedwiththefollowingjoinsemantics:
LeftJoin
LeftAntiSemiJoin
FullJoin
RightJoin
EXISTSJoin
ReverseInJoin
UniqueOuterjoins
UniqueInnerJoin
Rowsin
m0_name
Rows
Thenumberoftuplesreceivedby
theiterator.
MergeJoinInnerTuples
m1_name
Tuples
Thenumberofrowsfromtheinner
partofthequeryplan.
MergeJoinOuterTuples
m2_name
Tuples
ThenumberofrowsfromtheOuter
partofthequeryplan.
NestedLoop
TheNestedLoopiteratorisusedtoperformajoinbetweentwotables,andasaresultrequirestwoinputsets.Itfetcheseachtablefromoneoftheinput
sets(calledtheoutertable).Foreachrowintheoutertable,theotherinput(calledtheinnertable)issearchedforarowthatmeetsthejoinqualifier.Ina
GreenplumDatabaseinstance,aMergeJoinalgorithmcanbeusedwiththefollowingjoinsemantics:
LeftJoin
LeftAntiSemiJoin
FullJoin
RightJoin
EXISTSJoin
ReverseInJoin
UniqueOuterJoin
UniqueInnerJoin
Metric
Unit
Description
Rowsin
MetricColumn
m0_name
Rows
Thenumberoftuplesreceivedbytheiterator.
NestedLoopInnerTuples
m1_name
Tuples
Thenumberofrowsfromtheinnerpartofthequeryplan.
NestedLoopOuterTuples
m2_name
Tuples
Thenumberofrowsfromtheouterpartofthequeryplan.
RedistributeMotion
Thisiteratorsendsanoutboundtupletoonlyonedestinationbasedonthevalueofahash.
NotethattheMotionmetricsfortheiteratorareusefulwheninvestigatingpotentialnetworkingissuesintheGreenplumDatabasesystem.Typically,the
“AckTime”valuesshouldbeverysmall(microsecondsormilliseconds).Howeverifthe“AckTime”valuesareoneormoreseconds(particularlythe
“MotionMinAckTime”metric),thenanetworkperformanceissuelikelyexists.
Also,iftherearealargenumberofpacketsbeingdroppedbecauseofqueueoverflow,youcanincreasethevalueforthe gp_interconnect_queue_depth
systemconfigurationparametertoimproveperformance.SeetheGreenplumDatabaseReferenceGuideformoreinformationaboutsystem
configurationparameters.
Rowsin
m0_name
Rows
Thenumberoftuplesreceivedby
theiterator.
MotionBytesSent
m1_name
Bytes
Thenumberofbytessentbythe
iterator.
Microseconds
Thetotalamountoftimethatthe
iteratorwaitedforan
acknowledgementaftersendinga
packetofdata.
MotionTotalAckTime
m2_name
©CopyrightPivotalSoftwareInc,2013-2016
71
3.0
MotionAverageAckTime
m3_name
MotionMaxAckTime
m4_name
MotionMinAckTime
m5_name
MotionCountResent
m6_name
Microseconds
Theaverageamountoftimethat
theiteratorwaitedforan
acknowledgementaftersendinga
packetofdata.
Microseconds
Themaximumamountoftimethat
theiteratorwaitedforan
acknowledgementaftersendinga
packetofdata.
Microseconds
Theminimumamountoftimethat
theiteratorwaitedforan
acknowledgementaftersendinga
packetofdata.
Packets
Thetotalnumberofpacketsthat
theiteratordidnotacknowledge
whentheyfirstarrivedinthe
queue.
MotionMaxResent
m7_name
Packets
Themaximumnumberofpackets
thattheiteratordidnot
acknowledgewhentheyfirst
arrivedinthequeue.Thismetricis
appliedonaperpacketbasis.For
example,avalueof“10”indicates
thataparticularpacketdidnotget
acknowledgedbythisiterator10
times,andthatthiswasthe
maximumforthisiterator.
MotionBytesReceived
m8_name
Bytes
Thenumberofbytesreceivedby
theiterator.
MotionCountDropped
m9_name
Packets
Thenumberofpacketsdroppedby
theiteratorbecauseofbuffer
overruns.
Result
TheResultiteratorisusedtoeither(1)executeaquerythatdoesnotretrievedatafromatable,orevaluatethepartsofaWHEREclausethatdonot
dependondataretrievedfromatable.ItcanalsobeusedifthetopnodeinthequeryplanisanAppenditerator.
Metric
Rowsin
MetricColumn
m0_name
Unit
Description
Rows
Thenumberoftuplesreceivedbytheiterator.
Repeat
Thisiteratorrepeatseveryinputoperatoracertainnumberoftimes.Thisistypicallyusedforcertaingroupingoperations.
MetricDescriptionRowsin m0_name RowsThenumberoftuplesreceivedbytheiterator.
SeqScan
TheSeqScaniteratorscansheaptables,andisthemostbasicqueryiterator.Anysingle-tablequerycanbedonebyusingtheSeqScaniterator.SeqScan
startsatthebeginningofaheaptableandscanstotheendoftheheaptable.Foreachrowintheheaptable,SeqScanevaluatesthequeryconstraints
(theWHEREclause).Iftheconstraintsaresatisfied,therequiredcolumnsareaddedtotheresultset.
Metric
MetricColumn
Unit
Description
Rowsin
m0_name
Rows
Thenumberoftuplesreceivedbytheiterator.
SeqScanPageStats
m1_name
Pages
Thenumberofpagesscanned.
SeqScanRestorePos
m2_name
Restores
Thenumberoftimestheexecutorrestoredthescanposition.
SeqScanRescan
m3_name
Rescans
Thenumberoftimestheexecutorrequestedtorescanthedateforthisiterator.
SetOp
TherearefourSetOpiterators:
©CopyrightPivotalSoftwareInc,2013-2016
72
3.0
Intersect
IntersectAll
Except
ExceptAll
Theseiteratorsareproducedonlywhenthequeryplannerencountersan INTERSECT , INTERSECT
, EXCEPT ,or EXCEPT
ALL
clause,respectively.
ALL
AllSetOpiteratorsrequiretwoinputsets.Theycombinetheinputsetsintoasortedlist,andthengroupsofidenticalrowsareidentified.Foreachgroup,
theSetOpiteratorscountsthenumberofrowscontributedbyeachinputset,thenusesthecountstodeterminethenumberofrowstoaddtotheresult
set.
Metric
MetricColumn
Rowsin
m0_name
Unit
Description
Rows
Thenumberoftuplesreceivedbytheiterator.
SharedScan
Thisiteratorevaluatesthecommonpartsofaqueryplan.Itsharestheoutputofthecommonsub-planswithallotheriterators,sothatthesub-planonly
needstoexecuteonetime.
Metric
MetricColumn
Unit
Description
Rowsin
m0_name
Rows
Thenumberoftuplesreceivedbytheiterator.
SeqScanPageStats
m1_name
Pages
Thenumberofpagesscanned.
SeqScanRestorePos
m2_name
Restores
Thenumberoftimestheexecutorrestoredthescanposition.
SeqScanRescan
m3_name
Rescans
Thenumberoftimestheexecutorrequestedtorescanthedateforthisiterator.
Sort
TheSortiteratorimposesanorderingontheresultset.AGreenplumDatabaseinstanceusestwodifferentsortstrategies:Anin-memorysortandanondisksort.Ifthesizeoftheresultsetexceedstheavailablememory,theSortiteratordistributestheinputsettoacollectionofsortedworkfilesandthen
mergestheworkfilesbacktogetheragain.Iftheresultsetislessthantheavailablememory,thesortisdoneinmemory.
TheSortiteratorisusedformanypurposes.ASortcanbeusedtosatisfyan ORDERBY clause.Also,somequeryoperatorsrequiretheirinputsetstobe
ordered.
Metric
MetricColumn
Unit
Description
Rowsin
m0_name
Rows
Thenumberoftuplesreceivedbytheiterator.
SortMemoryUsage
m1_name
Bytes
Thenumberofbytesusedbythesort.
SortSpillTuples
m2_name
Tuples
Thecurrentnumberofspilledtuples.
SortSpillBytes
m3_name
Bytes
Thecurrentnumberofspilledbytes.
SortSpillPass
m4_name
Passes
Thenumberofmergepasses.Eachmergepassmergesseveralsortedrunsintolargerruns.
SortCurrentSpillPassTuples
m5_name
Tuples
Thenumberoftuplesspilledinthecurrentspillpass.
SortCurrentSpillPassBytes
m6_name
Bytes
Thenumberofbytesspilledinthecurrentspillpass.
SubqueryScan
ASubqueryScaniteratorisapass-throughiterator.Itscansthroughitsinputset,addingeachrowtotheresultset.Thisiteratorisusedforinternal
purposesandhasnoaffectontheoverallqueryplan.
Metric
MetricColumn
Unit
Description
Rowsin
m0_name
Rows
Thenumberoftuplesreceivedbytheiterator.
SubqueryScanRescan
m1_name
Rescans
Thenumberoftimestheexecutorrequestedtorescanthedateforthisiterator.
TidScan
TheTidScan(tupleIDscan)iteratorisusedwheneverthequeryplannerencountersaconstraintoftheform ctid=
expression
or expression=
.This
ctid
specifiesatupleID,anidentifierthatisuniquewithinatable.ThetupleIDworkslikeabookmark,butisvalidonlywithinasingletransaction.Afterthe
transactioncompletes,thetupleIDisnotusedagain.
Metric
MetricColumn
Unit
©CopyrightPivotalSoftwareInc,2013-2016
Description
73
3.0
Rowsin
Metric
m0_name
MetricColumn
Rows
Unit
Thenumberoftuplesreceivedbytheiterator.
Description
Unique
TheUniqueiteratoreliminatesduplicatevaluesfromtheinputset.Theinputsetmustbeorderedbythecolumns,andthecolumnsmustbeunique.The
Uniqueoperatorremovesonlyrows—itdoesnotremovecolumnsanditdoesnotchangetheorderingoftheresultset.Uniquecanreturnthefirstrowin
theresultsetbeforeithasfinishedprocessingtheinputset.ThequeryplannerusestheUniqueoperatortosatisfya DISTINCT clause.Uniqueisalso
usedtoeliminateduplicatesina UNION .
Metric
Rowsin
MetricColumn
m0_name
Unit
Description
Rows
Thenumberoftuplesreceivedbytheiterator.
ValuesScan
TheValueScaniteratorisusedtoiterateoverasetofconstanttuples.
Metric
Rowsin
MetricColumn
m0_name
Unit
Description
Rows
Thenumberoftuplesreceivedbytheiterator.
Window
TheWindowfunctionperformscalculationsacrosssetsofrowsthatarerelatedtothecurrentqueryrow.TheWindowiteratorcomputesWindow
functionsontheinputsetofrows.
Metric
Rowsin
MetricColumn
m0_name
Unit
Description
Rows
Thenumberoftuplesreceivedbytheiterator.
©CopyrightPivotalSoftwareInc,2013-2016
74
3.0
log_alert_*
The log_alert_* tablesstore pg_log errorsandwarnings.
Therearethree log_alert tables,eachwiththesamecolumns:
log_alert_now
isanexternaltablewhosedatafilesarestoredin $MASTER_DATA_DIRECTORY/gpperfmon/data .Current pg_log errorsand
warningsdataisstoredin log_alert_now duringtheperiodbetweendatacollectionfromtheCommandCenteragentsandcommitmenttothe
log_alert_history table.
log_alert_tail isanexternaltablewhosedatafilesarestoredin $MASTER_DATA_DIRECTORY/gpperfmon/data .Thisisatransitionaltableforquery
workloaddatathathasbeenclearedfrom log_alert_now buthasnotyetbeencommittedto log_alert_history .Ittypicallyonlycontainsafew
minutesworthofdata.
log_alert_history isaregulartablethatstoreshistoricaldatabase-wideerrorsandwarningsdata.Itispre-partitionedintomonthlypartitions.
Partitionsareautomaticallyaddedintwomonthincrementsasneeded.Administratorsmustdropoldpartitionsforthemonthsthatarenolonger
needed.
Column
Type
Description
logtime
timestampwithtimezone
Timestampforthislog
loguser
text
Userofthequery
logdatabase
text
Theaccesseddatabase
logpid
text
Processid
logthread
text
Threadnumber
loghost
text
Hostnameoripaddress
logport
text
Portnumber
logsessiontime
timestampwithtimezone
Sessiontimestamp
logtransaction
integer
Transactionid
logsession
text
Sessionid
logcmdcount
text
Commandcount
logsegment
text
Segmentnumber
logslice
text
Slicenumber
logdistxact
text
Distributedtransaction
loglocalxact
text
Localtransaction
logsubxact
text
Subtransaction
logseverity
text
Logseverity
logstate
text
State
logmessage
text
Logmessage
logdetail
text
Detailedmessage
loghint
text
Hintinfo
logquery
text
Executedquery
logquerypos
text
Queryposition
logcontext
text
Contextinfo
logdebug
text
Debug
logcursorpos
text
Cursorposition
logfunction
text
Functioninfo
logfile
text
Sourcecodefile
logline
text
Sourcecodeline
logstack
text
Stacktrace
©CopyrightPivotalSoftwareInc,2013-2016
75
3.0
LogProcessingandRotation
TheGreenplumDatabasesystemloggerwritesalertlogsinthe $MASTER_DATA_DIRECTORY/gpperfmon/logs directory.
Theagentprocess( gpmmon )performsthefollowingstepstoconsolidatelogfilesandloadthemintothe gpperfmon database:
1. Gathersallofthe gpdb-alert-* filesinthelogsdirectory(exceptthelatest,whichthesysloggerhasopenandiswritingto)intoasinglefile,
alert_log_stage
.
2. Loadsthe alert_log_stage fileintothe log_alert_history tableinthe gpperfmon database.
3. Truncatesthe alert_log_stage file.
4. Removesallofthe gp-alert-* files,exceptthelatest.
Thesysloggerrotatesthealertlogevery24hoursorwhenthecurrentlogfilereachesorexceeds1MB.Arotatedlogfilecanexceed1MBifasingleerror
messagecontainsalargeSQLstatementoralargestacktrace.Also,thesysloggerprocesseserrormessagesinchunks,withaseparatechunkforeach
loggingprocess.ThesizeofachunkisOS-dependent;onRedHatEnterpriseLinux,forexample,itis4096bytes.IfmanyGreenplumDatabasesessions
generateerrormessagesatthesametime,thelogfilecangrowsignificantlybeforeitssizeischeckedandlogrotationistriggered.
©CopyrightPivotalSoftwareInc,2013-2016
76
3.0
queries_*
The queries_* tablesstorehigh-levelquerystatusinformation.
The tmid , ssid and ccnt columnsarethecompositekeythatuniquelyidentifiesaparticularquery.Thesecolumnscanbeusedtojoinwiththe
iterators_*
tables.
Therearethreequeriestables,allhavingthesamecolumns:
queries_now
queries_now
isanexternaltablewhosedatafilesarestoredin $MASTER_DATA_DIRECTORY/gpperfmon/data .Currentquerystatusisstoredin
duringtheperiodbetweendatacollectionfromtheCommandCenteragentsandautomaticcommitmenttothe queries_history
table.
queries_tail isanexternaltablewhosedatafilesarestoredin $MASTER_DATA_DIRECTORY/gpperfmon/data .Thisisatransitionaltableforquery
statusdatathathasbeenclearedfrom queries_now buthasnotyetbeencommittedto queries_history .Ittypicallyonlycontainsafewminutes
worthofdata.
queries_history isaregulartablethatstoreshistoricalquerystatusdata.Itispre-partitionedintomonthlypartitions.Partitionsareautomatically
addedintwomonthincrementsasneeded.Administratorsmustdropoldpartitionsforthemonthsthatarenolongerneeded.
ctime
timestamp
Timethisrowwascreated.
tmid
int
Atimeidentifierforaparticularquery.All
recordsassociatedwiththequerywillhavethe
same tmid .
ssid
int
Thesessionidasshownby gp_session_id .All
recordsassociatedwiththequerywillhavethe
same ssid .
ccnt
int
Thecommandnumberwithinthissessionas
shownby gp_command_count .Allrecords
associatedwiththequerywillhavethesame
ccnt .
username
varchar(64)
Greenplumrolenamethatissuedthisquery.
db
varchar(64)
Nameofthedatabasequeried.
cost
int
Notimplementedinthisrelease.
tsubmit
timestamp
Timethequerywassubmitted.
tstart
timestamp
Timethequerywasstarted.
tfinish
timestamp
Timethequeryfinished.
status
varchar(64)
Statusofthequery– start , done ,or abort
.
rows_out
bigint
Rowsoutforthequery.
CPUusagebyallprocessesacrossallsegments
executingthisquery(inseconds).Itisthesumof
theCPUusagevaluestakenfromallactive
primarysegmentsinthedatabasesystem.
cpu_elapsed
cpu_currpct
NotethatGreenplumCommandCenterlogsthe
valueas0ifthequeryruntimeisshorterthan
thevalueforthequantum.Thisoccursevenif
thequeryruntimeisgreaterthanthevaluesfor
min_query_time and min_detailed_query ,andthese
valuesarelowerthanthevalueforthequantum.
bigint
CurrentCPUpercentaverageforallprocesses
executingthisquery.Thepercentagesforall
processesrunningoneachsegmentare
averaged,andthentheaverageofallthose
valuesiscalculatedtorenderthismetric.
float
©CopyrightPivotalSoftwareInc,2013-2016
77
3.0
CurrentCPUpercentaverageisalwayszeroin
historicalandtaildata.
skew_cpu
Displaystheamountofprocessingskewinthe
systemforthisquery.Processing/CPUskew
occurswhenonesegmentperformsa
disproportionateamountofprocessingfora
query.Thisvalueisthecoefficientofvariationin
theCPU%metricofalliteratorsacrossall
segmentsforthisquery,multipliedby100.For
example,avalueof.95isshownas95.
float
Displaystheamountofrowskewinthesystem.
Rowskewoccurswhenonesegmentproducesa
disproportionatenumberofrowsforaquery.
skew_rows
float
Thisvalueisthecoefficientofvariationforthe
rows_in metricofalliteratorsacrossall
segmentsforthisquery,multipliedby100.For
example,avalueof.95isshownas95.
query_hash
bigint
Notimplementedinthisrelease.
query_text
text
TheSQLtextofthisquery.
query_plan
text
Textofthequeryplan.Notimplementedinthis
release.
application_name
varchar(64)
Thenameoftheapplication.
rsqname
varchar(64)
Thenameoftheresourcequeue.
rqppriority
varchar(64)
©CopyrightPivotalSoftwareInc,2013-2016
Thepriorityofthequery–
max, high, med, low, or min
78
.
3.0
segment_*
The segment_* tablescontainmemoryallocationstatisticsfortheGreenplumDatabasesegmentinstances.Thistrackstheamountofmemoryconsumed
byallpostgresprocessesofaparticularsegmentinstance,andtheremainingamountofmemoryavailabletoasegmentasperthesettingofthe
postgresql.conf configurationparameter: gp_vmem_protect_limit .Queryprocessesthatcauseasegmenttoexceedthislimitwillbecancelledinorderto
preventsystem-levelout-of-memoryerrors.SeetheGreenplumDatabaseReferenceGuideformoreinformationaboutthisparameter.
Therearethreesegmenttables,allhavingthesamecolumns:
segment_now isanexternaltablewhosedatafilesarestoredin $MASTER_DATA_DIRECTORY/gpperfmon/data .Currentmemoryallocationdatais
storedin segment_now duringtheperiodbetweendatacollectionfromtheCommandCenteragentsandautomaticcommitmenttothe
segment_historytable.
segment_tail isanexternaltablewhosedatafilesarestoredin $MASTER_DATA_DIRECTORY/gpperfmon/data .Thisisatransitionaltableformemory
allocationdatathathasbeenclearedfrom segment_now buthasnotyetbeencommittedto segment_history .Ittypicallyonlycontainsafew
minutesworthofdata.
segment_history
isaregulartablethatstoreshistoricalmemoryallocationmetrics.Itispre-partitionedintomonthlypartitions.Partitionsare
automaticallyaddedintwomonthincrementsasneeded.Administratorsmustdropoldpartitionsforthemonthsthatarenolongerneeded.
Aparticularsegmentinstanceisidentifiedbyits hostname and dbid (theuniquesegmentidentifierasperthe gp_segment_configuration systemcatalog
table).
timestamp(0)
Thetimetherowwascreated.
ctime
(withouttimezone)
ThesegmentID( dbid from
dbid
int
hostname
charvar(64)
Thesegmenthostname.
dynamic_memory_used
bigint
Theamountofdynamicmemory(inbytes)
allocatedtoqueryprocessesrunningonthis
segment.
bigint
Theamountofadditionaldynamicmemory(in
bytes)thatthesegmentcanrequestbefore
reachingthelimitsetbythe
gp_vmem_protect_limit parameter.
dynamic_memory_available
gp_segment_configuration
).
Seealsotheviews memory_info and dynamic_memory_info foraggregatedmemoryallocationandutilizationbyhost.
©CopyrightPivotalSoftwareInc,2013-2016
79
3.0
socket_stats_*
The socket_stats_* tablesstorestatisticalmetricsaboutsocketusageforaGreenplumDatabaseinstance.Therearethreesystemtables,allhavingthe
samecolumns:
Thesetablesareinplaceforfutureuseandarenotcurrentlypopulated.
socket_stats_now
isanexternaltablewhosedatafilesarestoredin $MASTER_DATA_DIRECTORY/gpperfmon/data .
socket_stats_tail isanexternaltablewhosedatafilesarestoredin $MASTER_DATA_DIRECTORY/gpperfmon/data .Thisisatransitionaltablefor
socketstatisticalmetricsthathasbeenclearedfrom socket_stats_now buthasnotyetbeencommittedto socket_stats_history .Ittypically
onlycontainsafewminutesworthofdata.
socket_stats_history isaregulartablethatstoreshistoricalsocketstatisticalmetrics.Itispre-partitionedintomonthlypartitions.Partitionsare
automaticallyaddedintwomonthincrementsasneeded.Administratorsmustdropoldpartitionsforthemonthsthatarenolongerneeded.
Column
Type
Description
total_sockets_used
int
Totalsocketsusedinthesystem.
tcp_sockets_inuse
int
NumberofTCPsocketsinuse.
tcp_sockets_orphan
int
NumberofTCPsocketsorphaned.
tcp_sockets_timewait
int
NumberofTCPsocketsinTime-Wait.
tcp_sockets_alloc
int
NumberofTCPsocketsallocated.
tcp_sockets_memusage_inbytes
int
AmountofmemoryconsumedbyTCPsockets.
udp_sockets_inuse
int
NumberofUDPsocketsinuse.
udp_sockets_memusage_inbytes
int
AmountofmemoryconsumedbyUDPsockets.
raw_sockets_inuse
int
NumberofRAWsocketsinuse.
frag_sockets_inuse
int
NumberofFRAGsocketsinuse.
frag_sockets_memusage_inbytes
int
AmountofmemoryconsumedbyFRAGsockets.
©CopyrightPivotalSoftwareInc,2013-2016
80
3.0
system_*
The system_* tablesstoresystemutilizationmetrics.Therearethreesystemtables,allhavingthesamecolumns:
system_now
isanexternaltablewhosedatafilesarestoredin $MASTER_DATA_DIRECTORY/gpperfmon/data .Currentsystemutilizationdataisstored
in system_now duringtheperiodbetweendatacollectionfromtheCommandCenteragentsandautomaticcommitmenttothe system_history
table.
system_tail isanexternaltablewhosedatafilesarestoredin $MASTER_DATA_DIRECTORY/gpperfmon/data .Thisisatransitionaltableforsystem
utilizationdatathathasbeenclearedfrom system_now buthasnotyetbeencommittedto system_history .Ittypicallyonlycontainsafew
minutesworthofdata.
system_history isaregulartablethatstoreshistoricalsystemutilizationmetrics.Itispre-partitionedintomonthlypartitions.Partitionsare
automaticallyaddedintwomonthincrementsasneeded.Administratorsmustdropoldpartitionsforthemonthsthatarenolongerneeded.
Column
Type
Description
ctime
timestamp
Timethisrowwascreated.
hostname
varchar(64)
Segmentormasterhostnameassociatedwiththesesystemmetrics.
mem_total
bigint
TotalsystemmemoryinBytesforthishost.
mem_used
bigint
UsedsystemmemoryinBytesforthishost.
mem_actual_used
bigint
UsedactualmemoryinBytesforthishost(notincludingthememoryreservedforcacheandbuffers).
mem_actual_free
bigint
FreeactualmemoryinBytesforthishost(notincludingthememoryreservedforcacheandbuffers).
swap_total
bigint
TotalswapspaceinBytesforthishost.
swap_used
bigint
UsedswapspaceinBytesforthishost.
swap_page_in
bigint
Numberofswappagesin.
swap_page_out
bigint
Numberofswappagesout.
cpu_user
float
CPUusagebytheGreenplumsystemuser.
cpu_sys
float
CPUusageforthishost.
cpu_idle
float
IdleCPUcapacityatmetriccollectiontime.
load0
float
CPUloadaverageforthepriorone-minuteperiod.
load1
float
CPUloadaverageforthepriorfive-minuteperiod.
load2
float
CPUloadaverageforthepriorfifteen-minuteperiod.
quantum
int
Intervalbetweenmetriccollectionforthismetricentry.
disk_ro_rate
bigint
Diskreadoperationspersecond.
disk_wo_rate
bigint
Diskwriteoperationspersecond.
disk_rb_rate
bigint
Bytespersecondfordiskwriteoperations.
net_rp_rate
bigint
Packetspersecondonthesystemnetworkforreadoperations.
net_wp_rate
bigint
Packetspersecondonthesystemnetworkforwriteoperations.
net_rb_rate
bigint
Bytespersecondonthesystemnetworkforreadoperations.
net_wb_rate
bigint
Bytespersecondonthesystemnetworkforwriteoperations.
©CopyrightPivotalSoftwareInc,2013-2016
81
3.0
tcp_stats_*
The tcp_stats_* tablesstorestatisticalmetricsaboutTCPcommunicationsforaGreenplumDatabaseinstance.
Thesetablesareinplaceforfutureuseandarenotcurrentlypopulated.
Therearethreesystemtables,allhavingthesamecolumns:
tcp_stats_now
isanexternaltablewhosedatafilesarestoredin $MASTER_DATA_DIRECTORY/gpperfmon/data .
tcp_stats_tail isanexternaltablewhosedatafilesarestoredin $MASTER_DATA_DIRECTORY/gpperfmon/data .ThisisatransitionaltableforTCP
statisticaldatathathasbeenclearedfrom tcp_stats_now buthasnotyetbeencommittedto tcp_stats_history .Ittypicallyonlycontainsafew
minutesworthofdata.
tcp_stats_history isaregulartablethatstoreshistoricalTCPstatisticaldata.Itispre-partitionedintomonthlypartitions.Partitionsare
automaticallyaddedintwomonthincrementsasneeded.Administratorsmustdropoldpartitionsforthemonthsthatarenolongerneeded.
Column
Type
Description
segments_received
bigint
NumberofTCPsegmentsreceived.
segments_sent
bigint
NumberofTCPsegmentssent.
segments_retransmitted
bigint
NumberofTCPsegmentsretransmitted.
active_connections
int
NumberofactiveTCPconnections.
passive_connections
int
NumberofpassiveTCPconnections.
failed_connection_attempts
int
NumberoffailedTCPconnectionattempts.
connections_established
int
NumberofTCPconnectionsestablished.
connection_resets_received
int
NumberofTCPconnectionresetsreceived.
connection_resets_sent
int
NumberofTCPconnectionresetssent.
©CopyrightPivotalSoftwareInc,2013-2016
82
3.0
udp_stats_*
The udp_stats_* tablesstorestatisticalmetricsaboutUDPcommunicationsforaGreenplumDatabaseinstance.
Thesetablesareinplaceforfutureuseandarenotcurrentlypopulated.
Therearethreesystemtables,allhavingthesamecolumns:
udp_stats_now
isanexternaltablewhosedatafilesarestoredin $MASTER_DATA_DIRECTORY/gpperfmon/data .
udp_stats_tail isanexternaltablewhosedatafilesarestoredin $MASTER_DATA_DIRECTORY/gpperfmon/data .ThisisatransitionaltableforUDP
statisticaldatathathasbeenclearedfrom udp_stats_now buthasnotyetbeencommittedto udp_stats_history .Ittypicallyonlycontainsafew
minutesworthofdata.
udp_stats_history isaregulartablethatstoreshistoricalUDPstatisticalmetrics.Itispre-partitionedintomonthlypartitions.Partitionsare
automaticallyaddedintwomonthincrementsasneeded.Administratorsmustdropoldpartitionsforthemonthsthatarenolongerneeded.
Column
Type
Description
packets_received
bigint
NumberofUDPpacketsreceived.
packets_sent
bigint
NumberofUDPpacketssent.
packets_received_unknown_port
int
NumberofUDPpacketsreceivedonunknownports.
packet_receive_errors
bigint
NumberoferrorsencounteredduringUDPpacketreceive.
©CopyrightPivotalSoftwareInc,2013-2016
83
3.0
iterators_*_rollup
The iterators_*_rollup setofviewsaggregatethemetricsstoredinthe iterators_* tables.Aqueryiteratorreferstoanodeoroperationinaqueryplan.For
example,asequentialscanoperationmaybeonetypeofiteratorinaparticularqueryplan.Foreachiteratorinaqueryplan,the iterators_* tablesstore
themetricscollectedfromeachsegmentinstance.The iterators_*_rollup viewssummarizethequeryiteratormetricsacrossallsegmentsinthesystem.
The tmid , ssid and ccnt columnsarethecompositekeythatuniquelyidentifiesaparticularquery.
Therearethreeiteratorsrollupviews,allhavingthesamecolumns:
The iterators_now_rollup viewshowsiteratordatafromthe interators_now tableaggregatedacrossallsegmentsinthesystem.
The iterators_tail_rollup viewshowsiteratordatafromthe interators_tail tableaggregatedacrossallsegmentsinthesystem.
The iterators_history_rollup showsiteratordatafromthe interators_history tableaggregatedacrossallsegmentsinthesystem.
Seealsothe iterators_* tablesformoreinformationaboutthequeryplaniteratortypesandthemetricscollectedforeachiterator.
sample_time
timestamp
The ctime fromtheassociated iterators_*
table.
tmid
int
Atimeidentifierforaparticularquery.All
iteratorrecordsassociatedwiththequerywill
havethesame tmid .
ssid
int
Thesessionidasshownbythe gp_session_id
parameter.Alliteratorrecordsassociatedwith
thequerywillhavethesame ssid .
ccnt
int
Thecommandnumberwithinthissessionas
shownby gp_command_count parameter.All
iteratorrecordsassociatedwiththequerywill
havethesame ccnt .
nid
int
TheIDofthisqueryplannodefromtheslice
plan.
pnid
int
ntype
text
nstatus
text
Theaccumulatedstatusofthisiterator.Possible
valuesare:Initialize,Executing,orFinished.
tstart
timestamp
Theaveragestarttimeforthisiterator.
tduration
numeric
Theaverageexecutiontimeforthisiterator.
pmemsize
numeric
Theaverageworkmemoryallocatedbythe
Greenplumplannertothisiterator’squery
processes.
pmemmax
numeric
Theaverageofthemaximumplannerwork
memoryusedbythisiterator’squeryprocesses.
memsize
numeric
TheaverageOSmemoryallocatedtothis
iterator’sprocesses.
memresid
numeric
Theaverageresidentmemoryallocatedtothis
iterator’sprocesses(asopposedtoshared
memory).
memshare
numeric
Theaveragesharedmemoryallocatedtothis
iterator’sprocesses.
cpu_elapsed
numeric
SumoftheCPUusageofallsegmentprocesses
executingthisiterator.
The pnid (sliceplanparentnodeID)fromthe
associated iterators_* table.
The ntype (node/iteratortype)fromthe
associated iterators_* table.
ThecurrentaveragepercentageofCPU
utilizationusedbythisiterator’sprocesses.This
©CopyrightPivotalSoftwareInc,2013-2016
84
3.0
utilizationusedbythisiterator’sprocesses.This
valueisalwayszeroforhistorical(completed)
iterators.
cpu_currpct
doubleprecision
rows_out
numeric
Thetotalnumberofactualrowsoutputforthis
iteratoronallsegments.
rows_out_est
numeric
Thetotalnumberofoutputrowsforall
segmentsasestimatedbythequeryplanner.
numeric
Coefficientofvariationfor cpu_elapsed of
iteratorsacrossallsegmentsforthisquery,
multipliedby100.Forexample,avalueof.95is
renderedas95.
skew_cpu
skew_rows
Coefficientofvariationfor rows_out of
iteratorsacrossallsegmentsforthisquery,
multipliedby100.Forexample,avalueof.95is
numeric
renderedas95.
m0
Thename( m0_name ),unitofmeasure(
m0_unit) ,averageactualvalue( m0_val ),
andaverageestimatedvalue( m0_est )forthis
text
iteratormetricacrossallsegments.The m0
metricisalwaysrowsforalliteratortypes.
m1
m2
m3
text
Thename( m1_name ),unitofmeasure(
m1_unit ),averageactualvalue( m1_val ),
andaverageestimatedvalue( m1_est )forthis
iteratormetricacrossallsegments.
text
Thename( m2_name ),unitofmeasure(
m2_unit ),averageactualvalue( m2_val ),
andaverageestimatedvalue( m2_est )forthis
iteratormetricacrossallsegments.
Thename( m3_name ),unitofmeasure(
m3_unit ),averageactualvalue( m3_val ),
andaverageestimatedvalue( m3_est )forthis
text
iteratormetricacrossallsegments.
m4
m5
text
Thename( m4_name ),unitofmeasure(
m4_unit ),averageactualvalue( m4_val ),
andaverageestimatedvalue( m4_est )forthis
iteratormetricacrossallsegments.
text
Thename( m5_name ),unitofmeasure(
m5_unit ),averageactualvalue( m5_val ),
andaverageestimatedvalue( m5_est )forthis
iteratormetricacrossallsegments.
Thename( m6_name ),unitofmeasure(
m6
m7
m8
m6_unit ),averageactualvalue( m6_val ),
andaverageestimatedvalue( m6_est )forthis
iteratormetricacrossallsegments.
text
Thename( m7_name ),unitofmeasure(
m7_unit ),averageactualvalue( m7_val ),
andaverageestimatedvalue( m7_est )forthis
iteratormetricacrossallsegments.
text
Thename( m8_name ),unitofmeasure(
m8_unit ),averageactualvalue( m8_val ),
text
m9
text
m10 - m5
text
©CopyrightPivotalSoftwareInc,2013-2016
andaverageestimatedvalue( m8_est )forthis
iteratormetricacrossallsegments.
Thename( m9_name ),unitofmeasure(
m9_unit ),averageactualvalue( m9_val ),
andaverageestimatedvalue( m9_est )forthis
iteratormetricacrossallsegments.
Metrics m10 through m15 arenotcurrently
usedbyanyiteratortypes.
85
3.0
t0
Thenameoftherelation( t0_val )being
scannedbythisiterator.Thismetriciscollected
onlyforiteratorsthatperformscanoperations
suchasasequentialscanorfunctionscan.
text
©CopyrightPivotalSoftwareInc,2013-2016
86
3.0
dynamic_memory_info
The dynamic_memory_info viewshowsasumoftheusedandavailabledynamicmemoryforallsegmentinstancesonasegmenthost.Dynamicmemory
referstothemaximumamountofmemorythatGreenplumDatabaseinstancewillallowthequeryprocessesofasinglesegmentinstancetoconsume
beforeitstartscancellingprocesses.Thislimitissetbythe gp_vmem_protect_limit serverconfigurationparameter,andisevaluatedonaper-segment
basis.
Column
Type
Description
ctime
timestamp(0)
withouttime
zone
Timethisrowwascreatedinthe segment_history table.
hostname
varchar(64)
Segmentormasterhostnameassociatedwiththesesystemmemorymetrics.
dynamic_memory_used_mb
numeric
TheamountofdynamicmemoryinMBallocatedtoqueryprocessesrunningonthissegment.
numeric
Theamountofadditionaldynamicmemory(inMB)availabletothequeryprocessesrunningon
thissegmenthost.Notethatthisvalueisasumoftheavailablememoryforallsegmentsona
host.Eventhoughthisvaluereportsavailablememory,itispossiblethatoneormoresegments
onthehosthaveexceededtheirmemorylimitassetbythe gp_vmem_protect_limit parameter.
dynamic_memory_available_mb
©CopyrightPivotalSoftwareInc,2013-2016
87
3.0
memory_info
The memory_info viewshowsper-hostmemoryinformationfromthe system_history and segment_history tables.Thisallowsadministratorstocomparethe
totalmemoryavailableonasegmenthost,totalmemoryusedonasegmenthost,anddynamicmemoryusedbyqueryprocesses.
Column
Type
Description
ctime
timestamp(0)
withouttime
zone
Timethisrowwascreatedinthe segment_history table.
hostname
varchar(64)
Segmentormasterhostnameassociatedwiththesesystemmemorymetrics.
mem_total_mb
numeric
TotalsystemmemoryinMBforthissegmenthost.
mem_used_mb
numeric
TotalsystemmemoryusedinMBforthissegmenthost.
mem_actual_used_mb
numeric
ActualsystemmemoryusedinMBforthissegmenthost.
mem_actual_free_mb
numeric
ActualsystemmemoryfreeinMBforthissegmenthost.
swap_total_mb
numeric
TotalswapspaceinMBforthissegmenthost.
swap_used_mb
numeric
TotalswapspaceusedinMBforthissegmenthost.
dynamic_memory_used_mb
numeric
TheamountofdynamicmemoryinMBallocatedtoqueryprocessesrunningonthissegment.
numeric
Theamountofadditionaldynamicmemory(inMB)availabletothequeryprocessesrunningon
thissegmenthost.Notethatthisvalueisasumoftheavailablememoryforallsegmentsona
host.Eventhoughthisvaluereportsavailablememory,itispossiblethatoneormoresegments
onthehosthaveexceededtheirmemorylimitassetbythe gp_vmem_protect_limit parameter.
dynamic_memory_available_mb
©CopyrightPivotalSoftwareInc,2013-2016
88
3.0