You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Leif Hedstrom (JIRA)" <ji...@apache.org> on 2014/12/19 15:44:14 UTC
[jira] [Commented] (TS-3250) mgmtapisocket
[ https://issues.apache.org/jira/browse/TS-3250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14253478#comment-14253478 ]
Leif Hedstrom commented on TS-3250:
-----------------------------------
[~jpeach@apache.org] Is this related to the mgmt marshaling changes that were made ? Should we close as "expected" or "won't fix" ?
> mgmtapisocket
> -------------
>
> Key: TS-3250
> URL: https://issues.apache.org/jira/browse/TS-3250
> Project: Traffic Server
> Issue Type: Bug
> Components: Management API
> Affects Versions: 5.1.2
> Reporter: daemon
>
> This is my python code
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> import struct
> import socket
> query = 'proxy.process.cache.read.success'
> msg = struct.pack('h', 3)
> msg += struct.pack('i', len(query))
> msg += query
> s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
> s.connect("/opt/ats/var/trafficserver/mgmtapisocket")
> s.send(msg)
> data = s.recv(1024)
> s.close()
> # raw data
> print 'Received', repr(data)
> if data:
> offset = 0
> ret_stat, op_t = struct.unpack_from('hi', data, offset)
> offset += 2 + 4 + 2
> int_0, int_1 = struct.unpack_from('ii', data, offset)
> offset += 4 * 2
> msglen, = struct.unpack_from('i', data, offset)
> offset += 4
> msg = data[offset:msglen]
> offset += msglen
> dlen, = struct.unpack_from('i', data, offset)
> offset += 4
> d = data[offset:dlen]
> print ret_stat, op_t, int_0, int_1, msglen, msg, dlen, d
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Received '\x00\x00\x08\x00\x00\x00 \x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00proxy.process.cache.read.success'
> ##############################################################
> What this data format , how do I solve the binary package, please help me
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)