Você está na página 1de 2

DB2PD is a diagnostic tool avaialble in DB2 forLUW.It is used for monitoring and troubleshooting.

It gets the information from DB2 memory. To quote from IBM manual, " The tool collects information without acquiring any latches or using any engine resources. It is therefore possible (and expected) to retrieve information that is changing while db2pd is collecting information; hence the data might not be completely accurate. If changing memory pointers are encountered, a signal handler is used to prevent db2pd from ending abnormally. This can result in messages such as "Changing data structure forced command termination" to appear in the output. Nonetheless, the tool can be helpful for troubleshooting. Two benefits to collecting information without latching include faster retrieval and no competition for engine resources. " db2pd -db databasename -locks -transactions -applications -dynamic =>Diagnosi ng a lockwait db2pd -wlocks -db dbname => capture all the locks being waited on db2pd -apinfo AppHandl -db dbname => capture detailed runtime information abo ut the lock owner and the lock waiter db2pd -db sample -locks => Using the callout scripts when considering a locki ng problem db2pd -applications -dynamic =>reports the current and last anchor ID and sta tement unique ID for dynamic SQL statements. This allows direct mapping from an application to a dynamic SQL statement. db2pd -tcbstats => you can identify the number of inserts for a table. db2pd -tablespaces => gives number of inserts at tablespace level db2pd -db sample -dyn => you can identify the dynamic SQL statement that is u sing the table db2pd -recovery -db sample (or alldbs)=> the output shows several counters th at you can use to verify that recovery is progressing db2pd -transactions -db dbname => the output shows the number of locks, the f irst log sequence number (LSN), the last LSN, the first LSO, the last LSO, the l og space used, and the space reserved db2pd -logs -db dbname => for monitoring log usage for a database. By using t hePages Written value, as shown in the following sample output, you can determin e whether the log usage is increasing You can identify two types of problems by using thi s output: a)If the most recent log archive fails, Archive Sta tus is set to a value of Failure. If there is an ongoing archive failure, preven ting logs from being archived at all, Archive Status is set to a value of First Failure . b)If log archiving is proceeding very slowly, the N ext Log to Archive value is lower than the Current Log Number value. If archivin

g is very slow, space for active logs might run out, which in turn might pr event any data changes from occurring in the database. db2pd -sysplex => Viewing the sysplex list db2pd -stack all => to produce stack traces for all processes in the current database partition. You might want to use this command iteratively when you susp ect that a process or thread is looping or hanging. db2pd -stack eduid => obtain the current call stack for a particular engine d ispatchable unit (EDU) db2pd -dbptnmem => shows how much memory the DB2 server is currently consumin g and, at a high level, which areas of the server are using that memory. db2pd -reorgs index -db dbname => reports index reorg progress for partitione d indexes (Fix Pack 1 introduced support for only non-partitioned indexes). db2pd -edus interval=5 => the deltas for processor user time and processor sy stem time are given across a five-second interval db2pd -edus interval=5 top=5 stacks db2pd -agents event => If you need to determine whether an agent changed stat e during a specific period of time, use the event option together with the -agen ts parameter. The AGENT_STATE_LAST_UPDATE_TIME(Tick Value) column that i s returned shows the last time that the event being processed by the agent was c hanged db2pd -tablespaces -db sample => list tablespaces details db2pd -db dbname -tcbstats tmp_space_id to monitor temp space db2pdcfg -catch => to capture information about the database management syste m when a specific SQLCODE, ZRC code or ECF code occurs When the errors are caught, the db2cos (callout script) is launched. The db2cos script can be dynamically altered to run any db2pd command, operating system command, or any other command ne eded to resolve the problems. The template db2cos script file is located in sqll ib/bin on UNIX and Linux. On the Windows operating system, db2cos is loca ted in the $DB2PATH\bin directory. db2pd -addnode => When adding a new node, you can monitor the progress of the operation on the database partition server, that is adding the node.Use optiona l oldviewapps and detail parameters for more detailed infor mation. db2pd -gfw => If you require a list of event monitors that are currently act ive or have been, for some reason, deactivated, run the db2pd -gfw command. This command also returns statistics and information about the targets, into whi ch event monitors write data, for each fast writer EDU.

Você também pode gostar