Sponsored Content
Operating Systems HP-UX Get CPU,Memory utilization by process id Post 302486762 by suresh_g on Monday 10th of January 2011 08:52:25 AM
Old 01-10-2011
Get CPU,Memory utilization by process id

Hi ,
We need to get the CPU% and Memory utilization of process by process id.
Is there any way to do get them ?

I tried few commands like top -p <PID> ,
but am getting error "Quitting top: pset <PID> doesn't exist"
also i tried with ps -eo option but am getting error "ps: illegal option -- o"

when i executed uname -a command i got following as output
"HP-UX servername B.11.23 U ia64 0318662421 unlimited-user license"

we are using hp-ux..Does the above commands doesnt work here?
What are the commands in hp-ux to get the CPU and memory utilization of process

Thanks,
Suresh
 

10 More Discussions You Might Find Interesting

1. AIX

Utilization for memory and cpu

Hi all I need command to give me the utilization for memory and cpu,and how can I know if the utilization ok or no? for example in hp unix #top it is give me utilize for cpu and memory and also I can know if utilize ok or no. thanks (2 Replies)
Discussion started by: magasem
2 Replies

2. Shell Programming and Scripting

Memory and CPU utilization process

Hi, I need to check which process in linux is taking high memory and which process is taking high cpu usage. Regards, Bash (4 Replies)
Discussion started by: learnbash
4 Replies

3. UNIX for Dummies Questions & Answers

how to get persistant cpu utilization values per process per cpu in linux (! top,ps)

hi, i want to know cpu utilizatiion per process per cpu..for single processor also if multicore in linux ..to use these values in shell script to kill processes exceeding cpu utilization.ps (pcpu) command does not give exact values..top does not give persistant values..psstat,vmstat..does njot... (3 Replies)
Discussion started by: pankajd
3 Replies

4. UNIX for Dummies Questions & Answers

CPU/Memory utilization

hi guys I just want to know how to get the cpu/memory utilization of a running script? Well i know that I can use the sar command but it shows the whole system's statistics. Is it possible to get the stats of a single scirpt or a single running service? (6 Replies)
Discussion started by: khestoi
6 Replies

5. UNIX for Dummies Questions & Answers

CPU Utilization and Memory Usage

Can any one suggest me, how to get the last week's (Last n weeks) average CPU utilization and Memory usage? (2 Replies)
Discussion started by: siba.s.nayak
2 Replies

6. UNIX for Dummies Questions & Answers

Getting CPU utilization and memory for a process

I am trying to get cpu util and memory occupied for a process. I use these (I am showing output also): using top ---------- $ top p 25272 d 5 top - 01:52:17 up 2 days, 21:28, 2 users, load average: 0.02, 0.05, 0.06 Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie... (5 Replies)
Discussion started by: radiatejava
5 Replies

7. UNIX for Dummies Questions & Answers

Get CPU,Memory utilization by process id

Hi , We need to get the CPU% and Memory utilization of process by process id. Is there any way to do get them ? I tried few commands like top -p <PID> , but am getting error "Quitting top: pset <PID> doesn't exist" also i tried with ps -eo option but am getting error "ps: illegal option --... (1 Reply)
Discussion started by: suresh_g
1 Replies

8. Emergency UNIX and Linux Support

CPU and memory utilization of a process, by process name

Can someone please help me with a script that will help in identifying the CPU & memory usage by a process name, rather than a process id.This is to primarily analyze the consumption of resources, for performance tweaking. G (4 Replies)
Discussion started by: ggayathri
4 Replies

9. Solaris

[DOUBT] Memory high in idle process on Solaris 10 (Memory Utilization > 90%)

Hi Experts, Our servers running Solaris 10 with SAP Application. The memory utilization always >90%, but the process on SAP is too less even nothing. Why memory utilization on solaris always looks high? I have statement about memory on solaris, is this true: Memory in solaris is used for... (4 Replies)
Discussion started by: edydsuranta
4 Replies

10. Red Hat

CPU Utilization and Memory Utilization of Services and Applications

Hi, i am new to linux/RHEL 6.0 and i have two questions. 1) How to get the CPU utilization and Memory Utilization of all Services running currently? 2) How to get the CPU utilization and Memory Utilization of all Applications running currently? Please help me to find the script. ... (2 Replies)
Discussion started by: nossam
2 Replies
ps(1B)						     SunOS/BSD Compatibility Package Commands						    ps(1B)

NAME
ps - display the status of current processes SYNOPSIS
/usr/ucb/ps [-aceglnrSuUvwx] [-t term] [num] DESCRIPTION
The ps command displays information about processes. Normally, only those processes that are running with your effective user ID and are attached to a controlling terminal (see termio(7I)) are shown. Additional categories of processes can be added to the display using vari- ous options. In particular, the -a option allows you to include processes that are not owned by you (that do not have your user ID), and the -x option allows you to include processes without controlling terminals. When you specify both -a and -x, you get processes owned by anyone, with or without a controlling terminal. The -r option restricts the list of processes printed to running and runnable processes. ps displays in tabular form the process ID, under PID; the controlling terminal (if any), under TT; the cpu time used by the process so far, including both user and system time, under TIME; the state of the process, under S; and finally, an indication of the COMMAND that is running. The state is given by a single letter from the following: O Process is running on a processor. S Sleeping. Process is waiting for an event to complete. R Runnable. Process is on run queue. Z Zombie state. Process terminated and parent not waiting. T Traced. Process stopped by a signal because parent is tracing it. OPTIONS
The following options must all be combined to form the first argument: -a Includes information about processes owned by others. -c Displays the command name rather than the command arguments. -e Displays the environment as well as the arguments to the command. -g Displays all processes. Without this option, ps only prints interesting processes. Processes are deemed to be uninteresting if they are process group leaders. This normally eliminates top-level command interpreters and processes waiting for users to login on free terminals. -l Displays a long listing, with fields F, PPID, CP, PRI, NI, SZ, RSS, and WCHAN as described below. -n Produces numerical output for some fields. In a user listing, the USER field is replaced by a UID field. -r Restricts output to running and runnable processes. -S Displays accumulated CPU time used by this process and all of its reaped children. -t term Lists only process data associated with the terminal, term. Terminal identifiers may be specified in one of two forms: the device's file name (for example, tty04 or term/14 ) or, if the device's file name starts with tty, just the digit identifier (for example, 04). -u Displays user-oriented output. This includes fields USER, %CPU, %MEM, SZ, RSS, and START as described below. -U Obsolete. This option no longer has any effect. It causes ps to exit without printing the process listing. -v Displays a version of the output containing virtual memory. This includes fields SIZE, %CPU, %MEM, and RSS, described below. -w Uses a wide output format (132 columns rather than 80). If the option letter is repeated, that is, -ww, uses arbitrarily wide out- put. This information is used to decide how much of long commands to print. -x Includes processes with no controlling terminal. num A process number may be given, in which case the output is restricted to that process. This option must be supplied last. DISPLAY FORMATS
Fields that are not common to all output formats: USER Name of the owner of the process. %CPU CPU use of the process. This is a decaying average over up to a minute of previous (real) time. NI Process scheduling increment (see getpriority(3C) and nice(3UCB)). SIZE The total size of the process in virtual memory, including all mapped files and devices, in kilobyte units. SZ Same as SIZE. RSS Real memory (resident set) size of the process, in kilobyte units. UID Numerical user-ID of process owner. PPID Numerical ID of parent of process. CP Short-term CPU utilization factor (used in scheduling). PRI The priority of the process (higher numbers mean lower priority). START The starting time of the process, given in hours, minutes, and seconds. A process begun more than 24 hours before the ps inquiry is executed is given in months and days. WCHAN The address of an event for which the process is sleeping (if blank, the process is running). %MEM The ratio of the process's resident set size to the physical memory on the machine, expressed as a percentage. F Flags (hexadecimal and additive) associated with the process. These flags are available for historical purposes; no meaning should be currently ascribed to them. A process that has exited and has a parent, but has not yet been waited for by the parent, is marked <defunct>; otherwise, ps tries to determine the command name and arguments given when the process was created by examining the user block. FILES
/dev/tty* /etc/passwd UID information supplier ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscpu | +-----------------------------+-----------------------------+ SEE ALSO
kill(1), ps(1), whodo(1M), getpriority(3C), nice(3UCB), proc(4), attributes(5), termio(7I) NOTES
Things can change while ps is running. The picture ps gives is only a close approximation to the current state. Some data printed for defunct processes is irrelevant. SunOS 5.10 29 Mar 2002 ps(1B)
All times are GMT -4. The time now is 06:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy