Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Ps -ef with exclude option for shell processes ID

Posted on 2006-10-30
3
Medium Priority
?
643 Views
Last Modified: 2013-12-26
Hi, We are using the following command to find all the processes owned by "admin" and the processes having name with SIS, ora.

ps -f |-u Admin grep [SIS]  |grep -v " grep [ora\|SIS] " ,

This is listing all the process with ora and SIS and also the following which we want to avoid with shell processes like csh and ksh.

admin 400588 204800   0 13:57:50  pts/0  0:00 ksh
admin 543846 839918   0 16:28:59  pts/3  0:00 -csh

Could some body help us to fine tune the command to list out all the processes with SIS and ora and NOT to show the shell processes ?

Thanks
GVS
0
Comment
Question by:gvsunil
  • 2
3 Comments
 
LVL 58

Expert Comment

by:amit_g
ID: 17838477
ps -f -u Admin | grep [SIS]  | egrep -v 'grep|ksh|csh'
0
 

Author Comment

by:gvsunil
ID: 17839022
Thanks Amit,

this looks promising, but do you think the following change in your command will also show the ora and SIS processes as well ?

ps -f -u Admin | grep [ora\|SIS]  | egrep -v 'grep|ksh|csh'

Thanks
GVS
0
 
LVL 58

Accepted Solution

by:
amit_g earned 2000 total points
ID: 17839028
Use egrep instead

ps -f -u Admin | egrep 'ora|SIS'  | egrep -v 'grep|ksh|csh'
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Screencast - Getting to Know the Pipeline
Suggested Courses

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question