nieters@copernicus.crd.ge.com (coolbean) (08/31/90)
hi Does anyone know of a way (either via a C system call or an existing Unix program) to determine if a given machine name is a) a server or a client and b) if it is a client, what its server is? I'm after a program to do something like this % program machine "machine" is a server - OR - "machine" is a client of "server-machine" Looking through man pages, I see plenty of ways to deal with the current host or finding a machine's aliases, IP address, etc. but no information on who (if anyone) is its server. tnx. --ed -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Ed Nieters INTERnet: nieters@crd.ge.com GE Corporate R&D UUCPnet: uunet!crd.ge.com!nieters Schenectady, NY 12301 BELLnet: (518) 387-5187
jeff@onion.pdx.com (Jeff Beadles) (09/02/90)
nieters@copernicus.crd.ge.com writes: > Does anyone know of a way (either via a C system call or >an existing Unix program) to determine if a given machine name is >a) a server or a client and b) if it is a client, what its server is? Are you talking about a diskless workstation and/or server? If so, then the output of the "df" command should be radically different. Or, from a C program, you can do a "statfs" on "/", and look at the resulting statfs structure. Man page references: df(1), statfs(2) Hope this helps-- -Jeff -- Jeff Beadles jeff@onion.pdx.com