05-21-2003
You can use the
ps command and search for the stopped process. Check the ps man page for your system to get the correct status flag for a stopped process. For example on our linux system (ps):
Quote:
PROCESS STATE CODES
D uninterruptible sleep (usually IO)
R runnable (on run queue)
S sleeping
T traced or stopped
Z a defunct ("zombie") process
For BSD formats and when the "stat" keyword is used, additional letters may be displayed:
W has no resident pages
< high-priority process
N low-priority task
L has pages locked into memory (for real-time and custom IO)
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi
i'm running a shell script that checks the amount of cpu idle either using /usr/bin/vmstat 1 2 or sar 1 2 (on unixware) before i run some tests(if cpu idle greater than 89 I run them).
These tests are run on many platforms, linux(suse, redhat) hp-ux, unixware, aix, solaris, tru64.
... (5 Replies)
Discussion started by: OFFSIHR
5 Replies
2. UNIX for Dummies Questions & Answers
One of my linux machines has a 'stopped' process which i need to find. How do i find the process that is iin 'stopped' mode. I am running red hat linux enterprise.
Frank
I have now answered this myself with the following command:
ps -e j |grep Z (2 Replies)
Discussion started by: frankkahle
2 Replies
3. UNIX for Advanced & Expert Users
Hi,
top process is shows like this in solaris server oracle 8i running:
load averages: 5.01, 3.35, 2.82 18:24:45
344 processes: 332 sleeping, 5 running, 2 stopped, 5 on cpu
CPU states: 22.2% idle, 29.6% user, 14.7% kernel, 33.5% iowait, 0.0% swap... (3 Replies)
Discussion started by: prakash.gr
3 Replies
4. UNIX for Advanced & Expert Users
I let a script A call script B.
I used
nohup a.sh &>/tmp/log &
In script A it calls B directly, without any redirecting or nohup or background.
However A is always "Stopped", while B is running correctly. Anybody knows why?
thanks!
-----Post Update-----
BTW, if I don't use nohup... (1 Reply)
Discussion started by: meili100
1 Replies
5. Shell Programming and Scripting
I let a script A call script B.
I used
nohup a.sh &>/tmp/log &
In script A it calls B directly, without any redirecting or nohup or background.
However A is always "Stopped", while B is running correctly. Anybody knows why?
thanks!
-----Post Update-----
BTW, if I don't use nohup... (4 Replies)
Discussion started by: meili100
4 Replies
6. UNIX for Dummies Questions & Answers
Hi. Before throwing my question, thanks to everybody for paying attention. Sorry if my english isn't good enough, but it's not my mother tongue.
That's my question:
I have a java program that throws an external program with "Process p = Runtime.getRuntime.exec(***)". The communication between... (2 Replies)
Discussion started by: jlopezperez
2 Replies
7. UNIX for Advanced & Expert Users
UNIX Tutorial Five
% kill %jobnumber
Does that not work on a stopped process? I've tried to kill a stopped process and it is not working. Or do you need a certain type of shell for this to work? I don't see anything about this in my man pages. (3 Replies)
Discussion started by: cokedude
3 Replies
8. Linux
Hi,
Can anyone explain this?
top - 04:21:04 up 23 days, 2:35, 1 user, load average: 0.02, 0.02, 0.00
Tasks: 37 total, 1 running, 36 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 524288k total, 253084k used,... (1 Reply)
Discussion started by: varontron
1 Replies
9. Shell Programming and Scripting
Hi,
I have a script which triggers an infinite loop.
#!bin/bash
trig=`ls /home/trig.tch |wc -l`
function callj {
some commands...
}
while
do
callj &
done
The number of process after doing a ps -ef |grep Mon.sh returns
processes even after the script is killed by deleting the... (4 Replies)
Discussion started by: chetan.c
4 Replies
10. HP-UX
Hi,
A database (Oracle) replication process was executed by the DBA team in one server (serverX). However, this replication process gets terminated, and there are no errors in the replication log. But there is error in the OS log files (syslog.log) :
Aug 8 16:51:47 L28dre02 sshd: subsystem... (1 Reply)
Discussion started by: anaigini45
1 Replies
LEARN ABOUT FREEBSD
rtprio
RTPRIO(1) BSD General Commands Manual RTPRIO(1)
NAME
rtprio, idprio -- execute, examine or modify a utility's or process's realtime or idletime scheduling priority
SYNOPSIS
[id|rt]prio
[id|rt]prio [-]pid
[id|rt]prio priority command [args]
[id|rt]prio priority -pid
[id|rt]prio -t command [args]
[id|rt]prio -t -pid
DESCRIPTION
The rtprio utility is used for controlling realtime process scheduling.
The idprio utility is used for controlling idletime process scheduling, and can be called with the same options as rtprio.
A process with a realtime priority is not subject to priority degradation, and will only be preempted by another process of equal or higher
realtime priority.
A process with an idle priority will run only when no other process is runnable and then only if its idle priority is equal or greater than
all other runnable idle priority processes.
Both rtprio or idprio when called without arguments will return the realtime priority of the current process.
If rtprio is called with 1 argument, it will return the realtime priority of the process with the specified pid.
If priority is specified, the process or program is run at that realtime priority. If -t is specified, the process or program is run as a
normal (non-realtime) process.
If -pid is specified, the process with the process identifier pid will be modified, else if command is specified, that program is run with
its arguments.
Priority is an integer between 0 and RTP_PRIO_MAX (usually 31). 0 is the highest priority
Pid of 0 means "the current process".
Only root is allowed to set realtime or idle priority for a process. A user may modify the idle priority of their own processes if the
sysctl(8) variable security.bsd.unprivileged_idprio is set to non-zero. Note that this increases the chance that a deadlock can occur if a
process locks a required resource and then does not get to run.
EXIT STATUS
If rtprio execute a command, the exit value is that of the command executed. In all other cases, rtprio exits 0 on success, and 1 for all
other errors.
EXAMPLES
To see which realtime priority the current process is at:
rtprio
To see which realtime priority of process 1423:
rtprio 1423
To run cron(8) at the lowest realtime priority:
rtprio 31 cron
To change the realtime priority of process 1423 to 16:
rtprio 16 -1423
To run tcpdump(1) without realtime priority:
rtprio -t tcpdump
To change the realtime priority of process 1423 to RTP_PRIO_NORMAL (non-realtime/normal priority):
rtprio -t -1423
To make depend while not disturbing other machine usage:
idprio 31 make depend
SEE ALSO
nice(1), ps(1), rtprio(2), setpriority(2), nice(3), renice(8)
HISTORY
The rtprio utility appeared in FreeBSD 2.0, but is similar to the HP-UX version.
AUTHORS
Henrik Vestergaard Draboel <hvd@terry.ping.dk> is the original author. This implementation in FreeBSD was substantially rewritten by David
Greenman.
CAVEATS
You can lock yourself out of the system by placing a cpu-heavy process in a realtime priority.
BUGS
There is no way to set/view the realtime priority of process 0 (swapper) (see ps(1)).
There is in FreeBSD no way to ensure that a process page is present in memory therefore the process may be stopped for pagein (see
mprotect(2), madvise(2)).
Under FreeBSD system calls are currently never preempted, therefore non-realtime processes can starve realtime processes, or idletime pro-
cesses can starve normal priority processes.
BSD
September 29, 2012 BSD