How to get the operating system version and host name remotely under Windows and Linux

Source: Internet
Author: User
Tags snmp

The following conditions are required to remotely obtain the Windows and Linux operating system versions and host names:

Assume

Host A (Windows 7), ip:192.168.12.2

Host B (CentOS 6.3), ip:192.168.12.3

Host C (Windows 2008)-a host for remote access to information, ip:192.168.12.4

Host d (CentOS 6.3)-For remote access to information for the host, ip:192.168.12.5

Windows:

1. Host A can ping through host C;

2. Host B can ping through host C;

3. Host B can communicate with host C via the SNMP protocol via 161 ports;

Linux:

1. Host B can ping through host D;

2. Host B can communicate with host D through the SNMP protocol via 161 ports;

3. The community name of host D can be obtained in some way;

4. Be sure to use Nagios before use.


Window Information Acquisition Method:


Get host name with Mac:

Execute from a


Get System Version information:

Execute from B

/usr/local/nagios/libexec/check_snmp-h 192.168.12.4-c Public-o sysname.0

/usr/local/nagios/libexec/check_snmp-h 192.168.12.4-c Public-o sysdescr.0




How to obtain Linux information:

Execute on B

/usr/local/nagios/libexec/check_snmp-h 192.168.12.5-c Public-o sysdescr.0

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.