Discussion:
[Bitpim-devel] Portmon2analyser broken?
Brendan Shanks
2004-07-28 21:13:14 UTC
Permalink
I am trying to use the portmon2analyser script on some log files, but it
doesn't work. When I run it, this happens:

***@opustoo experiments $ python portmon2analyser.py
/home/pip/Nokia_Portmon.log
Traceback (most recent call last):
File "portmon2analyser.py", line 105, in ?
line[0]=float(line[0]) # turn time into float
IndexError: list index out of range

With Nokia_Portmon.log looking like this:
[\\OPUSTOO-XP]
0 0.00000000 LMMPC.exe IRP_MJ_CREATE Serial2 Options: Open
0 0.36083888 SUCCESS
1 0.00000000 LMMPC.exe IOCTL_SERIAL_SET_WAIT_MASK Serial2 Mask:
1 0.00034865 SUCCESS
...

This happens on both Mac OS X Panther and Gentoo with the latest
unmasked python.
I am hoping to try implementing support for my Nokia 3589i for BitPim,
but it seems like a big task. The phone currently has no functionality
in BitPim, since it doesn't support any of the Brew filesystem (it just
gets confused at the AT commands),

Brendan
Roger Binns
2004-07-28 21:53:27 UTC
Permalink
Post by Brendan Shanks
I am trying to use the portmon2analyser script on some log files, but it
[\\OPUSTOO-XP]
0 0.00000000 LMMPC.exe IRP_MJ_CREATE Serial2 Options: Open
0 0.36083888 SUCCESS
1 0.00034865 SUCCESS
You have the wrong format for the log files. They should have the
results on the same line like this. It has probably been badly
mangled by my mailer. The important thing to note is that the
result code is on the same line as the request. I think you get
this by doing "Save" from portmon rather than log to file.

Also note that you are most likely to want to specify the -ms
options to portmon2analyser.

(I did briefly look into modifying portmon2analyser to cope with
this format, but it was too difficult as the lines are sometimes
out of sync, there isn't always a result code, some error codes
are indistinguishable from requests etc)

0 0.00208015 PCSync.exe IRP_MJ_CREATE cur_mdm1 SUCCESS Options: Open
1 0.00000447 PCSync.exe IRP_MJ_CLEANUP cur_mdm1 SUCCESS
2 0.05495168 PCSync.exe IRP_MJ_CLOSE cur_mdm1 SUCCESS
3 0.00145130 PCSync.exe IRP_MJ_CREATE cur_mdm1 SUCCESS Options: Open
4 0.00000363 PCSync.exe IOCTL_SERIAL_SET_TIMEOUTS cur_mdm1 SUCCESS RI:-1 RM:0 RC:1000 WM:0 WC:1000
5 0.00000419 PCSync.exe IOCTL_SERIAL_SET_WAIT_MASK cur_mdm1 SUCCESS Mask: RXCHAR CTS
6 0.00000223 PCSync.exe IOCTL_SERIAL_GET_BAUD_RATE cur_mdm1 SUCCESS
7 0.00000168 PCSync.exe IOCTL_SERIAL_GET_LINE_CONTROL cur_mdm1 SUCCESS
8 0.00000196 PCSync.exe IOCTL_SERIAL_GET_CHARS cur_mdm1 SUCCESS
9 0.00000168 PCSync.exe IOCTL_SERIAL_GET_HANDFLOW cur_mdm1 SUCCESS
10 0.00000251 PCSync.exe IOCTL_SERIAL_GET_BAUD_RATE cur_mdm1 SUCCESS
11 0.00000196 PCSync.exe IOCTL_SERIAL_GET_LINE_CONTROL cur_mdm1 SUCCESS
12 0.00000168 PCSync.exe IOCTL_SERIAL_GET_CHARS cur_mdm1 SUCCESS
13 0.00000168 PCSync.exe IOCTL_SERIAL_GET_HANDFLOW cur_mdm1 SUCCESS
14 0.00086715 PCSync.exe IOCTL_SERIAL_SET_BAUD_RATE cur_mdm1 SUCCESS Rate: 115200
15 0.00092107 PCSync.exe IOCTL_SERIAL_SET_RTS cur_mdm1 SUCCESS
16 0.00096996 PCSync.exe IOCTL_SERIAL_SET_DTR cur_mdm1 SUCCESS
17 0.00095962 PCSync.exe IOCTL_SERIAL_SET_LINE_CONTROL cur_mdm1 SUCCESS StopBits: 1 Parity: NONE WordLength: 8
18 0.00000335 PCSync.exe IOCTL_SERIAL_SET_CHAR cur_mdm1 SUCCESS EOF:0 ERR:0 BRK:0 EVT:0 XON:11 XOFF:13
19 0.00095655 PCSync.exe IOCTL_SERIAL_SET_HANDFLOW cur_mdm1 SUCCESS Shake:1 Replace:40 XonLimit:28672 XoffLimit:7168
20 0.00000251 PCSync.exe IOCTL_SERIAL_SET_QUEUE_SIZE cur_mdm1 SUCCESS InSize: 4096 OutSize: 4096
21 0.00000391 PCSync.exe IOCTL_SERIAL_PURGE cur_mdm1 SUCCESS Purge: TXABORT RXABORT TXCLEAR RXCLEAR
22 0.00000335 PCSync.exe IOCTL_SERIAL_PURGE cur_mdm1 SUCCESS Purge: TXABORT RXABORT TXCLEAR RXCLEAR
23 0.00075261 PCSync.exe IRP_MJ_WRITE cur_mdm1 SUCCESS Length 25: 41 54 24 51 43 44 4D 52 3D 31 31 35 32 30 30 3B 41 54 24 51 43 44
4D 47 0D
24 0.00001844 PCSync.exe IOCTL_SERIAL_PURGE cur_mdm1 SUCCESS Purge: TXABORT RXABORT TXCLEAR RXCLEAR

Roger

Loading...