Checking running process status using "grep" on multiple servers in load sharing system.

Login or Register for Dates, Times and to Reply

Thread Tools Search this Thread
# 1  
Checking running process status using "grep" on multiple servers in load sharing system.

Suppose i have 3 different servers say x,y and z.

Im running some process say ABC and 40 instances for the same is being created.
In load sharing suppose on
server x, 20 instances are running
server y, 10 instances are running
server z, 10 instances are running.

While checking the running status on server z, using command ps -ef | grep ABC |wc -l

it shows 10 instances. Is there any way to get the count of instances running on servers x and y on server z.

if i run command on server z
ps -ef | grep ABC | wc -l

it shows me 40 instances.

Thanx in advance.

Last edited by Franklin52; 02-19-2013 at 04:59 AM.. Reason: Please use code tags for data and code samples
# 2  
Without seeing the unfiltered ps output, I cannot possibly say why it's matching 40 times.

You should be doing pgrep, not ps | grep, incidentally.
Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #621
Difficulty: Medium
There is no switch statement in Python.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

What does "force devmap reload" as in "multipath -r" means for my system and stability of my system?

Cannot present unpresented disks back again. On a test server tried this as a solution "multipath -r" and it worked. Too worried to try it in production before I know all the information. Any info would be appreciated! Also some links to the documentation on this specific issue could help a... (1 Reply)
Discussion started by: jsteppe
1 Replies

2. Solaris

Means to check if some process is running on "n" number of machines

Team, I would like to know, if we have any command in Solaris to verify, if some process is listening on a port on a set of machines. for eg: Wrote the below script, and found that when a process is listening on that port, then it just waits there and doesnt come out. Rather, I would like... (6 Replies)
Discussion started by: msgforsunil
6 Replies

3. Shell Programming and Scripting

grep with "[" and "]" and "dot" within the search string

Hello. Following recommendations for one of my threads, this is working perfectly : #!/bin/bash CNT=$( grep -c -e "some text 1" -e "some text 2" -e "some text 3" "/tmp/log_file.txt" ) Now I need a grep success for some thing like : #!/bin/bash CNT=$( grep -c -e "some text_1... (4 Replies)
Discussion started by: jcdole
4 Replies

4. SCO

Stop boot system at "Checking protected password and checking subsystem databases"

Hi, (i'm sorry for my english) I'm a problem on boot sco unix 5.0.5 open server. this stop at "Checking protected password and checking subsystem databases" (See this image ) I'm try this: 1) 2) SCO: SCO Unix - Server hangs... (9 Replies)
Discussion started by: buji
9 Replies

5. HP-UX

BOGGLED!! User information incorrect when viewing "ps" Process Status

Hello Anyone: I have run into an issue that I have never seen or heard of. Recently on a specific server I have encountered a random issue that I've not been able to repliate on demand... When I view the processes status of a certain process, the information returned to the screen has a... (2 Replies)
Discussion started by: DEN1022
2 Replies

6. Solaris

"Load Average" vs "virtual processor"

Hi, I have one question regarding the understanding of “load average” in a platform with virtual processors. Suppose in this situation: Total number of physical processors: 1 Number of virtual processors: 32 Total number of cores: 4 Number of cores per physical... (1 Reply)
Discussion started by: MDING
1 Replies

7. UNIX for Dummies Questions & Answers

Sendmail process "Toomany" system slowing down

Hello Experts I have M4000 Solaris 10 server, from few many days there are too many sendmail and mail.local process starting on server and each time i need to kill mannualy using pkill send mail, some time there will 600 of them taking 30mb memory for each and hence slowing down the server,... (2 Replies)
Discussion started by: karghum
2 Replies

8. Shell Programming and Scripting

ps -ef | grep "string1" "string2" " "string3"

Hi all, can any one suggest me the script to grep multiple strings from ps -ef pls correct the below script . its not working/ i want to print OK if all the below process are running in my solaris system. else i want to print NOT OK. bash-3.00$ ps -ef | grep blu lscpusr 48 42 ... (11 Replies)
Discussion started by: steve2216
11 Replies

9. Shell Programming and Scripting

Command to find out "count" of running process ?

Hello Experts, Can any one help me out to find the command to get "count" of number of processes running in system. Basically i want to write one crone job to kill some process which making my system hanged. so have to do following things. 1) Find out the number of processes is running.... (4 Replies)
Discussion started by: MITESH KOTHARI
4 Replies

10. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep ""|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep ""|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

Featured Tech Videos