This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: problem when run tcp/udp probing script


ch huang <justlooks@gmail.com> writes:

> [...]
> probe tcp.recvmsg {
> printf("%s: TCP: Receiving message. Socket %d. Size %d\n", execname(),
> sock, size)
> }
> [...]
> but why the value of socket is negative?
>
> mysqld: TCP: Receiving message. Socket -131937697852800. Size 4
> mysqld: TCP: Receiving message. Socket -131937398508736. Size 16384
> mysqld: TCP: Receiving message. Socket -131938374336384. Size 1
> mysqld: TCP: Receiving message. Socket -131937398508736. Size 16384

Because sock is a pointer to a kernel structure.  If you print it as
%p, you'll see them as pretty reasonable values 0xffff8800b410c080
etc.

- FChE


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]