Solved

Ps -ef with exclude option for shell processes ID

Posted on 2006-10-30
3
616 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 500 total points
ID: 17839028
Use egrep instead

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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

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…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now