summaryrefslogtreecommitdiffstats
path: root/cddl/contrib/dtracetoolkit/Examples/shellsnoop_example.txt
blob: be307f80f63e874af5588b9621f17490b49c2f3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
shellsnoop captures the text input and output from shells running on the 
system. In the following example shellsnoop was run in one window, while
in another several commands were run: date, cal, uname -a, uptime and find.
shellsnoop has successfully captured the text that was displayed on the
other window.


# shellsnoop
  PID  PPID      CMD DIR  TEXT
 4724  3762      ksh   R
 4724  3762      ksh   W  date

 4741  4724     date   W  Sun Mar 28 23:10:06 EST 2004
 4724  3762      ksh   R
 4724  3762      ksh   W  jupiter:/etc/init.d>
 4724  3762      ksh   R
 4724  3762      ksh   R
 4724  3762      ksh   W  cal

 4742  4724      cal   W     March 2004
 4742  4724      cal   W   S  M Tu  W Th  F  S
 4742  4724      cal   W      1  2  3  4  5  6
 4742  4724      cal   W   7  8  9 10 11 12 13
 4742  4724      cal   W  14 15 16 17 18 19 20
 4742  4724      cal   W  21 22 23 24 25 26 27
 4742  4724      cal   W  28 29 30 31
 4742  4724      cal   W
 4724  3762      ksh   R
 4724  3762      ksh   W  jupiter:/etc/init.d>
 4724  3762      ksh   R
 4724  3762      ksh   R
 4724  3762      ksh   W  uname -a

 4743  4724    uname   W  SunOS jupiter 5.10 s10_51 i86pc i386 i86pc
 4724  3762      ksh   R
 4724  3762      ksh   W  jupiter:/etc/init.d>
 4724  3762      ksh   R
 4724  3762      ksh   R
 4724  3762      ksh   W  uptime

 4744  4724   uptime   W   11:10pm  up 4 day(s), 11:15,  4 users,  load average: 0.05, 0.02, 0.02
 4724  3762      ksh   R
 4724  3762      ksh   W  jupiter:/etc/init.d>
 4724  3762      ksh   R
 4724  3762      ksh   R
 4724  3762      ksh   R
 4724  3762      ksh   W  jupiter:/etc/init.d>
 4724  3762      ksh   R
 4724  3762      ksh   R
 4724  3762      ksh   W  ls -l d*

 4745  4724       ls   W  -rwxr--r--   3 root     sys         1292 Jan 14 16:24 devfsadm
 4745  4724       ls   W  -rwxr--r--   1 root     sys          904 Jan 14 16:24 devlinks
 4745  4724       ls   W  -rwxr--r--   6 root     sys          621 Jan 14 16:17 dhcp
 4745  4724       ls   W  -rwxr--r--   2 root     sys          494 Jan 14 16:17 dhcpagent
 4745  4724       ls   W  -rwxr--r--   5 root     sys         1050 Jan 16  2002 directory
 4745  4724       ls   W  -rwxr--r--   2 root     sys          779 Jan 14 16:17 domainname
 4745  4724       ls   W  -rwxr--r--   1 root     sys          469 Jan 14 16:24 drvconfig
 4745  4724       ls   W  -r-xr-xr-x   4 root     other       2804 Mar 27 13:37 dtlogin
 4724  3762      ksh   R
 4724  3762      ksh   W  jupiter:/etc/init.d>
 4724  3762      ksh   R
 4724  3762      ksh   R
 4724  3762      ksh   W  find /etc/default

 4746  4724     find   W  /etc/default
 4746  4724     find   W  /etc/default/cron
 4746  4724     find   W  /etc/default/devfsadm
 4746  4724     find   W  /etc/default/dhcpagent
 4746  4724     find   W  /etc/default/fs
 4746  4724     find   W  /etc/default/inetd
 4746  4724     find   W  /etc/default/inetinit
 4746  4724     find   W  /etc/default/kbd
 4746  4724     find   W  /etc/default/keyserv
 4746  4724     find   W  /etc/default/ipsec
 4746  4724     find   W  /etc/default/nss
 4746  4724     find   W  /etc/default/passwd
 4746  4724     find   W  /etc/default/syslogd
 4746  4724     find   W  /etc/default/tar
 4746  4724     find   W  /etc/default/utmpd
 4746  4724     find   W  /etc/default/init
 4746  4724     find   W  /etc/default/login
 4746  4724     find   W  /etc/default/su
 4746  4724     find   W  /etc/default/power
 4746  4724     find   W  /etc/default/sys-suspend
 4746  4724     find   W  /etc/default/rpc.nisd
 4746  4724     find   W  /etc/default/nfs
[...]



shellsnoop has a "-q" option for running in "quiet" mode - the previous 
columns are not printed, so only shell output is seen,

   # shellsnoop -q
   # date
   Wed Nov 30 16:19:48 EST 2005
   #
   # cal
      November 2005
    S  M Tu  W Th  F  S
          1  2  3  4  5
    6  7  8  9 10 11 12
   13 14 15 16 17 18 19
   20 21 22 23 24 25 26
   27 28 29 30
   
   #

The output appears somewhat boring, this is something you need to see
in realtime.

OpenPOWER on IntegriCloud