10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi Experts,
I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state.
On doing cat /proc/<pid>wchan showing the "__init_begin" in the output.
Can you please help me here... (6 Replies)
Discussion started by: naveeng
6 Replies
2. UNIX for Advanced & Expert Users
Hi Experts,
I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state.
On doing cat /proc/<pid>wchan showing the "__init_begin" in the output.
Can you please help me here... (1 Reply)
Discussion started by: naveeng
1 Replies
3. BSD
Hi Experts,
I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state.
On doing cat /proc/<pid>wchan showing the "__init_begin" in the output.
Can you please help me here... (0 Replies)
Discussion started by: naveeng
0 Replies
4. Shell Programming and Scripting
Hi, I have a parallelized Mathematica program that spans across 8 MathKernels processes running at 100% and one MathKernel (highlighted in blue) running at < 10% that controls the other 8. They look like this on the cluster:
https://www.unix.com/attachment.php?attachmentid=5111&stc=1&d=1381245618... (2 Replies)
Discussion started by: giovform
2 Replies
5. Shell Programming and Scripting
Hi,
How can i capture the running process for 2 hours.
Thanks in advance.:b: (1 Reply)
Discussion started by: sarathkumar
1 Replies
6. Shell Programming and Scripting
I had a script executing every hour to kill a process. I used loop rather than cron to execute it periodically. But now when I am trying to kill that sleep process of 1 hour its not getting killed. it is taking a new PID everytime I kill. To disable the script commenting is the only option... (1 Reply)
Discussion started by: nixhead
1 Replies
7. UNIX for Dummies Questions & Answers
Hello All,
I have a script which has a functionality to sleep for 300 seconds after it does some processing, so in the logs if i check after the 3 iteration of sleep it didn't write saying "sleeping for 300 seconds". I suspect putty would automatically terminate session as i cannot access it any... (1 Reply)
Discussion started by: Ariean
1 Replies
8. Shell Programming and Scripting
Hi
i want to print the time of a process in hours only..(or) in minutes only.Is there anyway to print the process such like that
when i give the commnand like following
#ps -eo pid,time
PID TIME
412 01:49:32
481 00:03
it shows in HH:MM:SS format:
Could anyone... (1 Reply)
Discussion started by: srikanthg
1 Replies
9. Shell Programming and Scripting
Hi All,
Here is my script:
sleep_time=`echo "9.6 * $num_servers"|bc| cut -d. -f1`
if ; then sleep_time=3600;fi
### Allow the compare script to kick in after 1 hour at the least
logger "Sleeping for $sleep_time seconds ...Will call compare.sh thereon" $act_log
sleep $sleep_time
#sleep... (3 Replies)
Discussion started by: ntgobinath
3 Replies
10. Shell Programming and Scripting
how to start a process and make it sleep for 5 mins and then kill that process (6 Replies)
Discussion started by: shrao
6 Replies
sleep(9r) sleep(9r)
NAME
sleep - General: Puts a calling process to sleep
SYNOPSIS
void sleep(
caddr_t *channel,
long pri );
ARGUMENTS
Specifies a unique address associated with the calling kernel thread to be put to sleep. Specifies whether the sleep request is interrupt-
ible. Setting this argument to the PCATCH flag causes the process to sleep in an interruptible state (that is, the kernel thread can take
asynchronous signals). Not setting the PCATCH flag causes the process to sleep in an uninterruptible state (that is, the kernel thread can-
not take asynchronous signals).
DESCRIPTION
The sleep routine puts a calling process to sleep on the address specified by the channel argument. Some common addresses are the lbolt
argument, a buf structure, and a proc structure. This address should be unique to prevent unexpected wake/sleep cycles, which can occur if
different processes are sleeping on the same address accidentally. If you set the PCATCH flag in the pri argument, the sleep routine puts
signals on the queue and does not wake up the sleeping process.
The sleep and wakeup routines block and then wake up a process. Generally, device drivers call these routines to wait for the transfer to
complete an interrupt from the device. That is, the write routine of the device driver sleeps on the address of a known location, and the
device's Interrupt Service Interface (ISI) wakes the process when the device interrupts. It is the responsibility of the wakened process to
check if the condition for which it was sleeping has been removed.
NOTES
The operating system provides two ways to put a process to sleep: interruptible and uninterruptible. The sleep routine performs an uninter-
ruptible sleep operation if you do not set the PCATCH flag and an interruptible sleep operation if you set the PCATCH flag. This means
that device drivers cannot call sleep at interrupt context because at interrupt context there is no calling process to be put to sleep.
Thus, a device driver's Interrupt Service Interface (ISI) and those routines called from within the ISI must not call the sleep routine.
On this operating system, you cannot use pri to set the scheduling priority of the calling process.
RETURN VALUES
None
FILES
SEE ALSO
Routines: wakeup(9r)
sleep(9r)