02-27-2013
Wait process holding CPU
Thanks for your detailed Analysis Bakumin & zaxxon.
As exclaimed, yes the system was doing nothing at that point in time, they were completely idle. I was either trying to login to sqlplus from other session and it was taking 2 minutes for that 'or' may be some other things very general like bring up a small service.
I m going to try all these suggessions given. Will let you know guys.
Thanks a ton for your help.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Does anyone know what the equivalent command to pwait on Solaris is on DG/UX. I need my script to kick off a process and wait till it is complete before continuing with the script. (4 Replies)
Discussion started by: fabbas
4 Replies
2. UNIX for Advanced & Expert Users
Hi,
is-it normal to have 86% of CPU for wait commande :
ps aux| head -20
UTIL PID %CPU %MEM SZ RSS TTY STAT STIME TIME COMMAND
root 516 86,6 0,0 12 12 - A 02 nov 2088:03 wait
oralfa01 54422 4,6 1,0 68044 39868 - A 09:20:06 2:27 oracleALFA01
If... (3 Replies)
Discussion started by: big123456
3 Replies
3. Shell Programming and Scripting
Did not use 'wait' yet.
How I understand by now the wait works only for child processes, started background.
Is there any other way to watch completion of any, not related process (at least, a process, owned by the same user?)
I need to start a background process, witch will be waiting... (2 Replies)
Discussion started by: alex_5161
2 Replies
4. UNIX for Dummies Questions & Answers
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
5. AIX
Hi,
I collect statistics with nmon. I'm very suprised about % wait of processor.
Number Of Processors: 4
Processor Clock Speed: 4204 MHz
Do U have an idea about % wait ?
│ 0----------25-----------50----------75----------100 ... (1 Reply)
Discussion started by: tagger
1 Replies
6. Shell Programming and Scripting
Hi All,
I have two ksh script. 1st script calls the 2nd script and the second script calls an 'C' program.
I want 1st script to wait until the 'C' program completes.
I cant able to get the process id for the 'C' program (child process) to make the 1st script to wait for the second... (7 Replies)
Discussion started by: sennidurai
7 Replies
7. Solaris
HI All
Am on Sun OS.While trying to start a process , we could see that the port is idle and we are not able to find the process holding that port.
Below is the result we get after using netstat command. lsof command is not yet installed in our machine.
netstat -a | grep "port no"... (5 Replies)
Discussion started by: Whiteboard
5 Replies
8. Solaris
Hi ,
In a server /tmp has almost reached 75% and i can see the File system utilization is 48Mb only , so i believe some process is using the /tmp space. I would like to know which process is using /tmp space.
# df -h /tmp
Filesystem size used avail capacity Mounted on
swap ... (9 Replies)
Discussion started by: chidori
9 Replies
9. AIX
Hi,
I can't seem to make sense of this. My wait time is showing really high but vmstat's and topas are showing normal usage.
ps aux
USER PID %CPU %MEM SZ RSS TTY STAT STIME TIME COMMAND
root 9961810 5680.7 0.0 448 384 - A Dec 16 6703072:12 wait
... (2 Replies)
Discussion started by: techy1
2 Replies
10. UNIX for Advanced & Expert Users
Hello All,
The system concerned has multiple processes communicating with each other using shared memory. These processes use semaphores to protect data being used amongst them. The "key" would uniquely identifies the particular semaphore corresponding to a resource for the various processes.
... (2 Replies)
Discussion started by: saptarshi
2 Replies
LEARN ABOUT DEBIAN
sd_pid_get_unit
SD_PID_GET_SESSION(3) sd_pid_get_session SD_PID_GET_SESSION(3)
NAME
sd_pid_get_session, sd_pid_get_unit, sd_pid_get_owner_uid - Determine session, service or owner of a session of a specific PID
SYNOPSIS
#include <systemd/sd-login.h>
int sd_pid_get_session(pid_t pid, char** session);
int sd_pid_get_unit(pid_t pid, char** unit);
int sd_pid_get_owner_uid(pid_t pid, uid_t* uid);
DESCRIPTION
sd_pid_get_session() may be used to determine the login session identifier of a process identified by the specified process identifier. The
session identifier is a short string, suitable for usage in file system paths. Note that not all processes are part of a login session
(e.g. system service processes, user processes that are shared between multiple sessions of the same user, or kernel threads). For
processes not being part of a login session this function will fail. The returned string needs to be freed with the libc free(3) call after
use.
sd_pid_get_unit() may be used to determine the systemd unit (i.e. system service) identifier of a process identified by the specified
process identifier. The unit name is a short string, suitable for usage in file system paths. Note that not all processes are part of a
unit/service (e.g. user processes, or kernel threads). For processes not being part of a systemd unit/system service this function will
fail. The returned string needs to be freed with the libc free(3) call after use.
sd_pid_get_owner_uid() may be used to determine the Unix user identifier of the owner of the session of a process identified the specified
PID. Note that this function will succeed for user processes which are shared between multiple login sessions of the same user, where
sd_pid_get_session() will fail. For processes not being part of a login session and not being a shared process of a user this function will
fail.
If the pid paramater of any of these functions is passed as 0 the operation is executed for the calling process.
RETURN VALUE
On success these calls return 0 or a positive integer. On failure, these calls return a negative errno-style error code.
NOTES
The sd_pid_get_session(), sd_pid_get_pid(), and sd_pid_get_owner_uid() interfaces are available as shared library, which can be compiled
and linked to with the libsystemd-login pkg-config(1) file.
Note that the login session identifier as returned by sd_pid_get_session() is completely unrelated to the process session identifier as
returned by getsid(2).
SEE ALSO
systemd(1), sd-login(7), sd_session_is_active(3), getsid(2)
AUTHOR
Lennart Poettering <lennart@poettering.net>
Developer
systemd 10/07/2013 SD_PID_GET_SESSION(3)