I know this is a very basic question but i was not aware since i'm new to SNMP stuff.So, is there any minimum timeout for SNMP based on version if so can you please specify the version and the timeout in seconds.
As #LexLi mentioned, You need to be more specific about which timeouts are You asking. And, he is right, there is no dependency between version and timeout.
snmpcmds like snmpwalk\snmpget\snmpset... have timeout
((retries+1) x timeout_between_retries) seconds, which is (5+1) x 1 = 6 seconds
by default. Both parameters could be changed by either command line
or snmp.conf.
Example:
snmpwalk -v2c -cpublic -r1 -t10 host OID
The maximum timeout here will be 20 seconds because we will send 2 queries with the timeout between them is 10 seconds.
Also there is agentXTimeout and agentXRetries, which are defining timeout for AgentX requests between masterAgent and subAgent. Values are the same: 5 times and 1 second ,respectively. Those values could be changed by the command line or in the snmpd.conf.
Related
Is there a way to automatically restart nginx with monit when it doesnt respond with status 200
The server seems to handle most of the requests but tends to lock up for a minute or two when it gets overwhelmed with requests. So I would like to have it check if the request responds to 504/502 to restart nginx
A simple sample to handle nginx is available from https://mmonit.com/wiki/Monit/ConfigurationExamples#NginX
and from https://www.mmonit.com/monit/documentation/monit.html#CONFIGURATION-EXAMPLES
some other samples are available.
And there are general information about handling the http status code from https://www.mmonit.com/monit/documentation/monit.html#HTTP
You can setup the Monit to test in shorter intervals, but one or two minutes is a good interval size (in general, from my point of view). In the Monit configuration monitrc file you can use a shorter interval.
set daemon 60 # check services at 60 seconds intervals
But you should not use a interval below 30 seconds (I prefer 60 seconds).
There is one dynamic send port (Req/response) in my orchestration.
Request is sending to external system and accepting response in orch. There is a chance the external system have monthly maintenance of 2 days. To handle that scenario
Retry interval if I set to 2 days is it impacting the performance? Is it a good idea?
I wouldn't think it is a good idea, as even a transitory error of another type would then mean that message would be delayed by two days.
As maintenance is usually scheduled, either stop the send port (but don't unenlist) or stop the receive port that picks up the messages to send (preferable, especially if it is high volume), and start them again after the maintenance period.
The other option would be to build that logic into the Orchestration, that if it catches an exception that it increased the retry interval on each retry. However as above, if it is high volume, you might be better off switching of the receive location, as otherwise you will have a high number of running instances.
Set a service interval at the send port if you know when the receiving system will be down. If the schedule is unknown I would rather set:
retry count = 290
retry interval = 10 minutes
to achieve that the messages will be transmitted over two days.
According to the manual page for recv(), errno is set to EAGAIN or EWOULDBLOCK if a timeout has been set for receive using setsockopt(SO_RCVTIMEO).
My question is what happens if multiple such sockets are used with select(). Would select return if one of the socket times out due to inactivity. What would be returned by select().
I am trying to implement a tftp server with feature to detect timeouts. One way could be to use a timeout with select() but then I would have to use a different value of timeout for each socket and keep updating the timer to the minimum value, and then do some more juggling.... etc.. etc... Just feels like a lot of unnecessary work.
PS: The tftp server is a concurrent server with multiple clients being handled using I/O Multiplexing.
The timeout parameter of select() determines the maximum time that the select() call itself will wait for something to happen before the call returns, not how long individual sockets will wait before returning a timeout error.
It sounds like you are wanting to declare some kind of an error condition if you don't hear from a client for some period of time. With UDP, you will have to keep track of that yourself. For each client, keep a record of the last time you heard from it. Put select() in a loop with a timeout of something like 1 second, then every time it returns check the difference between the current time and the last time you heard from each client. When that difference exceeds whatever threshold you want, you have your error condition.
I use jmeter HTTP Sampler to test a sequence of HTTP requests and choosed "Use KeepAlive". But a few threads Jmeter closed connection with TCP FIN before all
requests send out.
As the picture shown, 172.19.0.101 is Jmeter,172.19.0.111 is the server. The rest of requests can be only send in a new connection and they are out of session.
It can be of two reasons:
First reason - timeout
whether timeout is reached (default value is 60 seconds, and configurable. If not configured, it uses the connectionTimeout parameter value in tomcat server).
the default connection timeout of Apache httpd 1.3 and 2.0 is as
little as 15 seconds and just 5 seconds for Apache httpd 2.2 and
above
I observed that the request got the response after 10 seconds (15 -> 29 seconds) before sending FIN signal to terminate the connection.
References:
https://tools.ietf.org/id/draft-thomson-hybi-http-timeout-01.html#p-timeout
https://en.wikipedia.org/wiki/HTTP_persistent_connection
https://tomcat.apache.org/tomcat-7.0-doc/config/http.html
Second reason - 'max' Parameter
May be it reached the number of requests that can be sent on a single Persistent Connetion.
https://tools.ietf.org/id/draft-thomson-hybi-http-timeout-01.html#p-max
Set Implementation in HTTP Samplers to HTTPClient4 and try.
From JMeter HTTP Sampler documentation.
JMeter sets the Connection: keep-alive header. This does not work properly with the default HTTP implementation, as connection re-use is not under user-control. It does work with the Apache HttpComponents HttpClient implementations.
Find the jmeter.properties file in jmeter5.4.1, which describes the parameters during iteration:
# Reset HTTP State when starting a new Thread Group iteration which means:
# true means next iteration is associated to a new user
# false means next iteration is associated to same user
# true involves:
# - Closing opened connection
# - resetting SSL State
#httpclient.reset_state_on_thread_group_iteration=true
set
httpclient.reset_state_on_thread_group_iteration=false
I am new to and working on asterisk.
How to Capture the Reverse Signal in Asterisk,
Currently I am receiving the disposition as NA-No Answer Auto Dial for all unreached calls where I should receive as follows
No Answer,
Busy,
Not Reachable,
Switched Off.
Currently using vicidial: 2.2.1
Vicidial use app_AMD
Synopsis
Attempts to detect answering machines.
Description
AMD([|initialSilence][|greeting][|afterGreetingSilence][|totalAnalysisTime][|minimumWordLength][|betweenWordsSilence][|maximumNumberOfWords][|silenceThreshold])
This application attempts to detect answering machines at the beginning of outbound calls.
Simply call this application after the call has been answered (outbound only, of course).
When loaded, AMD reads amd.conf and uses the parameters specified as default values.
Those default values get overwritten when calling AMD with parameters.
'initialSilence' is the maximum silence duration before the greeting. If exceeded then MACHINE.
'greeting' is the maximum length of a greeting. If exceeded then MACHINE.
'afterGreetingSilence' is the silence after detecting a greeting. If exceeded then HUMAN.
'totalAnalysisTime' is the maximum time allowed for the algorithm to decide on a HUMAN or MACHINE.
'minimumWordLength'is the minimum duration of Voice to considered as a word.
'betweenWordsSilence' is the minimum duration of silence after a word to considere the audio what follows as a new word.
'maximumNumberOfWords'is the maximum number of words in the greeting. If exceeded then MACHINE.
'silenceThreshold' is the silence threshold.
This application sets the following channel variable upon completion:
AMDSTATUS - This is the status of the answering machine detection.
Possible values are:
MACHINE | HUMAN | NOTSURE | HANGUP
AMDCAUSE - Indicates the cause that led to the conclusion.
Possible values are:
TOOLONG-<%d total_time>
INITIALSILENCE-<%d silenceDuration>-<%d initialSilence>
HUMAN-<%d silenceDuration>-<%d afterGreetingSilence>
MAXWORDS-<%d wordsCount>-<%d maximumNumberOfWords>
LONGGREETING-<%d voiceDuration>-<%d greeting>
http://www.voip-info.org/wiki/view/Asterisk+cmd+AMD