[OpenAFS] Tracing VLDB queries

Robert Milkowski milek@wp.pl
Mon, 3 Dec 2018 11:56:23 -0000


This is a multipart message in MIME format.

------=_NextPart_000_0C18_01D48AFF.3707D220
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi,

 

Just a teaser:

 

# dtrace -q -n vlserver*:::GetEntry-done \

   '{printf("%Y client: %s volname: %s rc: %s\n", walltimestamp, \

     args[1]->ci_remote, args[3]->volname, afs_errorstr[args[0]]);}'

 

2018 Nov 19 15:55:15 client: 10.170.57.130 volname: zz.vldb.13 rc: OK

2018 Nov 19 15:55:28 client: 10.170.57.130 volname: ms.dist rc: OK

2018 Nov 19 15:55:57 client: 10.170.57.130 volname: ms.distXX rc: VL_NOENT

...

 

This is a probe provided by vlserver directly. Obviously one can achieve the
same by using PID provider, but it gets more complicated and does require
understanding of the code and is more involved.

This works on Solaris and should work on FreeBSD as well. It shouldn't be
hard to get it working with SystemTAP on Linux either (although looks like
Linux will be going with ebpf in the future).

 

 

 

 

Best regards,

Robert Milkowski


------=_NextPart_000_0C18_01D48AFF.3707D220
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><META =
HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii"><meta name=3DGenerator content=3D"Microsoft Word 15 =
(filtered medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:karlaregular;}
@font-face
	{font-family:inherit;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;
	mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:#0563C1;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:#954F72;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri",sans-serif;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri",sans-serif;
	mso-fareast-language:EN-US;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-GB =
link=3D"#0563C1" vlink=3D"#954F72"><div class=3DWordSection1><p =
class=3DMsoNormal>Hi,<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>Just a =
teaser:<o:p></o:p></p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p =
style=3D'mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin=
-left:36.0pt;margin-bottom:.0001pt;background:white;vertical-align:baseli=
ne'><span style=3D'font-size:13.5pt;font-family:"Courier =
New";color:#666666;letter-spacing:-.2pt;border:none windowtext =
1.0pt;padding:0cm'># dtrace -q -n vlserver*:::</span><strong><span =
style=3D'font-size:13.5pt;font-family:inherit;color:#666666;letter-spacin=
g:-.2pt;border:none windowtext =
1.0pt;padding:0cm'>GetEntry-done</span></strong><span =
style=3D'font-size:13.5pt;font-family:"Courier =
New";color:#666666;letter-spacing:-.2pt;border:none windowtext =
1.0pt;padding:0cm'>&nbsp;\</span><span =
style=3D'font-size:13.5pt;font-family:karlaregular;color:#666666;letter-s=
pacing:-.2pt'><o:p></o:p></span></p><p =
style=3D'mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin=
-left:36.0pt;margin-bottom:.0001pt;background:white;vertical-align:baseli=
ne;font-variant-ligatures: normal;font-variant-caps: normal;orphans: =
2;text-align:start;widows: 2;-webkit-text-stroke-width: =
0px;text-decoration-style: initial;text-decoration-color: =
initial;word-spacing:0px'><span =
style=3D'font-size:13.5pt;font-family:"Courier =
New";color:#666666;letter-spacing:-.2pt;border:none windowtext =
1.0pt;padding:0cm'>&nbsp;&nbsp; '{printf(&quot;%Y client: %s volname: %s =
rc: %s\n&quot;, walltimestamp, \</span><span =
style=3D'font-size:13.5pt;font-family:karlaregular;color:#666666;letter-s=
pacing:-.2pt'><o:p></o:p></span></p><p =
style=3D'mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin=
-left:36.0pt;margin-bottom:.0001pt;background:white;vertical-align:baseli=
ne;font-variant-ligatures: normal;font-variant-caps: normal;orphans: =
2;text-align:start;widows: 2;-webkit-text-stroke-width: =
0px;text-decoration-style: initial;text-decoration-color: =
initial;word-spacing:0px'><span =
style=3D'font-size:13.5pt;font-family:"Courier =
New";color:#666666;letter-spacing:-.2pt;border:none windowtext =
1.0pt;padding:0cm'>&nbsp;&nbsp;&nbsp;&nbsp; args[1]-&gt;ci_remote, =
args[3]-&gt;volname, afs_errorstr[args[0]]);}'</span><span =
style=3D'font-size:13.5pt;font-family:karlaregular;color:#666666;letter-s=
pacing:-.2pt'><o:p></o:p></span></p><p =
style=3D'mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin=
-left:36.0pt;margin-bottom:.0001pt;background:white;vertical-align:baseli=
ne;font-variant-ligatures: normal;font-variant-caps: normal;orphans: =
2;text-align:start;widows: 2;-webkit-text-stroke-width: =
0px;text-decoration-style: initial;text-decoration-color: =
initial;min-height: 8pt;word-spacing:0px'><span =
style=3D'font-size:13.5pt;font-family:karlaregular;color:#666666;letter-s=
pacing:-.2pt'>&nbsp;<o:p></o:p></span></p><p =
style=3D'mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin=
-left:36.0pt;margin-bottom:.0001pt;background:white;vertical-align:baseli=
ne;font-variant-ligatures: normal;font-variant-caps: normal;orphans: =
2;text-align:start;widows: 2;-webkit-text-stroke-width: =
0px;text-decoration-style: initial;text-decoration-color: =
initial;word-spacing:0px'><span =
style=3D'font-size:13.5pt;font-family:"Courier =
New";color:#666666;letter-spacing:-.2pt;border:none windowtext =
1.0pt;padding:0cm'>2018 Nov 19 15:55:15 client: 10.170.57.130 volname: =
zz.vldb.13 rc: OK</span><span =
style=3D'font-size:13.5pt;font-family:karlaregular;color:#666666;letter-s=
pacing:-.2pt'><o:p></o:p></span></p><p =
style=3D'mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin=
-left:36.0pt;margin-bottom:.0001pt;background:white;vertical-align:baseli=
ne;font-variant-ligatures: normal;font-variant-caps: normal;orphans: =
2;text-align:start;widows: 2;-webkit-text-stroke-width: =
0px;text-decoration-style: initial;text-decoration-color: =
initial;word-spacing:0px'><span =
style=3D'font-size:13.5pt;font-family:"Courier =
New";color:#666666;letter-spacing:-.2pt;border:none windowtext =
1.0pt;padding:0cm'>2018 Nov 19 15:55:28 client: 10.170.57.130 volname: =
ms.dist rc: OK</span><span =
style=3D'font-size:13.5pt;font-family:karlaregular;color:#666666;letter-s=
pacing:-.2pt'><o:p></o:p></span></p><p =
style=3D'mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin=
-left:36.0pt;margin-bottom:.0001pt;background:white;vertical-align:baseli=
ne;font-variant-ligatures: normal;font-variant-caps: normal;orphans: =
2;text-align:start;widows: 2;-webkit-text-stroke-width: =
0px;text-decoration-style: initial;text-decoration-color: =
initial;word-spacing:0px'><span =
style=3D'font-size:13.5pt;font-family:"Courier =
New";color:#666666;letter-spacing:-.2pt;border:none windowtext =
1.0pt;padding:0cm'>2018 Nov 19 15:55:57 client: 10.170.57.130 volname: =
ms.distXX rc: VL_NOENT</span><span =
style=3D'font-size:13.5pt;font-family:karlaregular;color:#666666;letter-s=
pacing:-.2pt'><o:p></o:p></span></p><p =
style=3D'mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin=
-left:36.0pt;margin-bottom:.0001pt;background:white;vertical-align:baseli=
ne;font-variant-ligatures: normal;font-variant-caps: normal;orphans: =
2;text-align:start;widows: 2;-webkit-text-stroke-width: =
0px;text-decoration-style: initial;text-decoration-color: =
initial;word-spacing:0px'><span =
style=3D'font-size:13.5pt;font-family:karlaregular;color:#666666;letter-s=
pacing:-.2pt'>...<o:p></o:p></span></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>This is a =
probe provided by vlserver directly. Obviously one can achieve the same =
by using PID provider, but it gets more complicated and does require =
understanding of the code and is more involved.<o:p></o:p></p><p =
class=3DMsoNormal>This works on Solaris and should work on FreeBSD as =
well. It shouldn&#8217;t be hard to get it working with SystemTAP on =
Linux either (although looks like Linux will be going with ebpf in the =
future).<o:p></o:p></p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>Best =
regards,<o:p></o:p></p><p class=3DMsoNormal> Robert =
Milkowski<o:p></o:p></p></div></body></html>
------=_NextPart_000_0C18_01D48AFF.3707D220--