Project

General

Profile

Actions

Feature #852

closed

babeltrace python bindings do not make visible the "hostname" field

Added by craig harmer over 9 years ago. Updated about 4 years ago.

Status:
Invalid
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
10/29/2014
Due date:
% Done:

0%

Estimated time:

Description

I'm using babeltrace 1.2.2.

The python bindings for babeltrace do not make the "hostname" field available, even though its present in the trace file.

Here is the first event in the tracefile as printed by babeltrace:

[17:09:08.849944204] (+?.?????????) ch3 pcs_paxosclient:sync_publish_entry: { cpu_id = 6 }, { vpid = 12882, vtid = 12882, procname = "md_test", pthread_id = 139715261524352 }, { }

I wrote a python script that gets all the fields in each scope and prints the contents of each field. It also prints event.get("hostname") directly for good measure. The output for the first event looks like:

[1414541348849944204]: pcs_paxosclient:sync_publish_entry:
hostname is: None
scope 3 field 'vpid' <type 'long'>: '12882'
field 'vtid' <type 'long'>: '12882'
field 'procname' <type 'str'>: 'md_test'
field 'pthread_id' <type 'long'>: '139715261524352'
scope 2 field 'id' <type 'str'>: 'extended'
field 'v' <type 'dict'>: '{'timestamp': 15985732118075L, 'id': 169L}'
scope 1 field 'timestamp_begin' <type 'long'>: '15985672518003'
field 'timestamp_end' <type 'long'>: '16011668489057'
field 'content_size' <type 'long'>: '8388272'
field 'packet_size' <type 'long'>: '8388608'
field 'events_discarded' <type 'long'>: '0'
field 'cpu_id' <type 'long'>: '6'
scope 0 field 'magic' <type 'long'>: '3254525889'
field 'uuid' <type 'list'>: '[76L, 42L, 65L, 101L, 66L, 68L, 79L, 161L, 179L, 59L, 78L, 234L, 84L, 76L, 22L, 68L]'


Files

viewtrace (3.02 KB) viewtrace script to pretty-print a trace (under development) craig harmer, 10/29/2014 08:59 PM
Actions

Also available in: Atom PDF