Knowledge Base

Process-related commands in Solaris

Aug 7th 2008
No Comments

Print the parent/child process ‘tree’ of a process:
# /usr/proc/bin/ptree

Print the working directory of a process:
# /usr/proc/bin/pwdx

Displays CPU % usage for each process in ascending order:
# /usr/ucb/ps -aux | more

Gives the full listing of the process (long listing):
# /usr/ucb/ps -auxww | grep

Append program name and process id to core file names:
# coreadm -i core.%f.%p

Processes that are running from /var:
# fuser -uc /var

Report inter-process communication facilities status:
# ipcs

HUP any related process in one step:
# kill -HUP `ps -ef | grep [p]roccess | awk '{print $2}'`

Mapping port with process:
# lsof -i TCP:25

Shows processes’ current open files:
# pfiles

Kill a process by name:
# pkill -n

An alternative for top command:
# prstat -a

Nicely formatted ‘ps’:
# ps -edf -o pcpu,pid,user,args

Creates list of running PID by :
# ps -ef | grep -i | awk '{ print $2 }'

Creates list of running PID by:
# ps -ef | grep -i | awk '{ print $2 }'

Find and kill all instances of a given process:
# ps -ef | grep | grep -v grep | cut -c 10-15 | xargs kill -9

Show all processes running:
# ps -ef | more

Gives you a list of any process with CPU time more than 0:00:
# ps -ef|grep -v "0:00"|more

List processes in simplified format:
# ps -eo pid,args

See which instances of Oracle are running:
# ps -fu oracle|grep pmon

Returns the process utilizing the most cpu and quits:
# top -b 1

This post is tagged , , ,

No Comments

Leave a Reply