📄 logsrv.script
字号:
:note.The keyword :hp3.TODAY:ehp3. can be used for the current date in the :xph.FROM, AFTER, TO, BEFORE:exph. options.:p.:xph.FROMRECORD:exph. selects only those records whose record number is greater than or equalto the specified record number (which must be >= 1). &varres.:p.:xph.TORECORD:exph. selects only those records whose record number is less than or equal tothe specified record number (which must be >= 1). &varres.:p.:xph.FIRST:exph. selects only the first <Num> records. &varres.:p.:xph.LAST:exph. selects only the last <Num> records. &varres.:p.:xph.ALL:exph. selects all the records that meet the query criteria.:p.:xph.TOTAL:exph. display only the total number of records selected instead of the records themselves.:p.:xph.STATS:exph. display the totals for each level instead of the records themselves.:p.:xph.LONG:exph. displays all of the fields for each log record instead of just the timestamp, level, and message fields.:p.:xph.LEVELBITSTRING:exph. displays the selected records with the level displayed as a 32 byte binary bitstring, e.g. 00000000000000000000000000000001 instead of the standard level text e.g. Error.See :hdref refid=loglev. for a complete list of logging levels.:h4.Security:p.&seclvl. 2.:h4.Return Codes:p.In addition to the return codes documented in :hdref refid=retcode.,QUERY also returns codes documented in :hdref refid=logerr..:h4.Results:p.If the query criteria selects more records than allowed by the DefaultMaxQueryRecordsparameter/setting (and none of the following options are specified: :xph.FIRST, LAST,ALL, TOTAL, or STATS:exph.), the return code will be set to 4010 and the result buffer willcontain only the 'last' default maximum number of query records.:p.If successful, the result buffer will contain data based on the QUERY command::p.:ul.:li.If the :xph.TOTALS:exph. option is specified, the result bufferwill contain only the total number of records selected insteadof the records themselves.:p.:li.If the :xph.STATS:exph. option is specified, the result buffer willcontain a marshalled :xph.<Map&colon.STAF/Service/Log/QueryStats>:exph.defined as follows::table cols='* * * *'.:tcap.Definition of map class STAF/Service/Log/QueryStats:tnote text='Description'.This map class represents the totals for the log levels of theselected records in the log.:thd.:c.Key Name:c.Display Name:c.Type:c.Value / Format:ethd.:row.:c.fatal:c.Fatal:c.&stringObj.:c.:row.:c.error:c.Error:c.&stringObj.:c.:row.:c.warning:c.Warning:c.&stringObj.:c.:row.:c.info:c.Info:c.&stringObj.:c.:row.:c.trace:c.Trace:c.&stringObj.:c.:row.:c.trace2:c.Trace2:c.&stringObj.:c.:row.:c.trace3:c.Trace3:c.&stringObj.:c.:row.:c.debug:c.Debug:c.&stringObj.:c.:row.:c.debug2:c.Debug2:c.&stringObj.:c.:row.:c.debug3:c.Debug3:c.&stringObj.:c.:row.:c.start:c.Start:c.&stringObj.:c.:row.:c.stop:c.Stop:c.&stringObj.:c.:row.:c.pass:c.Pass:c.&stringObj.:c.:row.:c.fail:c.Fail:c.&stringObj.:c.:row.:c.status:c.Status:c.&stringObj.:c.:row.:c.user1:c.User1:c.&stringObj.:c.:row.:c.user2:c.User2:c.&stringObj.:c.:row.:c.user3:c.User3:c.&stringObj.:c.:row.:c.user4:c.User4:c.&stringObj.:c.:row.:c.user5:c.User5:c.&stringObj.:c.:row.:c.user6:c.User6:c.&stringObj.:c.:row.:c.user7:c.User7:c.&stringObj.:c.:row.:c.user8:c.User8:c.&stringObj.:c.:etable.:p.:li.If the :xph.LONG:exph. option is specified, the result buffer willcontain a marshalled :xph.<List> of<Map&colon.STAF/Service/Log/LogRecordLong>:exph.,representing detailed information for the selected log records.The map is defined as follows::table cols='* * * 2*'.:tcap.Definition of map class STAF/Service/Log/LogRecordLong:tnote text='Description'.This map class represents detailed information for a log record.:thd.:c.Key Name:c.Display Name:c.Type:c.Value / Format:ethd.:row.:c.recordNumber:c.Record #.br(R#):c.&stringObj.:c.:row.:c.timestamp:c.Date-Time:c.&stringObj.:c.×tampFormat.:row.:c.machine:c.Machine:c.&stringObj.:c.:row.:c.handle:c.Handle.br(H#):c.&stringObj.:c.:row.:c.handleName:c.Handle Name.br(Name):c.&stringObj.:c.:row.:c.user:c.User:c.&stringObj.:c.:row.:c.endpoint:c.Endpoint:c.&stringObj.:c.:xph.<Interface>://<System Identifier>[@<Port>]:exph.:row.:c.level:c.Level:c.&stringObj.:c.:row.:c.message:c.Message:c.&stringObj.:c.:etable.:p.:li.Otherwise, the result buffer will contain a marshalled:xph.<List> of <Map&colon.STAF/Service/Log/LogRecord>:exph.,representing the selected log records (in a "short" format).The map is defined as follows::table cols='* * * 2*'.:tcap.Definition of map class STAF/Service/Log/LogRecord:tnote text='Description'.This map class represents a log record.:thd.:c.Key Name:c.Display Name:c.Type:c.Value / Format:ethd.:row.:c.timestamp:c.Date-Time:c.&stringObj.:c.×tampFormat.:row.:c.level:c.Level:c.&stringObj.:c.:row.:c.message:c.Message:c.&stringObj.:c.:etable.:eul.:h4.Examples:p.Assume this example log file called STRESSTST contains the following records::xmp.R# Date-Time Machine H# Name User Endpoint Level Message-- ----------------- ---------------------- -- ------ ---------------- --------------------------------- ------- ----------------------------------1 20070210-18:04:00 automate.austin.ibm.com 37 Test1A none://anonymous local://local Start Stress Test 1A Initiated2 20070210-19:37:15 automate.austin.ibm.com 37 Test1A none://anonymous local://local Trace Step 1: processing time: 01:31:263 20070210-19:39:09 automate.austin.ibm.com 37 Test1A none://anonymous local://local Debug Step 1: debug: files=23 threads=374 20070210-22:20:34 automate.austin.ibm.com 37 Test1A none://anonymous local://local Warning Step 2: File not ready, retry=35 20070210-22:21:01 automate.austin.ibm.com 37 Test1A none://anonymous local://local Info Step 2: File ready on retry 36 20070211-01:21:39 automate.austin.ibm.com 37 Test1A none://anonymous local://local Trace Step 2: processing time: 03:02:417 20070211-01:21:58 automate.austin.ibm.com 37 Test1A none://anonymous local://local Debug Step 2: debug: files=31 threads=548 20070211-01:37:25 crazy8s.austin.ibm.com 41 Test2 none://anonymous tcp://crazy8s.austin.ibm.com@6500 Trace Step 1: processing time: 03:11:539 20070211-01:43:46 crazy8s.austin.ibm.com 41 Test2 none://anonymous tcp://crazy8s.austin.ibm.com@6500 Debug Step 1: debug: files=43 threads=6710 20070211-02:53:20 automate.austin.ibm.com 37 Test1A none://anonymous local://local Error Step 3: Sharing buffer exceeded11 20070211-02:54:22 automate.austin.ibm.com 37 Test1A none://anonymous local://local User1 Step 3: Error recovery started12 20070211-04:32:53 automate.austin.ibm.com 37 Test1A none://anonymous local://local User2 Step 3: Error recovery completed13 20070211-04:33:49 automate.austin.ibm.com 37 Test1A none://anonymous local://local Trace Step 3: processing time: 03:10:4114 20070211-04:34:07 automate.austin.ibm.com 37 Test1A none://anonymous local://local Debug Step 3: debug: files=78 threads=9815 20070211-08:46:22 automate.austin.ibm.com 37 Test1A none://anonymous local://local Stop Stress Test 1A Completed16 20070211-08:47:21 automate.austin.ibm.com 37 Test1A none://anonymous local://local Pass Stress Test 1A: Errors=1 Recover=117 20070211-08:48:46 automate.austin.ibm.com 37 Test1A none://anonymous local://local Status Step1=P, Step2=P, Step3=W, TC=P:exmp.:note. The output for these examples are formatted for ease of reading in thisdocument, the actual format will vary depending on whether the command issubmitted via STAF.exe or via a program's submit(), etc. method.:ul.:li.:hp2.Goal::ehp2. Show me all the trace and debug entries for global log stresstst:p.:hp2.Syntax::ehp2. :xph.QUERY GLOBAL LOGNAME stresstst LEVELMASK "TRACE TRACE2 TRACE3 DEBUG DEBUG2 DEBUG3":exph.:p.:hp2.Results::ehp2. If the request was issued from thecommand line, the result, in table format, could look like::xmp.Date-Time Level Message----------------- ----- ----------------------------------20070210-19:37:15 Trace Step 1: processing time: 01:31:2620070210-19:39:09 Debug Step 1: debug: files=23 threads=3720070211-01:21:39 Trace Step 2: processing time: 03:02:4120070211-01:21:58 Debug Step 2: debug: files=31 threads=5420070211-01:37:25 Trace Step 1: processing time: 03:11:5320070211-01:43:46 Debug Step 1: debug: files=43 threads=6720070211-04:33:49 Trace Step 3: processing time: 03:10:4120070211-04:34:07 Debug Step 3: debug: files=78 threads=98:exmp.:p.:li.:hp2.Goal::ehp2. Show me all the errors:p.:hp2.Syntax::ehp2. :xph.QUERY GLOBAL LOGNAME stresstst LEVELMASK "ERROR":exph.:p.:hp2.Results::ehp2. If the request was issued from thecommand line, the result in table format, could look like::xmp.Date-Time Level Message----------------- ----- -------------------------------20070211-02:53:20 Error Step 3: Sharing buffer exceeded:exmp.:p.:li.:hp2.Goal::ehp2. How many log records are there?:p.:hp2.Syntax::ehp2. :xph.QUERY GLOBAL LOGNAME stresstst total:exph.:p.:hp2.Results::ehp2.:xmp.17:exmp.:p.:li.:hp2.Goal::ehp2. Show me everything that happened after I left until I came in on machine "automate":p.:hp2.Syntax::ehp2. :xph.QUERY GLOBAL LOGNAME stresstst FROM 20070210@19:00:00 QMACHINE automate to today@08:00:00:exph.:p.:hp2.Results::ehp2. If the request was issued from thecommand line, the result, in table format, could look like::xmp.Date-Time Level Message----------------- ------- ----------------------------------20070210-19:37:15 Trace Step 1: processing time: 01:31:2620070210-19:39:09 Debug Step 1: debug: files=23 threads=3720070210-22:20:34 Warning Step 2: File not ready, retry=320070210-22:21:01 Info Step 2: File ready on retry 320070211-01:21:39 Trace Step 2: processing time: 03:02:4120070211-01:21:58 Debug Step 2: debug: files=31 threads=5420070211-02:53:20 Error Step 3: Sharing buffer exceeded20070211-02:54:22 User1 Step 3: Error recovery started20070211-04:32:53 User2 Step 3: Error recovery completed20070211-04:33:49 Trace Step 3: processing time: 03:10:41
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -