- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: STATE in 'top' command
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2002 10:57 AM
05-08-2002 10:57 AM
I'm wondering about the difference between sleep, wait and run.
If the 10 top entires are all sleep, for example, is that telling me something about system performance?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2002 11:07 AM
05-08-2002 11:07 AM
SolutionThe various states are sleeping, waiting, running, starting, zombie, and stopped, with sleeping and running being the most common. Because only one process can be running on a given cpu at any given moment, the scheduler puts the other process in a sleep state - this is why you see so many sleeping.
HTH,
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2002 11:18 AM
05-08-2002 11:18 AM
Re: STATE in 'top' command
Process States and transitions
===============================
Through the course of its lifetime, a process transits through several
states. Queues in main memory keep track of the process by its process
ID. A process resides on a queue according to its state; process states are
defined in the proc.h header file. Events such as receipt of a signal cause
the process to transit from one state to another.
Table 1-3 Process states
State, followed by What Takes Place
idle (SIDL):
Process is created by a call to fork, vfork, or exec; can be scheduled
to run.
run (SRUN):
Process is on a run queue, available to execute in either kernel
or user mode.
stopped (SSTOP):
Executing process is stopped by a signal or parent process:
sleep (SSLEEP):
Process is not executing; may be waiting for resources:
zombie (SZOMB):
Having exited, the process no longer exists, but leaves behind for
the parent process some record of its execution.
When a program starts up a process, the kernel allocates a structure for
it from the process table. The process is now in idle state, waiting for
system resources. Once it acquires the resource, the process is linked
onto a run queue and made runnable. When the process acquires a
time-slice, it runs, switching as necessary between kernel mode and user
mode. If a running process receives a SIGSTOP signal (as with control-Z
in vi) or is being traced, it enters a stop state. On receiving a SIGCONT
signal, the process returns to a run queue (in-core, runnable). If a
running process must wait for a resource (such as a semaphore or
completion of I/O), the process goes on a sleep queue (sleep state) until
getting the resource, at which time the process wakes up and is put on a
run queue (in-core, runnable). A sleeping process might also be swapped
out, in which case, when it receives its resource (or wakeup signal) the
process might be made runnable, but remain swapped out. The process
is swapped in and is put on a run queue. Once a process ends, it exits
into a zombie state
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2002 11:21 AM
05-08-2002 11:21 AM
Re: STATE in 'top' command
Hi,
The easy way is to do a 'man'
man top
and you will have all the information that you need.
Regarding the states I agree with Pete.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2002 11:23 AM
05-08-2002 11:23 AM
Re: STATE in 'top' command
Is that true?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2002 11:28 AM
05-08-2002 11:28 AM
Re: STATE in 'top' command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2002 11:42 AM
05-08-2002 11:42 AM
Re: STATE in 'top' command
Sometimes processes will wait for resources by design.
For example, if you run 'hpterm' the process will "sleep" beacuse it is waiting for the terminal input.
In other cases, it is a question of performance tuning, but I don't think you can eliminate processes waiting for other resources.
There are different types of wait states. If you have Glance, you can check definitions of the following metrics in /opt/perf/paperdocs/gp/C/metrics.txt :
PROC_CACHE_WAIT_PCT
PROC_CDFS_WAIT_PCT
PROC_DISK_SUBSYSTEM_WAIT_PCT
PROC_DISK_WAIT_PCT
PROC_GRAPHICS_WAIT_PCT
PROC_INODE_WAIT_PCT
PROC_IPC_SUBSYSTEM_WAIT_PCT
PROC_IPC_WAIT_PCT
PROC_JOBCTL_WAIT_PCT
PROC_LAN_WAIT_PCT
PROC_MEM_WAIT_PCT
PROC_MSG_WAIT_PCT
PROC_NFS_WAIT_PCT
PROC_OTHER_IO_WAIT_PCT
PROC_OTHER_WAIT_PCT
PROC_PIPE_WAIT_PCT
PROC_PRI_WAIT_PCT
PROC_RPC_WAIT_PCT
PROC_SEM_WAIT_PCT
PROC_SLEEP_WAIT_PCT
PROC_SOCKET_WAIT_PCT
PROC_STREAM_WAIT_PCT
PROC_SYS_WAIT_PCT
PROC_TERM_IO_WAIT_PC