Link to home
Start Free TrialLog in
Avatar of YZlat
YZlatFlag for United States of America

asked on

Get a list of UNIX servers via scripting

I need to retrieve a l;ist of all UNIX servers onm the network via UNIX script.  Can anyone point me in the right direction?
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

The best way is to contact your sys admins and ask them.

That said, check nmap:
http://nmap.org/book/man-os-detection.html

You probably won't get an inclusive list because I would hope the servers on your network were protected from this type of scanning.

Running a scanning tool like this can be against your corporate policies.  Check with your security folks to make sure you are allowed to do this.
What type of network do you have and are all the systems on the network are unix servers?

Do you know the range of IPs used on your network?
I think slighttwv covered most basis.

Another novice way is to use passive os detection with TTL packet.
Avatar of YZlat

ASKER

Not all servers are the UNIX servers, most are Windows servers
You can do a ping sweep. In general, TTL of 128 is Windows, 64 is Linux and 255 is Unix.
I should also point out that you will likely miss some servers that are protected by the network and of course, those powered down...

For example:  You have a Unix web server sitting in the DMZ.  I would hope your admins have that protected well enough that you will not be able to scan that server from the machine where you wish to run your script.

Mind if I ask what you are hoping to gain with this type of a script?
Avatar of YZlat

ASKER

I need to create a report that would consist of all the database servers and Oracle databases on them
"all the database servers" is different than "list of all UNIX servers".

"and Oracle databases on them" is a new requirement to the question.

I'm afraid that scripting this to be dynamic will be problematic, pretty intrusive and very time consuming.

How do you plan on getting database instances running on a server?

The things that you will miss:
1: I have a test server with 10 Oracle instances and the server is shut down when you run your script.

2: I have a server with 10 instances on it and 3 of instances are shut down.

This is on top of the issue of just scanning an entire network trolling for servers.  To repeat again: Most companies frown on this practice.

I would just ask your DBA's.  If you have been tasked with doing this then you should have the backing of Management which should have penalities for non-compliance to your requests.
Avatar of YZlat

ASKER

I can accomplish what I want by querying MGMT$TARGET management repository view. Any idea how can I do that?
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial