1Net::OpenSSH::OSTracer(U3s)er Contributed Perl DocumentatNieotn::OpenSSH::OSTracer(3)
2
3
4

NAME

6       Net::OpenSSH::OSTracer - trace ssh master process at the OS level
7

SYNOPSIS

9           use Net::OpenSSH;
10           $Net::OpenSSH::debug |= 512;
11
12           Net::OpenSSH->new($host)->system("echo hello world");
13
14           system "less /tmp/net_openssh_master.*.strace";
15

DESCRIPTION

17       This is a Net::OpenSSH helper module that allows you to trace the
18       master "ssh" process at the operating system level using the proper
19       utility available in your system (e.g., "strace", "truss", "ktruss",
20       "tusc", etc.).
21
22       This feature can be used when debugging your programs or to report bugs
23       on the module.
24
25       It is enabled setting the flag 512 on the $Net::OpenSSH::debug
26       variable:
27
28         $Net::OpenSSH::debug |= 512;
29
30       By default the output files of the tracer are saved as
31       "/tmp/net_openssh_master.$pid.$tracer_type".
32
33       Also, the output send by the tracer to stdout/stderr is saved as
34       "/tmp/net_openssh_master.$pid.txt".
35
36       The module can be configured through the following global variables:
37
38       $Net::OpenSSH::OSTracer::type
39           By default, the module decides which tracer to use in base to the
40           operating system name. This variable allows one to select a
41           different tracer.
42
43           Currently accepted types are: "strace" (Linux), "ktrace" (*BSD),
44           "tusc" (HP-UX) and "truss" (Solaris and AIX).
45
46       $Net::OpenSSH::OSTracer::cmd
47           Command to execute for tracing the "ssh" process.
48
49           By default, it infers it from the tracer type selected.
50
51       $Net::OpenSSH::OSTracer::output
52           Basename for the destination file. The PID of the "ssh" process and
53           the tracer type will be appended.
54
55       $Net::OpenSSH::OSTracer::sudo
56           This variable can be used to request the tracer to be run with
57           "sudo" (some operating systems as for example Ubuntu, do not allow
58           one to attach tracers, even to your own processes, unless you do it
59           as root).
60
61           The variable has to be set with the path of the "sudo" binary. For
62           instance:
63
64             $Net::OpenSSH::OSTracer::sudo = '/usr/bin/sudo';
65
66           If you need to pass a password to "sudo", set the environment
67           variable "SUDO_ASKPASS". For instance:
68
69             SUDO_ASKPASS=/usr/bin/ssh-askpass
70
71       $Net::OpenSSH::OSTracer::delay
72           This variable can be used to delay the "ssh" execution so that the
73           tracer can attach the process first. This is specially handy when
74           using "sudo" with a password.
75

BUGS

77       This module has not been tested under all the operating systems is says
78       to support.
79
80       If you find any problem, just report it, please!
81
83       Copyright (C) 2012 by Salvador FandiƱo (sfandino@yahoo.com)
84
85       This library is free software; you can redistribute it and/or modify it
86       under the same terms as Perl itself, either Perl version 5.10.0 or, at
87       your option, any later version of Perl 5 you may have available.
88
89
90
91perl v5.36.0                      2023-01-20         Net::OpenSSH::OSTracer(3)
Impressum