Editing
Solaris 10 Associate
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===== pgrep ===== use pgrep command to search for specific process by name Syntax: * pgrep options pattern pgrep man options: <pre>OPTIONS The following options are supported: -c ctidlist Matches only processes whose process con- tract ID is in the given list. SunOS 5.10 Last change: 6 May 2004 1 User Commands pgrep(1) -d delim Specifies the output delimiter string to be printed between each matching process ID. If no -d option is specified, the default is a newline character. The -d option is only valid when specified as an option to pgrep. -f The regular expression pattern should be matched against the full process argument string (obtained from the pr_psargs field of the /proc/nnnnn/psinfo file). If no -f option is specified, the expression is matched only against the name of the execut- able file (obtained from the pr_fname field of the /proc/nnnnn/psinfo file). -g pgrplist Matches only processes whose process group ID is in the given list. If group 0 is included in the list, this is interpreted as the process group ID of the pgrep or pkill process. -G gidlist Matches only processes whose real group ID is in the given list. Each group ID may be specified as either a group name or a numer- ical group ID. -J projidlist Matches only processes whose project ID is in the given list. Each project ID may be specified as either a project name or a numerical project ID. -l Long output format. Prints the process name along with the process ID of each matching process. The process name is obtained from the pr_psargs or pr_fname field, depending on whether the -f option was specified (see above). The -l option is only valid when specified as an option to pgrep. SunOS 5.10 Last change: 6 May 2004 2 User Commands pgrep(1) -n Matches only the newest (most recently created) process that meets all other speci- fied matching criteria. Cannot be used with option -o. -o Matches only the oldest (earliest created) process that meets all other specified matching criteria. Cannot be used with option -n. -P ppidlist Matches only processes whose parent process ID is in the given list. -s sidlist Matches only processes whose process session ID is in in the given list. If ID 0 is included in the list, this is interpreted as the session ID of the pgrep or pkill pro- cess. -t termlist Matches only processes which are associated with a terminal in the given list. Each ter- minal is specified as the suffix following "/dev/" of the terminal's device path name in /dev. For example, term/a or pts/0. -T taskidlist Matches only processes whose task ID is in the given list. If ID 0 is included in the list, this is interpreted as the task ID of the pgrep or pkill process. -u euidlist Matches only processes whose effective user ID is in the given list. Each user ID may be specified as either a login name or a numer- ical user ID. -U uidlist Matches only processes whose real user ID is in the given list. Each user ID may be specified as either a login name or a SunOS 5.10 Last change: 6 May 2004 3 User Commands pgrep(1) numerical user ID. -v Reverses the sense of the matching. Matches all processes except those which meet the specified matching criteria. -x Considers only processes whose argument string or executable file name exactly matches the specified pattern to be matching processes. The pattern match is considered to be exact when all characters in the pro- cess argument string or executable file name match the pattern. -z zoneidlist Matches only processes whose zone ID is in the given list. Each zone ID may be speci- fied as either a zone name or a numerical zone ID. This option is only useful when executed in the global zone. If the pkill utility is used to send signals to processes in other zones, the process must have asserted the {PRIV_PROC_ZONE} privilege (see privileges(5)). -signal Specifies the signal to send to each matched process. If no signal is specified, SIGTERM is sent by default. The value of signal can be one of the symbolic names defined in signal.h(3HEAD) without the SIG prefix, or the corresponding signal number as a decimal value. The -signal option is only valid when specified as the first option to pkill.</pre>
Summary:
Please note that all contributions to GotOpinion may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
GotOpinion:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information