System Name (sysname) does not match with hostname in Linux box
search cancel

System Name (sysname) does not match with hostname in Linux box

book

Article ID: 5059

calendar_today

Updated On:

Products

CA Systems Performance for IM (SystemEdge) CA eHealth

Issue/Introduction

After discovering/modeling a Linux host with SystemEDGE agent, the System Name (sysname) field has the following value: localhost.localdomain 

The hostname command line returns the correct host name value.

Environment

SystemEDGE 5.x

Resolution

1. Navigate to the <SystemEDGE_HOME_directory>/bin/ directory 

 

2. Run snmpget to get the value of the sysName (1.3.6.1.2.1.1.5): 

./snmpget -p <port> -c <SNMP_Community_Name> -o <OID> (syntax) 

./snmpget -p 1691 -c private -o 1.3.6.1.2.1.1.5.0 (example) 

./snmpget -p 169 -c private -o 1.3.6.1.2.1.1.5.0 (example) 

 

You should get: 

1.3.6.1.2.1.1.5.0 localhost.localdomain 

 

3. Run snmpset to set a new value for the sysName (1.3.6.1.2.1.1.5): 

./snmpset -p <port> -c <SNMP_Community_Name> -o <OID> (syntax) 

./snmpset -p 1691 -c private -o 1.3.6.1.2.1.1.5.0 -s "redhatlinux208" (example) 

./snmpset -p 169 -c private -o 1.3.6.1.2.1.1.5.0 -s "redhatlinux208" (example) 

 

4. Run snmpget to confirm whether the new value was set successfully: 

./snmpget -p <port> -c <SNMP_Community_Name> -o <OID> (syntax) 

./snmpget -p 1691 -c private -o 1.3.6.1.2.1.1.5.0 (example) 

./snmpget -p 169 -c private -o 1.3.6.1.2.1.1.5.0 (example)