Sponsored Content
Operating Systems AIX Cmd to find CPU utiliz of a process in AIX Post 302197222 by Franklin52 on Tuesday 20th of May 2008 12:19:44 PM
Old 05-20-2008
Maybe with ps?

Regards
 

10 More Discussions You Might Find Interesting

1. Solaris

How to find which process is using up too much CPU

Hi, I need to find which processes are hogging the cpu up. please advise. Thanks (1 Reply)
Discussion started by: 0ktalmagik
1 Replies

2. 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

3. AIX

Find CPU per process in AIX

Hi. I am looking for a command that will return me the amount of CPU used by a specific process in AIX environment. I know there is TOPAS - but it is interactive and I need to get this information from system that connects remotely via SSH. Using writing to files and than reading them is also... (1 Reply)
Discussion started by: yamsin789
1 Replies

4. Programming

C++ application: how to access AIX process and cpu information?

Hi, may be this is an AIX noob question: my current C++ application runs on Linux and is quite memory consuming. Therefore, the application writes a logfile after it has finished containing memory information, CPU information, information on the running other processes besides my application... (0 Replies)
Discussion started by: DarthVader77
0 Replies

5. AIX

How to access process and cpu info on AIX?

Hi, may be this is an AIX noob question: my current C++ application runs on Linux and is quite memory consuming. Therefore, the application writes a logfile after it has finished containing memory information, CPU information, information on the running other processes besides my application... (5 Replies)
Discussion started by: DarthVader77
5 Replies

6. UNIX for Advanced & Expert Users

How to find out memory & cpu usage of a process

Hi, By using time command we can determine the execution time of a process or command. bash-2.04$ time ls -l total 0 -rw-r--r-- 1 admin tac 0 Oct 6 04:46 file1 -rw-r--r-- 1 admin tac 0 Oct 6 04:46 file2 real 0m0.002s user 0m0.000s sys 0m0.001s... (5 Replies)
Discussion started by: learn more
5 Replies

7. AIX

How to find what process is using a port in AIX 5L and above.

There have been a lot of threads about how to find processes that are using a specific port on an AIX server. After long hours of research and reading countless "you can't do that" responses, I finally found the answer. YES IT CAN BE DONE! YES ITS EASY. NO, I DON'T KNOW WHY NO ONE GETS THIS... (2 Replies)
Discussion started by: troym72
2 Replies

8. AIX

Aix process CPU differences.

Hi, I'm trying to create a script to catch a process which is consuming high CPU which I have pretty much done but it's just finding the correct place to pull the current CPU for that process. When viewed in Topas it's consuming 99.*% cpu But if I try using ps avg or ps -eo pcpu ... (5 Replies)
Discussion started by: elmesy
5 Replies

9. Shell Programming and Scripting

Cpu utilization by a process has to be mailed if more than 5% on AIX

i am using the below command in order to find the cpu utilization by a user..now i want to mail if the cpu utilization goes beyond 5%....can someone please help me ? ps auxw | sort -r +2 | awk '{ print $3,$1 }' | head -6 | egrep "USER|#anonymous#" %CPU USER 2.0 anonymous Regards,... (6 Replies)
Discussion started by: arorap
6 Replies

10. Shell Programming and Scripting

Tricky situation with process cpu usage - AIX

OS: AIX so we frequently receive a lot of cpu related alerts. all types of checks have been created to keep an eye on the cpu but a lot of these checks make too much noise as the CPU is always being seen as high. the system and application owners say there's no issue with the cpu. so now,... (6 Replies)
Discussion started by: SkySmart
6 Replies
FCNTL(2)							System Calls Manual							  FCNTL(2)

NAME
fcntl - file control SYNOPSIS
#include <fcntl.h> res = fcntl(fd, cmd, arg) int res; int fd, cmd, arg; DESCRIPTION
Fcntl provides for control over descriptors. The argument fd is a descriptor to be operated on by cmd as follows: F_DUPFD Return a new descriptor as follows: Lowest numbered available descriptor greater than or equal to arg. Same object references as the original descriptor. New descriptor shares the same file pointer if the object was a file. Same access mode (read, write or read/write). Same file status flags (i.e., both file descriptors share the same file status flags). The close-on-exec flag associated with the new file descriptor is set to remain open across execv(2) system calls. F_GETFD Get the close-on-exec flag associated with the file descriptor fd. If the low-order bit is 0, the file will remain open across exec, otherwise the file will be closed upon execution of exec. F_SETFD Set the close-on-exec flag associated with fd to the low order bit of arg (0 or 1 as above). F_GETFL Get descriptor status flags, as described below. F_SETFL Set descriptor status flags. F_GETOWN Get the process ID or process group currently receiving SIGIO and SIGURG signals; process groups are returned as negative values. F_SETOWN Set the process or process group to receive SIGIO and SIGURG signals; process groups are specified by supplying arg as nega- tive, otherwise arg is interpreted as a process ID. The flags for the F_GETFL and F_SETFL flags are as follows: O_NONBLOCK Non-blocking I/O; if no data is available to a read call, or if a write operation would block, the call returns -1 with the error EWOULDBLOCK. O_APPEND Force each write to append at the end of file; corresponds to the O_APPEND flag of open(2). O_ASYNC Enable the SIGIO signal to be sent to the process group when I/O is possible, e.g., upon availability of data to be read. RETURN VALUE
Upon successful completion, the value returned depends on cmd as follows: F_DUPFD A new file descriptor. F_GETFD Value of flag (only the low-order bit is defined). F_GETFL Value of flags. F_GETOWN Value of file descriptor owner. other Value other than -1. Otherwise, a value of -1 is returned and errno is set to indicate the error. ERRORS
Fcntl will fail if one or more of the following are true: [EBADF] Fildes is not a valid open file descriptor. [EMFILE] Cmd is F_DUPFD and the maximum allowed number of file descriptors are currently open. [EINVAL] Cmd is F_DUPFD and arg is negative or greater than the maximum allowable number (see getdtablesize(2)). [ESRCH] Cmd is F_SETOWN and the process ID given as argument is not in use. SEE ALSO
close(2), execve(2), getdtablesize(2), open(2), sigvec(2) BUGS
The asynchronous I/O facilities of O_NONBLOCK and O_ASYNC are currently available only for tty and socket operations. 4.2 Berkeley Distribution Nov 30, 1994 FCNTL(2)
All times are GMT -4. The time now is 10:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy