0

「CoreAPP.txt」という名前でログ ファイルの下に自動的に書き込むアプリケーションがあります</p>

「CoreAPP.txt」のサンプル:

[10/31/2012 19:53:41:889 SWAP INF] {hap=CB2:app=Internet Explorer_b1 6.0.3790.3959:tid=22C0:usr=B9D327}
Elapsed time for upload: 0.718 seconds


[10/31/2012 19:53:42:639 SWAP INF] {hap=CB2:app=Internet Explorer_b1 6.0.3790.3959:tid=22C0:usr=V9V327}
Elapsed time for launch: 3.250 seconds


[10/31/2012 19:56:37:815 ???? INF] {tid=4004:usr=V47235}
An error occurred while opening the virtual registry (section: 9), rc: 07B01F0C-0000004A


[10/31/2012 19:56:37:846 ???? INF] {tid=4004}
An error occurred while opening the virtual registry (section: 9), rc: 07B01F0C-0000004A



[10/31/2012 10:45:00:576 ???? INF] {tid=1650}
An error occurred while opening the virtual registry (section: 9), rc: 07B01F0C-0000004A
ElapR
The Application Virtualization Client could not connect to stream URL 'RTSP://SRVW23E:554/V1321_BDP_V1_R1_SB/V1321_BDP_C1_P2PM_SS.sft' (rc 1690900A-00002002, 

original rc 1690900A-00002002).


[10/31/2012 00:29:59:843 OSDF ERR] {tid=1464}
The Application Virtualization Client could not parse the OSD file 'C:\SoftCache\SoftGrid Client\OSD Cache\edCc4305-3f6C-4dcc-3d70-404eb8bd97d8.osd'. 

Reason: XML parsing failure (rc 00000A25-00000002)

[10/31/2012 08:24:35:869 ???? ERR] {tid=336C:usr=t405230}
corrupt cp file detected ('V:\V1321_BDP\osguard.cp'). osguard cp file, NO CORRECTIVE ACTION TAKEN


[10/31/2012 22:16:39:240 JGSW ERR] {hap=1C82:app=bDP c15 E2AM SS 1.0:tid=3D58}
The Application Virtualization Client could not connect to stream URL 'RTSP://PSWQAPP1:554/V14678993_BDP_C15_E2AM_SS/V14678993_BDP_C15_E2AM_SS.sft' (rc 

1690900A-00002002, original rc 1690900A-00002002).


[10/31/2012 22:16:39:240 SWAP ERR] {hap=1C82:app=bDP c15 E2AM SS 1.0:tid=3D58}
The client was unable to connect to an Application Virtualization Server (rc 1690900A-00002002)


[10/31/2012 22:17:09:163 AMGR ERR] {tid=4F54}
The specified application name (Application Integration) is ambiguous. Some potential matches:
Application Integration 7.0.1756.1756
Application Integration 9.2.2373.2373


[10/31/2012 22:17:09:163 AMGR ERR] {tid=4F54}
The Application Virtualization Client cannot open Application Integration

[10/31/2012 00:03:14:313 SWAP WRN] {tid=507C:usr=N28712}
Could not load OSD file \\PSWQAPP1\Content\D1311_bDP_Adobe_Reader_9.3.3\D1311_bDP_Adobe_Reader 9.3.3.osd


[10/31/2012 00:03:14:313 AMGR INF] {tid=507C:usr=i435145}
The app manager could not create an application from '\\PSWQAPP1\Content\D1311_bDP_Adob_dobe_Reader_9.3.3\D1311_bDP_Adob_b_Adobe Reader 9.3.3.osd' (rc 

0C405664-00000002).


====
[10/31/2012 13:35:16:987 JGSW ERR] {hap=1:app=Abaculus 1.0.0.1:tid=14C8:usr=R3R7DF42}
The Application Virtualization Client could not connect to stream URL 'RTSP:%SFT_SRV

%:554/D1311_bDP_Adob_b_Adobe_Abaculus_15_01/D1311_bDP_Adob_b_Adobe_Abaculus_15_01.sft' (rc 19D02E0A-10000002, original rc 19D02E0A-10000002).


[10/31/2012 13:35:47:998 SWAP ERR] {hap=2:app=AboutPI-SDK 1.3.0.26:tid=1568:usr=I337721}
Could not load app


[10/31/2012 19:56:37:862 SWAP INF] {hap=CB3:app=Adobe Reader X 10.0.1.434:tid=4004:usr=V47235}
Elapsed time for upload: 0.609 seconds


[10/31/2012 19:56:38:393 SWAP INF] {hap=CB3:app=Adobe Reader X 10.0.1.434:tid=4004:usr=V47236}
Elapsed time for launch: 1.187 seconds


[10/31/2012 19:56:57:487 SWAP INF] {hap=CB3:app=Adobe Reader X 10.0.1.434:tid=4004:usr=V47234}
App shut down


[10/31/2012 20:01:40:745 ???? INF] {tid=327C:usr=V42235}
An error occurred while opening the virtual registry (section: 9), rc: 07B01F0C-0000004A


[10/31/2012 20:01:40:776 ???? INF] {tid=327C}
An error occurred while opening the virtual registry (section: 9), rc: 07B01F0C-0000004A


[10/31/2012 20:01:40:776 SWAP INF] {hap=CB4:app=Adobe Reader X 10.0.1.434:tid=327C:usr=V422357235}
Elapsed time for upload: 0.609 seconds


[11/01/2012 16:48:44:157 SWAP INF] {hap=11A4:app=Lotus Notes_b1 6.5.40.5086:tid=361C:usr=A422353001}
Elapsed time for launch: 5.219 seconds


[11/01/2012 16:50:21:003 ???? INF] {tid=32D8:usr=W8WS83}
An error occurred while opening the virtual registry (section: 9), rc: 07B01F0C-0000004A


[11/01/2012 16:50:21:066 ???? INF] {tid=32D8}
An error occurred while opening the virtual registry (section: 9), rc: 07B01F0C-0000004A


[11/01/2012 16:50:21:082 SWAP INF] {hap=11A5:app=Adobe Reader X 10.0.1.434:tid=32D8:usr=W8WS83}
Elapsed time for upload: 0.703 seconds


[11/01/2012 16:50:22:503 SWAP INF] {hap=11A5:app=Adobe Reader X 10.0.1.434:tid=32D8:usr=W8WS83}
Elapsed time for launch: 2.218 seconds


[11/01/2012 16:50:50:395 SWAP INF] {hap=11A5:app=Adobe Reader X 10.0.1.434:tid=32D8:usr=A422353001}
App shut down


[11/01/2012 16:53:24:367 ???? INF] {tid=1F80:usr=t405230}
An error occurred while opening the virtual registry (section: 9), rc: 07B01F0C-0000004A


[11/01/2012 16:53:24:383 ???? INF] {tid=1F80}
An error occurred while opening the virtual registry (section: 9), rc: 07B01F0C-0000004A


[11/01/2012 16:53:24:383 SWAP INF] {hap=11A6:app=Show Desktop 1.0:tid=1F80:usr=A422353001}
Elapsed time for upload: 0.531 seconds


[11/01/2012 16:53:24:727 SWAP INF] {hap=11A7:app=Microsoft Office Excel 2003_b1 11.0.8324.1:tid=251C:usr=V422357235}
Elapsed time for upload: 0.0 seconds


[11/01/2012 16:53:24:758 SWAP INF] {hap=11A6:app=Show Desktop 1.0:tid=1F80:usr=V47234}
Elapsed time for launch: 1.78 seconds


[11/01/2012 16:53:25:117 SWAP INF] {hap=11A6:app=Show Desktop 1.0:tid=1F80:usr=V422357235}
App shut down



[11/01/2012 10:45:00:576 ???? INF] {tid=1650}
An error occurred while opening the virtual registry (section: 9), rc: 07B01F0C-0000004A
ElapR
The Application Virtualization Client could not connect to stream URL 'RTSP://SRVW23E:554/V1321_BDP_V1_R1_SB/V1321_BDP_C1_P2PM_SS.sft' (rc 1690900A-00002002, 

original rc 1690900A-00002002).


[11/01/2012 00:29:59:843 OSDF ERR] {tid=1464}
The Application Virtualization Client could not parse the OSD file 'C:\SoftCache\SoftGrid Client\OSD Cache\edCc4305-3f6C-4dcc-3d70-404eb8bd97d8.osd'. Reason: 

XML parsing failure (rc 00000A25-00000002)

[11/01/2012 08:24:35:869 ???? ERR] {tid=336C:usr=t405230}
corrupt cp file detected ('V:\V1321_BDP\osguard.cp'). osguard cp file, NO CORRECTIVE ACTION TAKEN


[11/01/2012 22:16:39:240 JGSW ERR] {hap=1C82:app=bDP c15 E2AM SS 1.0:tid=3D58}
The Application Virtualization Client could not connect to stream URL 'RTSP://PSWQAPP1:554/V14678993_BDP_C15_E2AM_SS/V14678993_BDP_C15_E2AM_SS.sft' (rc 

1690900A-00002002, original rc 1690900A-00002002).


[11/01/2012 22:16:39:240 SWAP ERR] {hap=1C82:app=bDP c15 E2AM SS 1.0:tid=3D58}
The client was unable to connect to an Application Virtualization Server (rc 1690900A-00002002)


[11/01/2012 22:17:09:163 AMGR ERR] {tid=4F54}
The specified application name (Application Integration) is ambiguous. Some potential matches:
Application Integration 7.0.1756.1756
Application Integration 9.2.2373.2373


[11/01/2012 22:17:09:163 AMGR ERR] {tid=4F54}
The Application Virtualization Client cannot open Application Integration

[11/01/2012 00:03:14:313 SWAP WRN] {tid=507C:usr=N28712}
Could not load OSD file \\PSWQAPP1\Content\D1311_bDP_Adobe_Reader_9.3.3\D1311_bDP_Adobe_Reader 9.3.3.osd


[11/01/2012 00:03:14:313 AMGR INF] {tid=507C:usr=i435145}
The app manager could not create an application from '\\PSWQAPP1\Content\D1311_bDP_Adob_dobe_Reader_9.3.3\D1311_bDP_Adob_b_Adobe Reader 9.3.3.osd' (rc 

0C405664-00000002).


====

[11/01/2012 13:35:16:987 JGSW ERR] {hap=1:app=Abaculus 1.0.0.1:tid=14C8:usr=R3R7DF42}
The Application Virtualization Client could not connect to stream URL 'RTSP:%SFT_SRV

%:554/D1311_bDP_Adob_b_Adobe_Abaculus_15_01/D1311_bDP_Adob_b_Adobe_Abaculus_15_01.sft' (rc 19D02E0A-10000002, original rc 19D02E0A-10000002).


[11/01/2012 13:35:47:998 SWAP ERR] {hap=2:app=AboutPI-SDK 1.3.0.26:tid=1568:usr=I337721}
Could not load app
[11/01/2012 16:53:25:399 SWAP INF] {hap=11A7:app=Microsoft Office Excel 2003_b1 11.0.8324.1:tid=251C:usr=V47234}
Elapsed time for launch: 0.891 seconds

[11/02/2012 10:43:37:527 SWAP INF] {hap=1510:app=Adobe Reader X 10.0.1.434:tid=2AE8:usr=V47234}
App shut down


[11/02/2012 10:44:00:793 SWAP INF] {hap=1511:app=Microsoft Office Word 2003_b1 11.0.8324.1:tid=1D80:usr=V422357235}
Elapsed time for upload: 0.0 seconds


[11/02/2012 10:44:03:809 SWAP INF] {hap=1511:app=Microsoft Office Word 2003_b1 11.0.8324.1:tid=1D80:usr=V422357235}
Elapsed time for launch: 3.172 seconds


[11/02/2012 10:44:15:965 SWAP INF] {hap=1511:app=Microsoft Office Word 2003_b1 11.0.8324.1:tid=1D80:usr=V422357235}
App shut down


[11/02/2012 10:44:20:637 SWAP INF] {hap=1512:app=Microsoft Office Word 2003_b1 11.0.8324.1:tid=3B9C:usr=V47234}
Elapsed time for upload: 0.0 seconds


[11/02/2012 10:44:23:606 SWAP INF] {hap=1512:app=Microsoft Office Word 2003_b1 11.0.8324.1:tid=3B9C:usr=V47234}
Elapsed time for launch: 3.125 seconds


[11/02/2012 10:44:32:481 SWAP INF] {hap=150B:app=Microsoft Office Excel 2003_b1 11.0.8324.1:tid=19C:usr=V47234}
App shut down


[11/02/2012 10:44:38:575 SWAP INF] {hap=1512:app=Microsoft Office Word 2003_b1 11.0.8324.1:tid=3B9C:usr=E831415}
App shut down


[11/02/2012 10:45:00:560 ???? INF] {tid=1650:usr=V47234}
An error occurred while opening the virtual registry (section: 9), rc: 07B01F0C-0000004A


[11/02/2012 10:45:00:576 ???? INF] {tid=1650}
An error occurred while opening the virtual registry (section: 9), rc: 07B01F0C-0000004A
ElapR
The Application Virtualization Client could not connect to stream URL 'RTSP://SRVW23E:554/V1321_BDP_V1_R1_SB/V1321_BDP_C1_P2PM_SS.sft' (rc 1690900A-00002002, 

original rc 1690900A-00002002).


[11/02/2012 00:29:59:843 OSDF ERR] {tid=1464}
The Application Virtualization Client could not parse the OSD file 'C:\SoftCache\SoftGrid Client\OSD Cache\edCc4305-3f6C-4dcc-3d70-404eb8bd97d8.osd'. Reason: 

XML parsing failure (rc 00000A25-00000002)

[11/02/2012 08:24:35:869 ???? ERR] {tid=336C:usr=t405230}
corrupt cp file detected ('V:\V1321_BDP\osguard.cp'). osguard cp file, NO CORRECTIVE ACTION TAKEN


[11/02/2012 22:16:39:240 JGSW ERR] {hap=1C82:app=bDP c15 E2AM SS 1.0:tid=3D58}
The Application Virtualization Client could not connect to stream URL 'RTSP://PSWQAPP1:554/V14678993_BDP_C15_E2AM_SS/V14678993_BDP_C15_E2AM_SS.sft' (rc 

1690900A-00002002, original rc 1690900A-00002002).


[11/02/2012 22:16:39:240 SWAP ERR] {hap=1C82:app=bDP c15 E2AM SS 1.0:tid=3D58}
The client was unable to connect to an Application Virtualization Server (rc 1690900A-00002002)


[11/02/2012 22:17:09:163 AMGR ERR] {tid=4F54}
The specified application name (Application Integration) is ambiguous. Some potential matches:
Application Integration 7.0.1756.1756
Application Integration 9.2.2373.2373


[11/02/2012 22:17:09:163 AMGR ERR] {tid=4F54}
The Application Virtualization Client cannot open Application Integration

[11/02/2012 00:03:14:313 SWAP WRN] {tid=507C:usr=N28712}
Could not load OSD file \\PSWQAPP1\Content\D1311_bDP_Adobe_Reader_9.3.3\D1311_bDP_Adobe_Reader 9.3.3.osd


[11/02/2012 00:03:14:313 AMGR INF] {tid=507C:usr=i435145}
The app manager could not create an application from '\\PSWQAPP1\Content\D1311_bDP_Adob_dobe_Reader_9.3.3\D1311_bDP_Adob_b_Adobe Reader 9.3.3.osd' (rc 

0C405664-00000002).


====
[11/02/2012 13:35:16:987 JGSW ERR] {hap=1:app=Abaculus 1.0.0.1:tid=14C8:usr=R3R7DF42}
The Application Virtualization Client could not connect to stream URL 'RTSP:%SFT_SRV

%:554/D1311_bDP_Adob_b_Adobe_Abaculus_15_01/D1311_bDP_Adob_b_Adobe_Abaculus_15_01.sft' (rc 19D02E0A-10000002, original rc 19D02E0A-10000002).


[11/02/2012 13:35:47:998 SWAP ERR] {hap=2:app=AboutPI-SDK 1.3.0.26:tid=1568:usr=I337721}
Could not load app

スクリプトにロジックを配置して、ログ ファイルから以下のテキストを取得し、コンピューター名とエラー メッセージを含むファイルに出力しようとしています。以下は、「CoreAPP.txt」ファイルの主なエラーです。現在の日付に何か問題が見つかった場合は、手動で修正する必要があります。

このスクリプトの主な目的は、「CoreAPP.txt」ファイルの現在の日付のログ テキストで見つかった場合に、以下のエラーを報告することです。

The Application Virtualization Client could not connect to stream
XML parsing failure (rc 00000A25-00000002)
corrupt cp file detected
The client was unable to connect
Virtualization Client cannot open Application Integration
Could not load OSD file

以下は私のスクリプトです:

option Explicit

dim Fso, InFile, out, strComputer, today, strFilePath, InputFile, strLine

Set Fso = CreateObject("Scripting.FileSystemObject")

Set InFile = fso.OpenTextFile("list.txt", ForReading,False,TriStateTrue)

Set out = fso.CreateTextFile("error.log")

 today = Date()

Const ForReading = 1, ForWriting = 2, ForAppending = 3

const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0

    Do While Not (InFile.AtEndOfStream)
      strComputer = InFile.ReadLine

      Set fso = CreateObject("Scripting.FileSystemObject")
         strFilePath = "\\" & strComputer & "\d$\LOGFILES\"

     Set InputFile = fso.OpenTextFile(strFilePath & "CoreAPP.txt", ForReading,False,TriStateTrue)
      Do While Not (InputFile.AtEndOfStream)
      strLine = InputFile.ReadLine

     if InStr (strLine, today) = 0 Then ' in the log file if text found with today date then it should read from there and look for any of below 6 texts

        If InStr(strLine, "corrupt cp file detected") > 0 Then

        'Kindly help me to integrate below 6 with in this script
                  '1. The Application Virtualization Client could not connect to stream
              '2. XML parsing failure (rc 00000A25-00000002)
              '3. corrupt cp file detected
              '4. The client was unable to connect
              '5. Virtualization Client cannot open Application Integration
              '6. Could not load OSD file

          out.WriteLine strLine & vbTab & strComputer

        End If
      End If

        Loop
      InputFile.close

    Loop

    out.Close
    InFile.Close 

上記のスクリプトは、list.txt ファイルからコンピューター情報を読み取ります。

list.txt のサンプル

Server1
server2
server3

CoreAPP.txt ファイルは、上記の (list.txt) サーバーにあります。パスは D:\ LOGFILES \CoreAPP.txt です。

現在のスクリプトの問題は、スクリプトが現在の日付ではなくファイル全体を探していることです (今日は 2012 年 11 月 2 日ですが、私のスクリプトは 2012 年 11 月 1 日と 2012 年 10 月 31 日もチェックして出力します)。日付チェックに関係なく出力を書き込むスクリプトを意味します。この結果の出力には、過去の日付と現在の日付のテキストが error.log に記録されます。

助けを求めて!!!

4

1 に答える 1

0

[ 10/31/2012 instr08 :24:35:869 ???? エラー]。date()10-31-2012

機能強化:

  1. あなたは適切に日付を記入する必要があります
  2. <> 0 をテストする必要があります

次のような dotnet stringbuilder から日付をキャプチャしてフォーマットすることをお勧めします

today = createobject("System.Text.StringBuilder").AppendFormat("[{0:dd/MM/yyyy} ", Date()).ToString()

これにより、文字列の前にスペースが自動的[に追加されます。これで、instr を正しく使用して、文字列に今日の日付が含まれているかどうかをテストできます。文字列は最初の文字から検出されるため、次のようにテストします。

If InStr (strLine, today) = 1 Then
于 2012-11-02T12:19:58.903 に答える