Extract data
Sorry to ask such simple question there , but I really want to have a suggestion.
I have a text mode program (run on unix shell)to monitor the db preformance , I would like to extract some data from this program, the program like these:
# dbmon ./ordb
DB MONITOR
Database: /usr/local/bin/db/ordb
1. System activities
2. Locking and Waiting Statistics
When I press "2" key , then go to the next screen
Locking and Waiting:
Type Usr Name Record Trans Schema
Lock 999 TOTAL... 254999 17 0
Wait 999 TOTAL... 0 0 0
Lock 0 root 0 0 0
Wait 0 root 0 0 0
What I want is to extract the data "999 TOTAL... 254999 17" .
My problem is I must manually press the "2" key then to go to the next screen , I want the program can extract this data into a text file automatically and reqularly but no need to interactively to press any key , could suggest can can I do ?
I am not sure whether it is clear to understand , but I am very wellcome to answer if any point is
|