- >ps -ef
-f full list
>grep (Global Regular Express Print)
> egrep
>fgrep
>sort
>head -5 file = head -n 5 file
> tail -n 10 file , tail -n +10 file | pg
DB2 Event Monitor
__ 1. Set event monitors ~db2inst1/sqllib/db2profile echo "set event monitors for ls db" db2 connect to mydb user mydb_usr using password echo "make sure cleaned up" db2 drop event monitor x1mon db2 update monitor switches using bufferpool on lock on uow on sort on table on statement on timestamp on db2 reset monitor all db2 "create event monitor x1mon for statements, deadlocks, database, tables, connections, \\ transactions write to file '/tmp/x1mon'" db2 "set event monitor x1mon state 1" Note: make sure permissions of the /tmp/x1mon dir is accessible by db2 owner __ 2. Run your app, say, for 10 minutes (so long it is enough to execution the code paths you want) __ 3. Set them OFF ~db2inst1/sqllib/db2profile echo "generate event monitor data" db2 set event monitor x1mon state 0 db2evmon -path /tmp/x1mon > /tmp/x1mon.out echo "drop event monitors for ls db" db2 drop event monitor x1mon db2 get snapshot for dbm > /tmp/x1snapshot.txt db2 get snapshot for all on mydb>> /tmp/x1snapshot.txt db2 update monitor switches using bufferpool off lock off uow off sort off table off statement off t imestamp off db2 terminate Look into /tmp/x1mon.out for details.
| Monitor Switch | DBM Parameter | Information Provided |
|---|---|---|
| BUFFERPOOL | DFT_MON_BUFPOOL | Number of reads and writes, time taken |
| LOCK | DFT_MON_LOCK | Lock wait times, deadlocks |
| SORT | DFT_MON_SORT | Number of heaps used, sort performance |
| STATEMENT | DFT_MON_STMT | Start/stop time, statement identification |
| TABLE | DFT_MON_TABLE | Measure of activity (rows read/written) |
| UOW | DFT_MON_UOW | Start/end times, completion status |
| TIMESTAMP | DFT_MON_TIMESTAMP | Timestamps |
Word:
paper plate
forks and spoons
napkins
savory -- salty / sweet
No comments:
Post a Comment