summaryrefslogtreecommitdiffstats
path: root/tests/002/query-1.txr
blob: fd4db03b6e8a17c1807858a233052a7af55a289f (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
@#
@# This file is in the public domain.
@# It was authored by Kaz Kylheku <kkylheku@gmail.com> in 2009
@#
@(next)!ls @TESTDIR/proc | sort -n
@(collect)
@{process /[0-9]+/}
@  (next)@TESTDIR/proc/@process/status
Name:   @name
State:  @state (@state_desc)
SleepAVG:       @sleep_avg%
Tgid:   @tgid
Pid:    @proc_id
PPid:   @parent_id
@(bind pid proc_id)
@(bind ppid parent_id)
@(skip)
Uid:    @uid    @/.*/
Gid:    @gid    @/.*/
@  (next)$@TESTDIR/proc/@process/task
@  (collect)
@thr
@  (end)
@  (bind thread thr)
@  (some)
@    (next)@TESTDIR/etc/passwd
@    (skip)
@user:@pw:@uid:@/.*/
@  (and)
@    (bind user uid)
@  (end)
@(end)
@(output)
USER       PID  PPID S NAME             THREADS
@  (repeat)
@{user 8} @{proc_id -5} @{parent_id -5} @state @{name 16} @(rep)@thr, @(first)@(last)@thr@(single)-@(end)
@  (end)
@(end)