04-11-2012
By "running" I think you mean the machine is licensed for something and could run it. But you get false negatives.
If your company installed everything then you have a very high probability that there is commonality in naming conventions. The default WebLogic owner uid is wls, so if there is a WLS user, apache has to be there as well. Directory names will be there, like for oracle certain lower level names like libclntsh will only exist on a box that can run oracle as either a client or a server, or, /var/opt/oracle/oratab will have entries that end in :Y os :S for boxes that actively run an orcacle database or a standby and so are oracle servers.
Therefore - you need to logically create a set of queries a means of determining, yes this has jboss or not. And the method does not always depend on what users are running but usually depends on what exists in /etc/passwd, /etc/group, /var/opt/... etc.
This is like one of those puzzles where you work out what has to exist by a small numbers of observations. The most dependable are: names of certain files, usernames, some group names, if you are lucky sometimes a daemon with a fixed name will be running full time.
This User Gave Thanks to jim mcnamara For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I would like to allow only one instance of a script to run at any moment.
I've tried the following solution to count the instances but the result is always the number of running instances plus one and I can't find the problem
ps -ef | grep $0 | sed '/^$/ d' | sed '/grep/ d' | wc -l
Please... (2 Replies)
Discussion started by: oti
2 Replies
2. Shell Programming and Scripting
Hello,
I'm trying to write a script that checks for previous instances of the same script which may still be running (this script is scheduled to run every 30 minutes). I want to somehow use the pid from each instance to make sure the previous one isn't running before continuing with my... (5 Replies)
Discussion started by: bd_joy
5 Replies
3. AIX
hi,
i am new to AIX and to this forum as well. Can you please help me out with following issue/requirement
1) I have one physical volume (pv1) (a scsi disk). (pv1) on 1st AIX machine. I have a single volume group on it(vg1).
2)I removed it from the 1st AIX machine and exported to the 2nd... (1 Reply)
Discussion started by: navadeep
1 Replies
4. UNIX for Advanced & Expert Users
if i have a script in my system which i need to run on remote system using ssh, how shall i do it?
One easy way to to first scp it to remote machine and then run it on remote machine using ssh.
Is there any one step way to do it. Preferably one in which i should give password only once (3 Replies)
Discussion started by: vickylife
3 Replies
5. Shell Programming and Scripting
Hi there
I have a script which is running a remote command on hundreds of boxes, it takes around 5 minutes to return an output from this command and because i am running this all from a central box, it goes off to each box in my for loop sequentially meaning that my script will wait for output... (5 Replies)
Discussion started by: hcclnoodles
5 Replies
6. UNIX for Advanced & Expert Users
Hi All,
This was an interview question
" There is a clean-up shell-script in one UNIX machine and it is connected to 100 other UNIX machines.
Howe can we run the script on all the 100 machines without ftping/copying the script to target machines ?
I was unable to answer, please answer if... (5 Replies)
Discussion started by: coolbhai
5 Replies
7. Shell Programming and Scripting
I'm likely going to explain this clumsily, so apologies in advance:
I have the following script:
#!/bin/bash
pidPrefix="logGen"
checkPrime ()
{
if /sbin/ifconfig eth0:0|/bin/grep -wq inet;then isPrime=1;else isPrime=0;fi
}
killScript ()
{
/usr/bin/find /var/run -name... (4 Replies)
Discussion started by: DeCoTwc
4 Replies
8. Shell Programming and Scripting
I have a list of URLs and I want to be able to count the number of instances of addresses ending in a certain TLD and output and sort it like so.
5 bdcc.com
48 zrtzr.com
49 rvo.com
Input is as so
ync.org
sduzj.edu
sduzj.edu
sduzj.edu
sduzj.edu
sduzj.edu
sduzj.edu
sduzj.edu... (1 Reply)
Discussion started by: Pjstaab
1 Replies
9. OS X (Apple)
I'm in a situation where I am executing a shell script(Bash) on another machine remotely using ssh, and for various reasons sometimes need to quit it and restart it. The shell script being run does many different things, so its hard to know what process to kill on the remote machine, and even if I... (2 Replies)
Discussion started by: TheDrizzle
2 Replies
10. Shell Programming and Scripting
Hi,
I'm using expect to ssh into remote machine (i know its not the best practice), and run script "script.sh".
This "script.sh" checks whether an other process (some another script) is running and if not, it runs it as some other user.
#!/bin/bash
/usr/bin/expect << EOD
set... (5 Replies)
Discussion started by: oseri
5 Replies