01-06-2005
Quote:
Originally posted by dbrundrett
Thanks BZ. Am I right in thinking that if the process has 254 in the C column and is in a state of sleep, that it is no longer running but in a continual loop or a process it's relying on has died?
Thanks again
You can't all of that stuff from the value 254. If it's in a state a sleep, it recently arrived at a state of sleep and the C value should continue to decay all the way to zero. "no longer running but in a continual loop" is not even self-consistant. A process that is in a loop would be running. You can't tell if the process is relying on another process from this number.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I am triying to make sure that there exists only one file with the pattern abc* in path /path/. This directory is having many huge files. If there is only one file then I have to take its complete name only to use furter in my script.
I am planning to do like this:
if ; then... (2 Replies)
Discussion started by: new_learner
2 Replies
2. UNIX for Dummies Questions & Answers
Hi folks,
Please advise which command/command line shall I run;
1) to display the command and its output on console
2) simultaneous to save the command and its output on a file
I tried tee command as follows;
$ ps aux | grep mysql | tee /path/to/output.txt
It displayed the... (7 Replies)
Discussion started by: satimis
7 Replies
3. UNIX for Advanced & Expert Users
Is there a way to repeat the output of the last command for filtering without running the command again? All I could think of was to copy all the data to a text file and process it that way, is there another way? Like say I want to grep server.server.lan from a dtrace that was pages long after I... (5 Replies)
Discussion started by: glev2005
5 Replies
4. UNIX for Dummies Questions & Answers
Hey, guys!
Trying to research this is such a pain since the read command itself is a common word. Try searching "unix OR linux read command examples" or using the command substitution keyword. :eek:
So, I wanted to use a command statement similar to the following.
This is kinda taken... (2 Replies)
Discussion started by: ProGrammar
2 Replies
5. AIX
Hello,
Script command helps to save command output to file. (Redicection doesn't work in this case).
Besides interactive shell 'recording', Linux script command has "-c" option which allows to record output of some non-interactive command.
The problem is that AIX script command variant... (6 Replies)
Discussion started by: vilius
6 Replies
6. UNIX for Dummies Questions & Answers
HI Guys,
I hope you are well. I am trying to write a script that gets executed every time i open a shell (cshell). I have two questions about that
1) I need to enter these commands
$ echo $DISPLAY
$ setenv $DISPLAY output_of_echo_$display_command
How can i write a... (2 Replies)
Discussion started by: kaaliakahn
2 Replies
7. Shell Programming and Scripting
Hi Experts,
I am very much new to linux scripting, I am currently working on reducing my manual work and hence writing a script to automate few task.
I am running below command to snmpwalk the router..
snmpwalk -v 3 -u WANDL_SU -a MD5 -A vfipmpls -x DES -X VfIpMpLs -l authPriv... (19 Replies)
Discussion started by: Hanumant.madane
19 Replies
8. Red Hat
I ran the following command.
cat abc.c > abc.c
I got message the following message from command cat:
cat: abc.c : input file is same as the output file
How the command came to know of the destination file name as the command is sending output to standard file. (3 Replies)
Discussion started by: ravisingh
3 Replies
9. UNIX for Dummies Questions & Answers
Hi Guys,
I like to output every command executed in the script to a file.
I have tried set -x which does the same.
But it is not giving the logs of the child script which is being called from my script.
Is there any parameters in the Set command or someother way where i can see the log... (2 Replies)
Discussion started by: mac4rfree
2 Replies
10. Shell Programming and Scripting
I am using UNIX to create a script on our system. I have setup my commands to append their output to an outage file. However, some of the commands return no output and so I would like something to take their place.
What I need
The following command is placed at the prompt:
TICLI... (4 Replies)
Discussion started by: jbrass
4 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)