Sponsored Content
Top Forums Shell Programming and Scripting check processes on remote system? Post 302249604 by radoulov on Tuesday 21st of October 2008 05:05:43 PM
Old 10-21-2008
Quote:
Originally Posted by sethcoop
When using "grep -c" to count and you use it to count how many processes are running the "grep" is a process and will get counted... if you are grep'ing to count processes then it is probably best to do "grep -v grep | wc -l" to count.
I think danmero meant this:

Code:
$ ps -ef|grep ora_
  oracle  3294     1  0   Sep 05 ?        1:10 ora_dbw1_xxx
  oracle 11443 11433  0 23:02:34 pts/1    0:00 grep ora_
  oracle  3292     1  0   Sep 05 ?        1:18 ora_dbw0_xxx
  oracle  3290     1  0   Sep 05 ?        0:00 ora_pmon_xxx
  oracle  3302     1  0   Sep 05 ?        0:00 ora_reco_xxx
  oracle  3304     1  0   Sep 05 ?        0:00 ora_cjq0_xxx
  oracle  3296     1  0   Sep 05 ?        2:35 ora_lgwr_xxx
  oracle  3298     1  0   Sep 05 ?        7:08 ora_ckpt_xxx
  oracle  3310     1  0   Sep 05 ?        0:02 ora_arc1_xxx
  oracle  3300     1  0   Sep 05 ?        1:32 ora_smon_xxx
  oracle  3306     1  0   Sep 05 ?        0:11 ora_qmn0_xxx
  oracle  3308     1  0   Sep 05 ?        0:05 ora_arc0_xxx
$ ps -ef|grep [o]ra_
  oracle  3294     1  0   Sep 05 ?        1:10 ora_dbw1_xxx
  oracle  3292     1  0   Sep 05 ?        1:18 ora_dbw0_xxx
  oracle  3290     1  0   Sep 05 ?        0:00 ora_pmon_xxx
  oracle  3302     1  0   Sep 05 ?        0:00 ora_reco_xxx
  oracle  3304     1  0   Sep 05 ?        0:00 ora_cjq0_xxx
  oracle  3296     1  0   Sep 05 ?        2:35 ora_lgwr_xxx
  oracle  3298     1  0   Sep 05 ?        7:08 ora_ckpt_xxx
  oracle  3310     1  0   Sep 05 ?        0:02 ora_arc1_xxx
  oracle  3300     1  0   Sep 05 ?        1:32 ora_smon_xxx
  oracle  3306     1  0   Sep 05 ?        0:11 ora_qmn0_xxx
  oracle  3308     1  0   Sep 05 ?        0:05 ora_arc0_xxx
$

Anyway, the oracle background processes will be running even if the instance is in nomount state (i.e. even if the database is not accessible).
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to check running processes on remote server.

Hi, I am trying to write a script, which queries a db to get the names of processes, stores it in a file and then checks if that process is running on a remote server. However I am not getting it right, could anyone help me out. #!/bin/sh echo "select Address from Device where Cust =... (5 Replies)
Discussion started by: amitsayshii
5 Replies

2. Shell Programming and Scripting

check if file exists on remote system ?

Hi there, I am designing a software rollout script and need to check if a particular file exists on a remote system something along the lines of if ; then blah blah The above doesnt work but you get the general idea....is there a way I can do this on a single line ?? any help would... (2 Replies)
Discussion started by: hcclnoodles
2 Replies

3. UNIX for Advanced & Expert Users

Check EOF char in Unix. OR To check file has been received completely from a remote system

Advance Thanks. (1) I would like to know any unix/Linux command to check EOF char in a file. (2) Or Any way I can check a file has been reached completely at machine B from machine A. Note that machine A ftp/scp the file to machine B at unknown time. (5 Replies)
Discussion started by: alexalex1
5 Replies

4. Solaris

how to login with ssh to remote system with out applying the remote root/usr password

how to login with ssh to remote system with out applying the remote root/user password with rlogin we can ujse .rhosts file but with ssh howits possible plz guide (2 Replies)
Discussion started by: tv.praveenkumar
2 Replies

5. Infrastructure Monitoring

Using SNMP to monitor remote processes and disk space

snmpget -v 1 -c COMMUNITYSTR hostname OID what OIDs would I use to get information on all the processes and disk space information that are on a particular host. where can i find out information on all of this? thanks (3 Replies)
Discussion started by: SkySmart
3 Replies

6. Shell Programming and Scripting

csh Check if file exists on remote system

I've seen this question posed a few times with shell scripting, but have not found anything with csh. I am trying to download multiple txt files from a source using wget. These are archived tornado warning files; however, the files only exist if there were tornado warnings issued that day. I'm... (3 Replies)
Discussion started by: meteorologistks
3 Replies

7. Shell Programming and Scripting

Remote nodes - login and find number of processes

Hello all, This is my requirement: 1. I have 6 VMs running Apache (for Oracle EBS) as Linux user oracle. 2. From a central server (VM), I need to login to all the 6 VMs as oracle user (I have already set up ssh equivalence, so it is password less authentication). 3. Find the number of... (4 Replies)
Discussion started by: sunpraveen
4 Replies

8. Shell Programming and Scripting

Pause processes in remote host and resume execution in another remote host

Hi, Given addresses of 2 remote machines, using a shell script is it possible to get the state of running processes in "src" stop all the processes in "src" exit out of "src" ssh into "dest" resume the state of executing processes captured in step 1 in "dest" Assumption: "src" is... (3 Replies)
Discussion started by: Saeya Darsan
3 Replies

9. Shell Programming and Scripting

Check/get the exit status of a remote command executed on remote host through script

Geeks, Could you please help me out in my script and identify the missing piece. I need to check/get the exit status of a remote command executed on remote host through script and send out an email when process/processes is/are not running on any/all server(s). Here's the complete... (5 Replies)
Discussion started by: lovesaikrishna
5 Replies

10. UNIX for Beginners Questions & Answers

Check processes running on remote server

Hello Guys, I need some help to find out if processes are running on remote server or not. I could do 'ssh' to do that but due to some security reasons, I need to avoid the ssh & get result from remote server. Could you please suggest some that can be done without ssh or similar sort of... (8 Replies)
Discussion started by: UnknownGuy
8 Replies
UNBUFFER(1)						      General Commands Manual						       UNBUFFER(1)

NAME
unbuffer - unbuffer output SYNOPSIS
unbuffer program [ args ] INTRODUCTION
unbuffer disables the output buffering that occurs when program output is redirected from non-interactive programs. For example, suppose you are watching the output from a fifo by running it through od and then more. od -c /tmp/fifo | more You will not see anything until a full page of output has been produced. You can disable this automatic buffering as follows: unbuffer od -c /tmp/fifo | more Normally, unbuffer does not read from stdin. This simplifies use of unbuffer in some situations. To use unbuffer in a pipeline, use the -p flag. Example: process1 | unbuffer -p process2 | process3 CAVEATS
unbuffer -p may appear to work incorrectly if a process feeding input to unbuffer exits. Consider: process1 | unbuffer -p process2 | process3 If process1 exits, process2 may not yet have finished. It is impossible for unbuffer to know long to wait for process2 and process2 may not ever finish, for example, if it is a filter. For expediency, unbuffer simply exits when it encounters an EOF from either its input or process2. In order to have a version of unbuffer that worked in all situations, an oracle would be necessary. If you want an application-specific solution, workarounds or hand-coded Expect may be more suitable. For example, the following example shows how to allow grep to finish pro- cessing when the cat before it finishes first. Using cat to feed grep would never require unbuffer in real life. It is merely a place- holder for some imaginary process that may or may not finish. Similarly, the final cat at the end of the pipeline is also a placeholder for another process. $ cat /tmp/abcdef.log | grep abc | cat abcdef xxxabc defxxx $ cat /tmp/abcdef.log | unbuffer grep abc | cat $ (cat /tmp/abcdef.log ; sleep 1) | unbuffer grep abc | cat abcdef xxxabc defxxx $ BUGS
The man page is longer than the program. SEE ALSO
"Exploring Expect: A Tcl-Based Toolkit for Automating Interactive Programs" by Don Libes, O'Reilly and Associates, January 1995. AUTHOR
Don Libes, National Institute of Standards and Technology 1 June 1994 UNBUFFER(1)
All times are GMT -4. The time now is 12:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy