[OpenAFS] Tracing VLDB queries

Jeffrey Altman jaltman@auristor.com
Mon, 3 Dec 2018 09:51:02 -0500


This is a cryptographically signed message in MIME format.

--------------ms010405030900010000030003
Content-Type: multipart/mixed;
 boundary="------------C9839D9FE4B57BCF8536EB5B"
Content-Language: en-US

This is a multi-part message in MIME format.
--------------C9839D9FE4B57BCF8536EB5B
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 12/3/2018 6:56 AM, Robert Milkowski wrote:
> Hi,
>=20
> =C2=A0
>=20
> Just a teaser:
>=20
> =C2=A0
>=20
> # dtrace -q -n vlserver*:::*GetEntry-done*=C2=A0\
>=20
> =C2=A0=C2=A0 '{printf("%Y client: %s volname: %s rc: %s\n", walltimesta=
mp, \
>=20
> =C2=A0=C2=A0=C2=A0=C2=A0 args[1]->ci_remote, args[3]->volname, afs_erro=
rstr[args[0]]);}'
>=20
> =C2=A0
>=20
> 2018 Nov 19 15:55:15 client: 10.170.57.130 volname: zz.vldb.13 rc: OK
>=20
> 2018 Nov 19 15:55:28 client: 10.170.57.130 volname: ms.dist rc: OK
>=20
> 2018 Nov 19 15:55:57 client: 10.170.57.130 volname: ms.distXX rc: VL_NO=
ENT
>=20
> ...
>=20
> =C2=A0
>=20
> This is a probe provided by vlserver directly. Obviously one can achiev=
e
> the same by using PID provider, but it gets more complicated and does
> require understanding of the code and is more involved.
>=20
> This works on Solaris and should work on FreeBSD as well. It shouldn=E2=
=80=99t
> be hard to get it working with SystemTAP on Linux either (although look=
s
> like Linux will be going with ebpf in the future).

Hi Robert,

Once trace points are added tracing can be used to answer all sorts of
questions.  The specific output from your example is very similar to the
data that is collected by the baked in audit infrastructure.   The
following is output from AuriStorFS vlserver:

Mon Dec 03 06:25:30 2018 [71] EVENT AFS_VL_GetEntByN CODE 363524 NAME
--UnAuth-- HOST [204.29.154.74]:7001 STR symbols

Mon Dec 03 06:35:08 2018 [71] EVENT AFS_VL_GetEntByN CODE 0 NAME
--UnAuth-- HOST [204.29.154.72]:7001 STR 536872388

Mon Dec 03 06:35:10 2018 [71] EVENT AFS_VL_GetEntByN CODE 0 NAME
--UnAuth-- HOST [204.29.154.72]:7001 STR 536872388

Mon Dec 03 06:36:05 2018 [71] EVENT AFS_VL_GetEntByN CODE 0 NAME
--UnAuth-- HOST [2604:2000:1741:a019:6d77:8346:dab0:49c0]:7001 STR root.c=
ell

Mon Dec 03 06:36:05 2018 [71] EVENT AFS_VL_GetEntByN CODE 0 NAME
--UnAuth-- HOST [2604:2000:1741:a019:6d77:8346:dab0:49c0]:7001 STR
root.public

In OpenAFS the audit infrastructure can be enabled per-service and its
output can be set to files, named pipes, syslog, Linux message queues
and on AIX its integrated with the OS auditing system.

Jeffrey Altman


--------------C9839D9FE4B57BCF8536EB5B
Content-Type: text/x-vcard; charset=utf-8;
 name="jaltman.vcf"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
 filename="jaltman.vcf"

begin:vcard
fn:Jeffrey Altman
n:Altman;Jeffrey
org:AuriStor, Inc.
adr:Suite 6B;;255 West 94Th Street;New York;New York;10025-6985;United St=
ates
email;internet:jaltman@auristor.com
title:Founder and CEO
tel;work:+1-212-769-9018
note;quoted-printable:LinkedIn: https://www.linkedin.com/in/jeffreyaltman=
=3D0D=3D0A=3D
	Skype: jeffrey.e.altman=3D0D=3D0A=3D
=09
url:https://www.auristor.com/
version:2.1
end:vcard


--------------C9839D9FE4B57BCF8536EB5B--

--------------ms010405030900010000030003
Content-Type: application/pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCC
DGswggXSMIIEuqADAgECAhBAAWbTGehnfUuu91hYwM5DMA0GCSqGSIb3DQEBCwUAMDoxCzAJ
BgNVBAYTAlVTMRIwEAYDVQQKEwlJZGVuVHJ1c3QxFzAVBgNV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