Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I want to know the os wheather rhel or ubuntu or other.we are having more than 1000 machine.So i can't login and check every machine. Is it possible to check all machines os names using single command or any tool? If yes please let me know
If you have console access to the machines, have them report the string from this command back:
Code:
uname -a
However unless these computers have some service that allows you to access them over the network or something that reports the OS name on the network then it's going to be difficult. You could try using the nmap network scanner. It can fingerprint an operating system on the network and return the OS name in some cases. The computer must be powered on and be connected to a network.
or just google search using nmap for OS detection. then just wrist a script with either all of the domain names of the servers or their IPs and send all of the data you require to a log file.
I want to know the os wheather rhel or ubuntu or other.we are having more than 1000 machine.So i can't login and check every machine. Is it possible to check all machines os names using single command or any tool? If yes please let me know
There are many options...nmap was mentioned, there's snmpwalk, fanout, etc.
However, if you're an administrator of more than 1000 machines, shouldn't you already have a monitoring solution in place, and easily be able to research this on your own? Don't you already HAVE scripts to help you in your job of maintaining over 1000 machines?
If you have console access to the machines, have them report the string from this command back:
Code:
uname -a
However unless these computers have some service that allows you to access them over the network or something that reports the OS name on the network then it's going to be difficult. You could try using the nmap network scanner. It can fingerprint an operating system on the network and return the OS name in some cases. The computer must be powered on and be connected to a network.
uname provides kernel info, not the "OS" you are running.
On RedHat-like systems try
Code:
cat /etc/*release*
If you can't find an automatic network OS-identification tool and you can't find the time to do every single machine your own, just employ a few students for a few hours doing it all manually for a few bucks. Might even be cheaper than hiring an experienced consultant writing a script for you or stumping your nose on the existing function in your existing monitoring system.
[root@CentOS6 ~]# uname -a
Linux CentOS6 2.6.32-358.14.1.el6.x86_64 #1 SMP Tue Jul 16 23:51:20 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Yes, it includes the distro name. But no distro version information. If it e.g. was a CentOS5 it could have been an earlier or later version. The differences between early and latest CentOS5 versions are quite noticable.
But it gives you a first idea, yes.
In your example it states Debian. From top of my head I wouldn't know which Debian release includes kernel 3.2.x (assuming the system runs the originally distro-included kernel version), but if it statet Woody or Wheezy I'd had a better idea of what it is. (ok, kernel 3.2.x wouldn't be in Woody)
well to kind of backup dt64 on uname not "really" providing distro info look at the Fedora uname, it tells you its f19, but only if you know what to look for and does not give any further info:
Code:
$ uname -a
Linux tracy.ssmahome 3.10.9-200.fc19.x86_64 #1 SMP Wed Aug 21 19:27:58 UTC 2013 x86_64 x86_64 x86_64 GNU/Li
now in the Fedora world you also have /etc/release its /etc/issue:
Code:
$ cat /etc/issue
Fedora release 19 (Schrödinger’s Cat)
Kernel \r on an \m (\l)
still not a great lot of info, but it is what it is.
provides the most amount of data. sadly this is not something you are going to run via a WAN/LAN without logging into a system, as ssh foo@server "bar" is still logging into a remote system even though it does not stay logged in.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.