Sponsored Content
Full Discussion: PID Process Resources
Operating Systems HP-UX PID Process Resources Post 302670845 by vbe on Thursday 12th of July 2012 01:55:35 PM
Old 07-12-2012
you could try
Code:
/opt/perf/bin/glance -j2 -iterations 10 -adviser_only -syntax /home/
vbe/glance.syntax

and put down in your syntax file what you request mine had only:
Code:
ant:/home/vbe $ more glance.syntax
print "global priority queue", gbl_pri_queue

for testing someonequestion on this forum...
Did you look at ps command ? Im thinking of the "extented" :
Code:
  XPG4 Synopsis
      ps [-aAcdefHjlPzx] [-C cmdlist] [-g grplist] [-G gidlist] [-n namelist]
           [-o format] [-p proclist] [-R prmgrplist] [-s sidlist] [-t
           termlist] [-u uidlist] [-U uidlist] [-Z pset_list]

e.g.
Code:
UNIX95= ps -efo vsz,ruser,pid,ppid,args | sort -rn | more

for virtual memory usage...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Process PID

Hi Friends :p I have a little problem please help me out. I have a Unix based OS Sun Server having oracle 8i as database on it. The server has one client with windows OS. The client uses developer 2000 (GUI) to run query and run processes. I want to know how can I know the PID of a process run... (3 Replies)
Discussion started by: vanand420
3 Replies

2. Solaris

getting pid of process

hi all, Is there a simple script anyone could through out to me, to find the pid of a process given the name. I actually need to bind this pid to a processor set. I would probably put these comamns in a shell script which would have. a) kick start the executable b) get the pid c) bind it to a... (10 Replies)
Discussion started by: Naanu
10 Replies

3. AIX

How to list the resources used for each process

Hi Expert, Can anyone tell what command can list the resources used for each process in AIX, including the following columns: Process ID, Program Name, Resources used(CPU,RAM,SWAP),Start Time Thanks!! Victor Cheung (3 Replies)
Discussion started by: victorcheung
3 Replies

4. AIX

Finding process taking up resources

I'm assuming that using the PS command would tell me about processes running. But how can I target a process that is taking up too many resources, and slowing down the system. Even an orphan process. (5 Replies)
Discussion started by: NycUnxer
5 Replies

5. UNIX for Dummies Questions & Answers

Need to get pid of a process and have to store the pid in a variable

Hi, I need to get the pid of a process and have to store the pid in a variable and i want to use this value(pid) of the variable for some process. Please can anyone tell me how to get the pid of a process and store it in a variable. please help me on this. Thanks in advance, Amudha (7 Replies)
Discussion started by: samudha
7 Replies

6. Shell Programming and Scripting

Get an PID of particular process

Hi I have written a shell script to find and kill the particular process. Here in shell script i have written the code like cnt = $(ps -ef | grep Shree) echo $cnt I am getting the output root 2326 2317 0 14:39:46 pts/1 0:28 Shree -f fdc.fbconf FDCapp.fbapp Here I want to... (2 Replies)
Discussion started by: Shreedhar Naik
2 Replies

7. Shell Programming and Scripting

getting pid from a process

Hi all, i was able to redirect pid of process to a file in the following way ps aux|awk '$11 == "/Applications/ProjectX/DServer" >> /Applications/ProjectX/DServer.pid it works fine but if one folder name caontains space its not working like below ps aux|awk '$11 == "/Applications/Project\... (1 Reply)
Discussion started by: kirankumars
1 Replies

8. Programming

[C] Process pid by name

Hi I use linux OS. I've already written a function that allow me to get the process name by pid. (searching in /proc). Now I'd like to perform the inverse task.I mean get the process pid by its name. I could write a function that search in every folder in /proc for the process name, but i... (2 Replies)
Discussion started by: Dedalus
2 Replies

9. AIX

Process ids consuming huge resources ?

Hi All what is the command to check process ids , which are running from long time and which are consuming more cpu? Also how to check, what a particular PID is running what For Ex: i have a pid :3223722 which is running since from long time, if i want to check what is this... (1 Reply)
Discussion started by: sidharthmellam
1 Replies

10. AIX

AIX resources consumption group by process pattern

Hi, I have AIX processes something as below, how to know the resources consumption group by process pattern "price" and "devdb"? eg: CPU RAM WIO price 20% 250M 5% devdb 30% 1000M 8% oracle 2990122 1 0 10:33:39 - 0:00... (1 Reply)
Discussion started by: victorcheung
1 Replies
pgrep(1)							   User Commands							  pgrep(1)

NAME
pgrep, pkill - find or signal processes by name and other attributes SYNOPSIS
pgrep [-flvx] [-n | -o] [-d delim] [-P ppidlist] [-g pgrplist] [-s sidlist] [-u euidlist] [-U uidlist] [-G gidlist] [-J projidlist] [-t termlist] [-T taskidlist] [-c ctidlist] [-z zoneidlist] [pattern] pkill [-signal] [-fvx] [-n | -o] [-P ppidlist] [-g pgrplist] [-s sidlist] [-u euidlist] [-U uidlist] [-G gidlist] [-J projidlist] [-t termlist] [-T taskidlist] [-c ctidlist] [-z zoneidlist] [pattern] DESCRIPTION
The pgrep utility examines the active processes on the system and reports the process IDs of the processes whose attributes match the cri- teria specified on the command line. Each process ID is printed as a decimal value and is separated from the next ID by a delimiter string, which defaults to a newline. For each attribute option, the user can specify a set of possible values separated by commas on the command line. For example, pgrep -G other,daemon matches processes whose real group ID is other OR daemon. If multiple criteria options are specified, pgrep matches processes whose attributes match the logical AND of the criteria options. For example, pgrep -G other,daemon -U root,daemon matches processes whose attributes are: (real group ID is other OR daemon) AND (real user ID is root OR daemon) pkill functions identically to pgrep, except that each matching process is signaled as if by kill(1) instead of having its process ID printed. A signal name or number may be specified as the first command line option to pkill. OPTIONS
The following options are supported: -c ctidlist Matches only processes whose process contract ID is in the given list. -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 executable 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 numerical 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. -n Matches only the newest (most recently created) process that meets all other specified 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 inter- preted as the session ID of the pgrep or pkill process. -t termlist Matches only processes which are associated with a terminal in the given list. Each terminal 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 numerical 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 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 process 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 specified as either a zone name or a numeri- cal 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 num- ber as a decimal value. The -signal option is only valid when specified as the first option to pkill. OPERANDS
The following operand is supported: pattern Specifies an Extended Regular Expression (ERE) pattern to match against either the executable file name or full process argument string. See regex(5) for a complete description of the ERE syntax. EXAMPLES
Example 1: Obtaining a Process ID Obtain the process ID of sendmail: example% pgrep -x -u root sendmail 283 Example 2: Terminating a Process Terminate the most recently created xterm: example% pkill -n xterm EXIT STATUS
The following exit values are returned: 0 One or more processes were matched. 1 No processes were matched. 2 Invalid command line options were specified. 3 A fatal error occurred. FILES
/proc/nnnnn/psinfo Process information files ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
kill(1), proc(1), ps(1), truss(1), kill(2), signal.h(3HEAD), proc(4), attributes(5), privileges(5), regex(5), zones(5) NOTES
Both utilities match the ERE pattern argument against either the pr_fname or pr_psargs fields of the /proc/nnnnn/psinfo files. The lengths of these strings are limited according to definitions in <sys/procfs.h>. Patterns which can match strings longer than the current limits may fail to match the intended set of processes. If the pattern argument contains ERE meta-characters which are also shell meta-characters, it may be necessary to enclose the pattern with appropriate shell quotes. Defunct processes are never matched by either pgrep or pkill. The current pgrep or pkill process will never consider itself a potential match. SunOS 5.10 6 May 2004 pgrep(1)
All times are GMT -4. The time now is 09:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy