Is there any global command in UNIX?

Hi,

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?

Any help would be greatly appreciated.

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.

Thank you very much for this super fast answer,

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.

If this were a quiz question I'd answer "finger".

Many Systems Administrator disable "fingerd" for this reason.

No :slight_smile: It's not my homework or anything like that. It's just for my own knowledge.

Thank you for this clue, I will take a look at commands like finger and I will come back if I couldn't find the answer.

p.s:
Any further information about this topic would be greatly appreciated :wink:

In addition to methyl answer, there are also the similar rwho and ruptime programs both using the rwhod daemon.

Thanks! It would be helpful.

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...

Good luck

I think it could be which I've looking for! (cause the man who told me about this was talking about old Unix systems).

Thanks, I'm doing that right now :wink: (I will reply if I find something useful)

http://publib.boulder.ibm.com/infocenter/clresctr/vxrx/index.jsp?topic=/com.ibm.cluster.pe.doc/pe_422/am10200438.html

---------- Post updated at 06:59 PM ---------- Previous update was at 06:51 PM ----------

I think this could be the answer but I must read it carefully:

http://publib.boulder.ibm.com/infocenter/clresctr/vxrx/index.jsp?topic=/com.ibm.cluster.pssp.doc/pssp35/am0crmst/am0crmst09.html

That is it but start at the beginning..
I remember now the shell - dsh which was like-but-not rsh for distributed-sh
Was fun ( I worked on a SP2 frame 10 years ago...)
DSH Simplifies the Task of Managing Multiple Systems | AIX | IBM Systems Magazine

AIX systems still have dsh under CSM (AIX 5.3).

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.

Thanks vbe, for your help and support :wink:

I will read it ASAP.

---------- Post updated at 08:47 PM ---------- Previous update was at 08:45 PM ----------

Dear purdym,
could you please give me your Global DSH script? (Or at least describing it's mechanism with more details?)

Thank you in advance :wink:

Hi siavash,

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):

gdsh -C -c "uname -s" | dshbak -c
HOSTS -------------------------------------------------------------------------
d, iq, m, p, r, t, z
-------------------------------------------------------------------------------
AIX


HOSTS -------------------------------------------------------------------------
001, 002, 003, u04, 005, 006, 007, 010, 011
-------------------------------------------------------------------------------
HP-UX


HOSTS -------------------------------------------------------------------------
101
-------------------------------------------------------------------------------
Linux

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.

Thank you very much,
I got the Idea behind that script :slight_smile:

Google came up with some interesting finds

wow!
I owe you one :wink:

---------- 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?

(I know that UnixWare 7.1.4 has it)