|
1 #compdef ps |
|
2 |
|
3 _ps() |
|
4 { |
|
5 local -a o_opt |
|
6 |
|
7 o_opt=( |
|
8 "user[user ID]" |
|
9 "ruser[real user ID]" |
|
10 "group[group ID]" |
|
11 "rgroup[real group ID]" |
|
12 "pid[process ID]" |
|
13 "ppid[parent process ID]" |
|
14 "pgid[process group ID]" |
|
15 "pcpu[ratio of CPU time used recently to CPU time available]" |
|
16 "vsz[total size of the process in virtual memory, in kilobytes]" |
|
17 "nice[decimal value of the system scheduling priority of the process]" |
|
18 "etime[elapsed time since the process was started]" |
|
19 "time[cumulative CPU time of the process]" |
|
20 "tty[name of the controlling terminal of the process]" |
|
21 "comm[name of the command being executed]" |
|
22 "args[command with all its arguments as a string]" |
|
23 "f[flags associated with the process]" |
|
24 "s[state of the process]" |
|
25 "c[processor utilization for scheduling]" |
|
26 "uid[effective user ID number]" |
|
27 "ruid[real user ID number]" |
|
28 "gid[effective group ID number]" |
|
29 "rgid[real group ID numberu]" |
|
30 "projid[project ID number]" |
|
31 "project[project name]" |
|
32 "zoneid[zone ID number]" |
|
33 "zone[zone name]" |
|
34 "sid[process ID of the session leader]" |
|
35 "taskid[task ID of the process]" |
|
36 "class[scheduling class]" |
|
37 "pri[priority, higher number - higher priority]" |
|
38 "opri[obsolete priority, lower number - higher priority]" |
|
39 "lwp[lwd ID number]" |
|
40 "nlwp[number of lwps in the process]" |
|
41 "psr[number of the processor to which the process or lwp is bound]" |
|
42 "pset[ID of the processor set to which the process or lwp is bound]" |
|
43 "addr[memory address of the process]" |
|
44 "osz[total size of the process in virtual memory, in pages]" |
|
45 "wchan[address of an event for which the process is sleeping]" |
|
46 "stime[starting time or date of the process]" |
|
47 "rss[resident set size of the process, in kilobytes]" |
|
48 "pmem[ratio of resident set size to physical memory on the machine, in %]" |
|
49 "fname[first 8 bytes of base name of process's executable file]" |
|
50 "ctid[contract ID number]" |
|
51 "lgrp[home lgroup]" |
|
52 ) |
|
53 _arguments \ |
|
54 '-a[information about all processes most frequently requested]' \ |
|
55 '-c[information in a format that reflects scheduler properties]' \ |
|
56 '-d[information about all processes except session leaders]' \ |
|
57 '-e[information about every process]' \ |
|
58 '-f[full listing]' \ |
|
59 '-g[only process data whose group leaders ID number(s) appears in grplist]:group leader ID list' \ |
|
60 '-G[information for processes whose real group ID numbers are in gidlist]:real group ID list' \ |
|
61 '-H[prints the home lgroup of the process]' \ |
|
62 '-j[prints session ID and process group ID]' \ |
|
63 '-l[long listing]' \ |
|
64 '-L[information about each light weight process]' \ |
|
65 '-o[specify output format]:property:_values -s , "property" $o_opt' \ |
|
66 '-p[only process data whose process ID numbers are given in proclist]:process ID list' \ |
|
67 '-P[Prints the number of the processor to which the process or lwp is bound]' \ |
|
68 '-s[information on all session leaders whose IDs appear in sidlist]:session leader ID list' \ |
|
69 '-t[lists only process data associated with term]:term' \ |
|
70 '-u[only process data whose effective user ID number or login name is given in uidlist]:UID:_users' \ |
|
71 '-U[information for processes whose real user ID numbers or login names are in uidlist]:UID:_users' \ |
|
72 '-y[both RSS and SZ is reported in kilobytes, instead pages (used with -l)]' \ |
|
73 '-z[lists only processes in the specified zones]:zone list' \ |
|
74 '-Z[prints the name of the zone with which the process is associated]' |
|
75 } |
|
76 |
|
77 _ps "$@" |