I heard about some global commands for information gathering in UNIX systems. some commands which will execute on a UNIX system in a local network and other systems will reply to these command with some information about themselves.
for example, from one of those UNIX machines (in a computer network) we run "bg" command and then we can see background processes from all UNIX machines on that network!
Is it true? and, if it is true so, Why I couldn't see those information now?
As far as I know, there's no such command. And especially bg won't do that, since it's not even a system command, but a shell builtin that can't even see the background processes of other shells on the same system.
I used "bg" just as an example to describe my question.
So, are you saying that there is no "Information Gathering Command" in UNIX at all? (I don't know the exact name, I mean any command which could execute on other systems With Out authentication)
p.s:
We can execute many commands on a remote system using rsh/ssh but then we must authenticate ourselves as a privileged user! in my question (as I heard) I'm trying to find some commands which could be executed with out those authentication.
Also, I found that there is an "on" command! which can 'Execute a command on a remote system, but with the local environment'. I think this will not prompt for any password! (But I'm not sure).
There was something of the sort on IBM AIX if you had a SP2 with a few nodes, but that ages since last time I saw one... I think you launched on the SP console a command called perspectives but more knowledgeable AIX gurus could confirm as I have poor memory...
SP systems had a few "parallel" commands (you could execute at the console for specified nodes, without passwd for you were to use kerberos...)
---------- Post updated at 16:17 ---------- Previous update was at 16:02 ----------
Do a search on PSSP (Parallel System Support program) IBM AIX...
It is possible to write your own dsh (distributed shell). Building on top of dsh I wrote a script gdsh (global dsh, I called it). It uses ssh to run commands on any OS (AIX, HP-UX, Linux).
So, on my MS (management station (CSM), same as CWS for PSSP), I can run my script, gdsh, and run commands on any or all of my Unix/Linux servers.
gdsh is just a shell wrapper for ssh. It's output is also compatible with dshbak.
the idea behind the script was to replicate what dsh does AIX on all my servers.
The script is nothing special. It's just a loop around ssh. However simpler, it is also very powerful.
Here is how it works:
gdsh
Usage: [[-s working_col_file|OS_name] | -w nodename{,nodename}] -c command
Optional Parameters:
[-d] [-h] [-n] [-T] [-v]
Where:
-C
Collapses output. Used with dshbak.
-c specifies the command to run
Required.
-d
Debug mode.
-h
Prints this help screen.
-n
No Parallel mode. By default the command is run on every node at the same time.
-s
Specify a working collective file OR specify an OS name. Use uname -s to specify
a working collective file with that postfix. ie. /.gwcoll.AIX.
-T
Testing mode. NO actual work will be done.
-v
Verbose mode.
-w nodename{,nodename}
Default: ALL nodes
Notes:
One of -s or -w is required.
Piping the output to dshbak -c will group like results together.
Use -C with dshbak, or you will get no output.
Example execution statements:
gdsh -s /.gwcoll.AIX -c date
gdsh -s AIX -c date
gdsh -C -s AIX -c date | dshbak -c
gdsh -s all.Linux_HP-UX -c date
gdsh -C -w n,005 -c "date" | dshbak -c
Here's a real example (I did change the host names):
In order to make this work I had to setup a separate physical network.
I then run a second SSH daemon.
I had to do those two things because I have different security on this interface and a different ssh configuration.
---------- Post updated at 04:15 PM ---------- Previous update was at 02:42 AM ----------
Did anyone knows anything about "Remote process management" in UNIX? I need to know how does it work (In detail)?
For example What is the name of server deamon on remote host? or Which data structures are initializing during this process?