Go Back   The UNIX and Linux Forums > Operating Systems > Linux > Red Hat
Search Forums:



Red Hat Red Hat is the world's leading open source technology solutions provider with offerings including Red Hat Enterprise Linux (RHEL), Fedora, open source applications, security and systems management, virtualization, and Services Oriented Architecture (SOA) solutions.

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 04-06-2011
Registered User
 

Join Date: Oct 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
ps not working in Linux

Hi guys, Im not a unix expert so this may be a basic question, I'm using this in solaris to get comm for oracle processes:

$ ps -ef -o comm|grep pmon

ora_pmon_XXXX
ora_pmon_YYYY

but when trying in Linux Im getting:

Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.3/FAQ

Ive been looking for workaround but not luck so far, any ideas?

Tks
Sponsored Links
    #2  
Old 04-06-2011
Moderator
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 12,127
Thanks: 230
Thanked 1,686 Times in 1,618 Posts
After fiddling with it a while I realized the warning means exactly what it says, and getting rid of that dash makes it work. ps ef -o comm
Sponsored Links
    #3  
Old 04-06-2011
Registered User
 

Join Date: Oct 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
No it is not working, not returning what Im looking for, using:

ps -ef|grep pmon

I got all results like:

oracle 1683 1 0 Mar31 ? 00:00:00 ora_pmon_XXXX
oracle 2609 1 0 Apr03 ? 00:00:01 ora_pmon_YYYY
oracle 2689 1 0 2010 ? 00:03:27 ora_pmon_ZZZZ

so, to get only the last column Im using:

ps -ef -o comm|grep pmon

but not working on linux, not even using:

ps ef -o|grep pmon

not returning results

---------- Post updated at 11:01 AM ---------- Previous update was at 10:57 AM ----------

This is what I was looking for:

ps -eo cmd|grep pmon

Tks!
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
FTP not working under Linux but working under any other OS ??? Very strange magix_ch Linux 12 04-23-2010 06:08 PM
FTP on Linux is not working as expected vidyak Red Hat 1 07-12-2009 08:20 AM
FTP/TELNET on linux, not working kymberm UNIX for Dummies Questions & Answers 33 06-03-2003 11:09 AM
FTP is not working after installing Linux 7.3 lapnguyen UNIX for Dummies Questions & Answers 1 07-10-2002 06:30 PM
linux and win nt working together linuxnewbie IP Networking 3 01-31-2002 10:20 PM



All times are GMT -4. The time now is 12:24 AM.