Re: System MIB :: SysName, SysLocation is not overwriting

Venkateswarlu Konamki <[email protected]>
Newsgroups gmane.network.net-snmp.devel
Message-ID <CADWLQuY3TJH5i12mz5UUy-2MeFOqRErcpczULf1MkyT9REjo5g@mail.gmail.com>
Hi Dan Pattison,
In my machine i don't have /etc/hostname .But i am reading hostname from my
API and updating it in sysName before calling the
netsnmp_create_update_handler_registration
 But i am seeing that when i do snmpwalk it's directly calling
netsnmp_create_update_handler_registration
API. Suspecting that due to this one its not updating the sysName. Same
behavior i am seeing for sysLocation and sysContact also.

Thanks,

Venkateswarlu.K


On Mon, May 20, 2019 at 10:16 AM Dan Pattison <[email protected]>
wrote:

> Hello Venkat,
>
> Are you changing the hostname by editing the /etc/hostname file directly
> or by using the hostname command?
>
> Regards,
>
> Dan Pattison
>
> On 2019-05-19 9:04 p.m., Venkateswarlu Konamki wrote:
>
> Hi All,
> Any update on this issue?
>
> Thanks,
> Venkat
>
>
> On Thu, May 16, 2019 at 10:40 AM Venkateswarlu Konamki <
> [email protected]> wrote:
>
>> Hi All ,
>>
>> I am facing issue with in system_mib with SysName and SysLocation.
>>
>> Recently i have upgraded net-snmp version from 5.3.01 to 5.7.3. In 5.7.3,
>> if i see the code is system_mib  there are changes happened for handling
>> the mibs.
>>
>> First time when i am doing snmp walk i am able to get the correct
>> hostname and syslocation.
>> Next i have changed the hostname with CLI (not via snmpset).  when i do
>> snmpwlak or get, hostname is still showing the old name.
>>
>> *Before changing the hostname : *
>> # snmpget -v2c -c test localhost   .1.3.6.1.2.1.1.5.0
>> .1.3.6.1.2.1.1.5.0 = STRING: "Venkat_Desktop"
>> #
>> administrator@Venkat:~$ hostname
>> Venkat_Desktop.
>>
>> *After changing the hostname from Venkat_Desktop to "Venkat_machine"*
>> # snmpget -v2c -c test localhost   .1.3.6.1.2.1.1.5.0
>> .1.3.6.1.2.1.1.5.0 = STRING: "Venkat_Desktop"
>> #
>> administrator@Venkat:~$ hostname
>> Venkat_machine.
>>
>> It is reflecting in hostname, but when i do via snmp it is still showing
>> the old hostname.
>>
>> I am notable to find the root cause for this one.
>>
>> Is any one faced same issue ? if yes. what is the fix for this ? Please
>> help on this
>>
>>
>> Thanks,
>>
>> Venkat
>>
>
>
> _______________________________________________
> Net-snmp-coders mailing [email protected]://lists.sourceforge.net/lists/listinfo/net-snmp-coders
>
>
> _______________________________________________
> Net-snmp-coders mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
>

_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.