The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > HP-UX
.
google unix.com



HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
kill all user processes vascobrito Shell Programming and Scripting 4 09-03-2009 12:02 PM
kill processes pmrajesh21 SUN Solaris 3 10-30-2008 09:08 AM
how do I kill defunct processes? csaunders SUN Solaris 10 01-28-2008 04:49 PM
Unix Kill processes tadi18 Shell Programming and Scripting 5 07-23-2007 07:37 AM
kill all processes Terrible Shell Programming and Scripting 0 08-21-2006 07:49 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-03-2009
NicoMan NicoMan is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 53
Read/kill processes

Hi,
I read a set of processes with:
ps -eaf|grep oracleTRLV

The result is:
oracle 23253 1 0 15:14:11 ? 0:00 oracleTRLV (LOCAL=NO)
oracle 23301 1 0 15:15:07 ? 0:00 oracleTRLV (LOCAL=NO)
oracle 22914 1 0 15:11:19 ? 0:00 oracleTRLV (LOCAL=NO)

How to I kill the "oracleTRLV" ones? Is there an option for the "kill" command that allows me to do it?

Thank you.
  #2 (permalink)  
Old 03-03-2009
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,748
If you can logon as root or as the oracle user you can kill those processes. Assuming killing them is actually a good idea, which you should check on FIRST:

Code:
ps -eaf|grep oracleTRLV |  \ 
while read one pid restofline
do
     kill -9 $pid
done
  #3 (permalink)  
Old 03-03-2009
ce9888 ce9888 is offline
Registered User
  
 

Join Date: Aug 2008
Location: Montreal, Qc, CA
Posts: 98
You can try something like that :

Code:
ps -eaf | grep oracleTRLV | while read ora_proc
do
     set `echo $ora_proc`
     kill $2
done
  #4 (permalink)  
Old 03-03-2009
NicoMan NicoMan is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 53
Stupid question

Stupid question: how do I run the code provided?
  #5 (permalink)  
Old 03-03-2009
ce9888 ce9888 is offline
Registered User
  
 

Join Date: Aug 2008
Location: Montreal, Qc, CA
Posts: 98
You can run it directly from the shell prompt: just cut and paste
  #6 (permalink)  
Old 03-03-2009
NicoMan NicoMan is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 53
Beautiful!!!!

Beautiful ... thank you so much!!!
  #7 (permalink)  
Old 03-03-2009
NicoMan NicoMan is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 53
Run the code every 2 hours

How do I run the code every 2 hours automatically?

Thank you!
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:51 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0