ps not working in Linux

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat ps not working in Linux
# 1  
Old 04-06-2011
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? Smilie

Tks
# 2  
Old 04-06-2011
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
# 3  
Old 04-06-2011
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!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Simple sed command not working; could be a Mac/Linux vs. PC/Linux issue

Hello, I am on a Mac and trying to clean up some monthly files with a very simple SED: sed '3,10d;/<ACROSS>/,$d' input.txt > output.txt (from the input, delete lines 3 - 10; then delete from the line containing <ACROSS> to the end of the file) then output to output.txt Even when I try... (2 Replies)
Discussion started by: verbatim
2 Replies

2. Shell Programming and Scripting

Mailx not working on Linux

Hi, telnet localhost 25 Trying ::1... Connected to localhost. Escape character is '^]'. 220 TechBun ESMTP Postfix This command echo "hi" | mail -v me@mycomp.com does not send mail to my inbox and i get the below output. Upon investigation i saw this log file tail -f... (3 Replies)
Discussion started by: mohtashims
3 Replies

3. UNIX for Beginners Questions & Answers

Curl to download using Linux not working

Good Morning. I'm trying to download a file from a server. I was able to upload to the server successfully but when i download, i see the file name in my server but with some unknow data. The file name i'm trying to download is abcd.zip in binary mode. curl -1 -v --ftp-pasv -o abcd.zip -u... (4 Replies)
Discussion started by: Pavan Kumar19
4 Replies

4. Shell Programming and Scripting

Script not working in Linux

It is working fine in HPUX, but not in LINUX. Can you please advise how to tweak this script for LINUX? Please help! ;rename the file to use uppercase letters set DCLcom = concat("mv $", filename, " $", uc_file_dir) call echo(DCLcom) set DCLlen = size(trim(DCLcom)) set DCLstatus... (12 Replies)
Discussion started by: Daniel Gate
12 Replies

5. Shell Programming and Scripting

AWK command working different in Linux

Hi All I have fired a command in linux table=`echo ${file_name} | awk '{FS="/"; print $NF}' | awk '{FS="."; print $1}'` where file_name has /data/ds/dpr_ebicm_uat/backfill/temp/etl_app_info.csv /data/ds/dpr_ebicm_uat/backfill/temp/etl_app_jobs.csv ... (10 Replies)
Discussion started by: vee_789
10 Replies

6. Shell Programming and Scripting

Linux - scripts not working in cron

hi all, i have scripts executable in manully, but not working in cron. any ideas? thanks a lot? * * * * * /home/dir/dir/file.sh #! /bin/sh alarmPath="/home/dir/monitoringAlarm" alarmDateTime="$(date +%Y%m%d) $(date +%H%M%S)" tomcatPID=`pidof /usr/local/jdk1.6.0_13/bin/java` echo "tomcat... (3 Replies)
Discussion started by: maxlee24
3 Replies

7. Red Hat

Linux - scripts not working in cron

hi all, i have scripts executable in manully, but not working in cron. any ideas? thanks a lot? * * * * * /home/dir/dir/file.sh #! /bin/sh alarmPath="/home/dir/monitoringAlarm" alarmDateTime="$(date +%Y%m%d) $(date +%H%M%S)" tomcatPID=`pidof /usr/local/jdk1.6.0_13/bin/java` echo "tomcat... (1 Reply)
Discussion started by: maxlee24
1 Replies

8. Linux

FTP not working under Linux but working under any other OS ??? Very strange

Dear all, I am totally despaired and puzzled. Using Filezilla under Windows under the same network as our Linux servers is working. Using FTP command-line client under any of our Linux debian servers is not working ! I tried with different FTP servers -> same problem ! All commands are... (12 Replies)
Discussion started by: magix_ch
12 Replies

9. UNIX for Dummies Questions & Answers

Trying to get mail working on a Linux machine

I tried using the mail command on one of our Linux machines to send email, and it works fine. I tried using the same command on another one of our Linux machines, and it didn't work (no error message was returned either). The machine that works has the following version information:... (2 Replies)
Discussion started by: sllinux
2 Replies

10. IP Networking

linux and win nt working together

I was wondering if anybody knew how to make linux and win nt and a novell server integrated there will be no workstations we are trying to get the servers together now we are currently working on Novel and NT and then we want to integrate the linux server into that. We know that we need Samba but... (3 Replies)
Discussion started by: linuxnewbie
3 Replies
Login or Register to Ask a Question