Re: SNMPd reports high memory usage by adding buffers+cache

2015-06-15 Thread Niels Baggesen
On Sat, Jun 13, 2015 at 04:02:01PM -, Himanshu  Pandey wrote:
 Hi Friends,
 Our SNMPd service reports memory usage including buffers+cache, and
 the result is always high because kernel uses all available memory to
 speed up disk reads. Buffers+cache can be freed by kernel whenever
 applications needs it.Is this the behaviour of our SNMPd memory usage
 reporting.Please explain and clarify.

We return exactly the same basic numbers as the standard Linus free
command, and that is the best we can do.
It is then up to you to interpret these numbers, possibly by adding
buffers and cached to free, but we give you the needed numbers.

From my own server:

[nba@server nba]$ snmpwalk localhost memory
UCD-SNMP-MIB::memIndex.0 = INTEGER: 0
UCD-SNMP-MIB::memErrorName.0 = STRING: swap
UCD-SNMP-MIB::memTotalSwap.0 = INTEGER: 6078460 kB
UCD-SNMP-MIB::memAvailSwap.0 = INTEGER: 5819652 kB
UCD-SNMP-MIB::memTotalReal.0 = INTEGER: 3835236 kB
UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 720412 kB
UCD-SNMP-MIB::memTotalFree.0 = INTEGER: 6540064 kB
UCD-SNMP-MIB::memMinimumSwap.0 = INTEGER: 16000 kB
UCD-SNMP-MIB::memShared.0 = INTEGER: 44504 kB
UCD-SNMP-MIB::memBuffer.0 = INTEGER: 409828 kB
UCD-SNMP-MIB::memCached.0 = INTEGER: 575148 kB
UCD-SNMP-MIB::memSwapError.0 = INTEGER: noError(0)
UCD-SNMP-MIB::memSwapErrorMsg.0 = STRING: 
[nba@server nba]$ free
 total   used   free sharedbuffers cached
Mem:   38352363112304 722932  44512 409836 576300
-/+ buffers/cache:21261681709068
Swap:  6078460 2587845819676

/Niels

-- 
Niels Baggesen - @home - Ã…rhus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


pass_persist and session information

2015-06-15 Thread Powrie , William
Hi,

I am using version 5.4.2.1 that services SNMP version 3 requests (both Auth and 
Priv), but have run into a problem with an external application I am writing. 
It is on the server side and uses pass_persist to interact with an external 
PostgreSQL database. This part is currently working well.

However, the application needs to know the user (securityName) associated 
with the SNMP request and display this information for all to see. It has the 
concept of only allowing a single user to have write control at a point in time 
and that user name needs to be visible to all other logged in users who need 
write access to the system. The process of obtaining and releasing write 
control are both performed via separate  SNMP requests.

I have looked for the session information in pass_persist.c but it does not 
appear to be available.

Does anyone know a way I can get the securityName from within pass_persist.c? 
If this is not possible, then modifying the code may be the way to go. Any 
pointers or suggestions as to what I would need to change would be highly 
appreciated.

I have tried some experimentation code changes using 
netsnmp_query_get_default_session() and netsnmp_ds_get_string() from within 
pass_persist.c, but with no success. I am very much a novice to the 5.4.2.1 
code and at this stage need some help.

Best Regards,

William Powrie


Este correo electr?nico y, en su caso, cualquier fichero anexo al mismo, 
contiene informaci?n de car?cter confidencial exclusivamente dirigida a su 
destinatario o destinatarios. Si no es vd. el destinatario indicado, queda 
notificado que la lectura, utilizaci?n, divulgaci?n y/o copia sin autorizaci?n 
est? prohibida en virtud de la legislaci?n vigente. En el caso de haber 
recibido este correo electr?nico por error, se ruega notificar inmediatamente 
esta circunstancia mediante reenv?o a la direcci?n electr?nica del remitente.
Evite imprimir este mensaje si no es estrictamente necesario.

This email and any file attached to it (when applicable) contain(s) 
confidential information that is exclusively addressed to its recipient(s). If 
you are not the indicated recipient, you are informed that reading, using, 
disseminating and/or copying it without authorisation is forbidden in 
accordance with the legislation in effect. If you have received this email by 
mistake, please immediately notify the sender of the situation by resending it 
to their email address.
Avoid printing this message if it is not absolutely necessary.
--
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders