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 > AIX
.
google unix.com



AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to get and process mysql result set in shell script ashok1979 Shell Programming and Scripting 4 08-03-2009 09:28 AM
Shell script to display top 5 process (per cpu consumption) mr_awd Shell Programming and Scripting 2 05-26-2009 10:23 AM
Shell Script to end process help NoobieBoobie UNIX for Dummies Questions & Answers 6 04-06-2009 04:11 AM
How can i know file using another process on lunix shell script? Tlg13team Shell Programming and Scripting 1 04-02-2007 03:33 AM
Shell Script Dependencies other process pankajkrmishra Shell Programming and Scripting 4 07-25-2006 06:20 AM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 3 Weeks Ago
haroon_a haroon_a is offline
Registered User
  
 

Join Date: Oct 2009
Posts: 17
Getting process ID in a shell script.

Hi all,

In my script i need to store the process ID of my app server in a variable. I know how to verify whether a process is running, by following:

Code:
 
ps -ef|grep 'jboss'
status=$?
 
if [ "$status" = 0] ; then
   # process is running
else
   # process is nor running
fi
But what I need here to get the process ID of jboss, if its running.

Can someone please advise, how can I get the process ID?

Thanks in advance.
 

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 05:40 AM.


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