Powershell mehrer Werte in Text suchen und in CSV oder TXT ausgeben
Ich habe das Problem dass ich aus einem Log das als txt vorliegt mehrere Werte auslesen soll und in einer txt oder csv zu speichern, das ganze soll mit Powersehll verwirklicht werden.
Das "Writung" im Ergebnis unten soll aus der Zeile mit dem Beginn 16 threads.. stammen und die z. B. "8K" aus der nachfolgenden Zeile.
Habe schon einiges getestet aber ohne Erfolg und auch schon ordentlich im Netz gesucht.
Danke schon mal für euere Tipps
Beispiel des Log:
sqlio v1.5.SG
using system counter for latency timings, 1948261 counts per second
parameter file used: gparam.txt
file g:\temp\testfile.dat with 16 threads (0-15) using mask 0x0 (0)
16 threads writing for 60 secs to file g:\temp\testfile.dat
using 8KB random IOs
enabling multiple I/Os per thread with 8 outstanding
using specified size: 5000 MB for file: g:\temp\testfile.dat
initialization done
CUMULATIVE DATA:
throughput metrics:
IOs/sec: 9821.99
MBs/sec: 76.73
latency metrics:
Min_Latency(ms): 0
Avg_Latency(ms): 12
Max_Latency(ms): 203
histogram:
ms: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24+
%: 0 0 1 1 1 2 4 9 13 16 17 12 5 2 2 2 1 1 1 1 1 1 1 1 7
sqlio v1.5.SG
using system counter for latency timings, 1948261 counts per second
parameter file used: gparam.txt
file g:\temp\testfile.dat with 16 threads (0-15) using mask 0x0 (0)
16 threads writing for 60 secs to file g:\temp\testfile.dat
using 64KB random IOs
enabling multiple I/Os per thread with 8 outstanding
using specified size: 5000 MB for file: g:\temp\testfile.dat
initialization done
CUMULATIVE DATA:
throughput metrics:
IOs/sec: 1782.46
MBs/sec: 111.40
latency metrics:
Min_Latency(ms): 2
Avg_Latency(ms): 71
Max_Latency(ms): 4740
histogram:
ms: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24+
%: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 99
sqlio v1.5.SG
using system counter for latency timings, 1948261 counts per second
parameter file used: gparam.txt
file g:\temp\testfile.dat with 16 threads (0-15) using mask 0x0 (0)
16 threads reading for 60 secs from file g:\temp\testfile.dat
using 8KB sequential IOs
enabling multiple I/Os per thread with 8 outstanding
using specified size: 5000 MB for file: g:\temp\testfile.dat
initialization done
CUMULATIVE DATA:
throughput metrics:
IOs/sec: 6912.92
MBs/sec: 54.00
latency metrics:
Min_Latency(ms): 0
Avg_Latency(ms): 18
Max_Latency(ms): 1416
histogram:
ms: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24+
%: 0 0 0 0 0 0 0 2 3 3 9 17 17 14 9 5 3 3 2 1 1 1 1 1 7
Ergbenis solte sein:
writing,8k,IOs/sec,9821.99
writing,8k,MBs/sec,76.73
writing,8k,Min_Latency(ms),0
writing,8k,Avg_Latency(ms),12
writing,8k,Max_Latency(ms),203
writing,64k,IOs/sec,1782.46
writing,64k,MBs/sec,111.40
writing,64k,Min_Latency(ms),2
writing,64k,Avg_Latency(ms),71
writing,64k,Max_Latency(ms),4740
reading,8k,IOs/sec,6912.92
reading,8k,MBs/sec,54.00
reading,8k,Min_Latency(ms),0
reading,8k,Avg_Latency(ms),18
reading,8k,Max_Latency(ms),1416
Das "Writung" im Ergebnis unten soll aus der Zeile mit dem Beginn 16 threads.. stammen und die z. B. "8K" aus der nachfolgenden Zeile.
Habe schon einiges getestet aber ohne Erfolg und auch schon ordentlich im Netz gesucht.
Danke schon mal für euere Tipps
Beispiel des Log:
sqlio v1.5.SG
using system counter for latency timings, 1948261 counts per second
parameter file used: gparam.txt
file g:\temp\testfile.dat with 16 threads (0-15) using mask 0x0 (0)
16 threads writing for 60 secs to file g:\temp\testfile.dat
using 8KB random IOs
enabling multiple I/Os per thread with 8 outstanding
using specified size: 5000 MB for file: g:\temp\testfile.dat
initialization done
CUMULATIVE DATA:
throughput metrics:
IOs/sec: 9821.99
MBs/sec: 76.73
latency metrics:
Min_Latency(ms): 0
Avg_Latency(ms): 12
Max_Latency(ms): 203
histogram:
ms: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24+
%: 0 0 1 1 1 2 4 9 13 16 17 12 5 2 2 2 1 1 1 1 1 1 1 1 7
sqlio v1.5.SG
using system counter for latency timings, 1948261 counts per second
parameter file used: gparam.txt
file g:\temp\testfile.dat with 16 threads (0-15) using mask 0x0 (0)
16 threads writing for 60 secs to file g:\temp\testfile.dat
using 64KB random IOs
enabling multiple I/Os per thread with 8 outstanding
using specified size: 5000 MB for file: g:\temp\testfile.dat
initialization done
CUMULATIVE DATA:
throughput metrics:
IOs/sec: 1782.46
MBs/sec: 111.40
latency metrics:
Min_Latency(ms): 2
Avg_Latency(ms): 71
Max_Latency(ms): 4740
histogram:
ms: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24+
%: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 99
sqlio v1.5.SG
using system counter for latency timings, 1948261 counts per second
parameter file used: gparam.txt
file g:\temp\testfile.dat with 16 threads (0-15) using mask 0x0 (0)
16 threads reading for 60 secs from file g:\temp\testfile.dat
using 8KB sequential IOs
enabling multiple I/Os per thread with 8 outstanding
using specified size: 5000 MB for file: g:\temp\testfile.dat
initialization done
CUMULATIVE DATA:
throughput metrics:
IOs/sec: 6912.92
MBs/sec: 54.00
latency metrics:
Min_Latency(ms): 0
Avg_Latency(ms): 18
Max_Latency(ms): 1416
histogram:
ms: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24+
%: 0 0 0 0 0 0 0 2 3 3 9 17 17 14 9 5 3 3 2 1 1 1 1 1 7
Ergbenis solte sein:
writing,8k,IOs/sec,9821.99
writing,8k,MBs/sec,76.73
writing,8k,Min_Latency(ms),0
writing,8k,Avg_Latency(ms),12
writing,8k,Max_Latency(ms),203
writing,64k,IOs/sec,1782.46
writing,64k,MBs/sec,111.40
writing,64k,Min_Latency(ms),2
writing,64k,Avg_Latency(ms),71
writing,64k,Max_Latency(ms),4740
reading,8k,IOs/sec,6912.92
reading,8k,MBs/sec,54.00
reading,8k,Min_Latency(ms),0
reading,8k,Avg_Latency(ms),18
reading,8k,Max_Latency(ms),1416
Bitte markiere auch die Kommentare, die zur Lösung des Beitrags beigetragen haben
Content-ID: 190611
Url: https://administrator.de/contentid/190611
Ausgedruckt am: 15.11.2024 um 11:11 Uhr
1 Kommentar