network-monitoring interview questions
Top network-monitoring frequently asked interview questions
I am trying to monitor calls from an app to my server just like Firebug does.
I could not find a way to see that in iOS Simulator or in xCode.
Is there a way to do that without sniffing all the traffic?
If no, what tool would you suggest?
Source: (StackOverflow)
I have a server that is running on django-nginx-gunicorn. I wish to monitor it's performance and get to know which module is using more resources, performance of the network etc.
I tried using Munin, which is pretty famous, but I couldn't get it to work with Django. So it'd be great of someone could help me setting up Munin on my Django-based server or suggest a similar alternate that can easily be incorporated with Django.
Source: (StackOverflow)
How can I access Ethernet statistics from C/C++ code like netstat -e?
Interface Statistics
Received Sent
Bytes 21010071 15425579
Unicast packets 95512 94166
Non-unicast packets 12510 7
Discards 0 0
Errors 0 3
Unknown protocols 0
Source: (StackOverflow)
i have several switches (Hirschmann Mach1040, RS40) connected together. So i want to elict the mac address/ip address of the connected neigbour switch on port x with the snmp. is there a lldp mib_value which tells me the neihbour mac or ip at the specific port on the swich??
Thanks a lot for the help!!!
Source: (StackOverflow)
I am attempting to implement some additional statistics gathering in a C# server application - I have about 20 or so variables I'd like to be able to report to network monitoring tools; so I am assuming (hopefully correctly) that SNMP is the correct way to go.
There are however two problems:
- The application is an open source server that cant include proprietary components, and
- It needs to run on Mono under *nix environs as well as Windows via .NET.
The "#SNMP" library at http://sharpsnmplib.codeplex.com/ appears to be a promising solution - but there are no samples I can find; and my knowledge of SNMP is lacking.
Does anyone here have any (quick) examples of reporting data via SNMP? (ideally using a library under the LGPL, X/MIT, BSD or Zlib licenses)
Help much appreciated
Edit:
The problem appears to be a lack of libraries capable of acting as SNMP servers, if anyone is aware of any - this would probably solve the problem nicely.
Edit #2:
Basically I'm looking for a SNMP server library or sample reference implementation.
Source: (StackOverflow)
I am having trouble integrating two products, one of which is mine and they appear not to be talking. So I want to make sure they are communicating correctly. I had a look around for network monitor and found TCP Spy. This works but only shows 1 side of the conversation at a time (it has to run locally) I would ideally like to see both sides at the same time - but you can't run two copies of TCP Spy.
I've hit Sourceforge, but nothing seems to jump out - I'm a Windows developer, I don't have perl installed.
I've found a couple of others which are cripple-ware and totally useless, so I was wondering what do the SO guys use for watching the TCP conversation?
BTW - the 'not-written-here' product is not a browser.
Source: (StackOverflow)
I need to check my Android app's Internet consumption. In my app I have a numerous number of web service APIs being called.
I want to know how much my app consumes the Internet in kB/MB at a full go.
How can I check that? Is there any tool to check that?
Source: (StackOverflow)
Is there a way in C# or C/C++ & Win32 to monitor a certain process's network usage (Without that application being built by you obviously)? I would like to monitor just 1 process for like an hour or so, then return the bytes used by only that process, such as limewire for example.
Is it possible? I know netstat -e on windows will tell you total bytes sent/received, but that is for all processes.
edit: If i can't return just one processes usage, how can i get the bytes sent/received by the entire system? as netstat displays except i just want the integers.
eg:
netstat -e
Received Sent
Bytes 2111568926 1133174989
Unicast packets 3016480 2711006
Non-unicast packets 3122 1100
Discards 0 0
Errors 0 0
Unknown protocols 0
I just want to get 2 variables, like rec = 2111568926 and sent = 1133174989
Source: (StackOverflow)
I used a tool once which allowed me to capture http requests, Afterwards it allowed me too generate c# code so I could manually play with the requests and run them again. Does anyone know the name of that tool?
Source: (StackOverflow)
I try to implement (in WPF, C#) Ellipse
control which changes its colour depending on connection to google.com. If there is connection with Google, ellipse is green; else it's red.
I coded it this way:
XAML code
<Window.Resources>
<l:InternetConnectionToBrushConverter x:Key="InternetConnectionConverter" />
</Window.Resources>
<Grid>
<DockPanel LastChildFill="True">
<StatusBar Height="23" Name="statusBar1" VerticalAlignment="Bottom" DockPanel.Dock="Bottom">
<Label Content="Google connection:" Name="label1" FontSize="10" Padding="3" />
<Ellipse Name="ellipse1" Stroke="Black" Width="10" Height="10" Fill="{Binding Converter={StaticResource InternetConnectionConverter}}" Margin="0,4,0,0" />
</StatusBar>
</DockPanel>
</Grid>
and C# behind-code (value converter and function checking connection):
public class InternetConnectionToBrushConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (targetType != typeof(Brush))
throw new InvalidOperationException("The target must be a Brush!");
return CheckConnection("http://www.google.com/") == true ? Brushes.Green : Brushes.Red;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotSupportedException();
}
/// <summary>
/// Checks connection to specified URL.
/// </summary>
/// <param name="URL"></param>
/// <returns><b>True</b> if there is connection. Else <b>false</b>.</returns>
private bool CheckConnection(String URL)
{
try
{
HttpWebRequest request = WebRequest.Create(URL) as HttpWebRequest;
request.Timeout = 15000;
request.Credentials = CredentialCache.DefaultNetworkCredentials;
HttpWebResponse response = request.GetResponse() as HttpWebResponse;
return response.StatusCode == HttpStatusCode.OK ? true : false;
}
catch (Exception e)
{
Debug.WriteLine(e.ToString());
return false;
}
}
}
It works well but there are 2 problems:
- it takes some time to check connection, so I think I should be doing it in new thread (if I'm wrong, please tell me why)
- what's more important - it checks connection with Google only once, when program starts running (despite I use binding, so I expect that there would be constant connection monitoring)
How should I solve this?
I want to have constant connection monitoring, so that when I disconnect internet connection, Ellipse
control will change its colour.
Source: (StackOverflow)
before I start I realise there are a few SNMP related questions here already but not many seem to have been answered - that could mean I'm asking in the wrong place but I don't know where else to go at the moment.
I've been reading up as best I can on SNMP for a couple of days but am finding it difficult to get my head around what is meant to be happening. The idea is eventually we will integrate SNMP into our Java application server which will allow the end users to incorporate it into their pre-existing Network Management Systems(NMS).
Unfortunately I'm feeling entirely confused by what is meant to be going on. From what I understood from talking to the end users (which was unfortunately before any research) was that the monitoring allows their existing NMS to give their admin guys a view of the vital statistics in a tree type display, giving them feedback regarding different parts of the system at a high level and allowing them to dig down into specific subsystems.
From reading around we would implement an 'Agent' which has several defined interfaces allowing for GET requests etc to be processed and responded to. That makes sense but I am at a loss to work out what the format of the communication is - there don't seem to be any specific examples of what any of the messages look like, how the information is encoded.
More of my confusion though is regarding Management Information Base(MIB). I had, wrongly, assumed that the interface of the agent would allow for the monitored attributes to be requested and then in turn the values for those attributes requested. Allowing any new Agent to be started and detected without any configuration on the NMS end (with the exception of authentication in v3). This, if I understand correctly, is not the case and the Agent must instead define MIBs which can be used by the NMS to determine those attributes. My confusion is increased when people start referring to thousands of existing MIBs and that they can be reused which I don't understand. Is the intention that a single MIB definition can be used to say describe how a particular attribute of a network device (something simple like internet connected on a router:yes/no) for many different devices? If so I don't believe that our software would allow the monitoring of anything common to any other device/system but should we be looking for already exising MIBs? At the moment I don't really see any good rational for such a system, surely it would be easier for the Agent to export that information - so I'd appreciate it if someone could enlighten me!
I think it would help if I was able to setup a simple SNMP agent and some sort of client, I could begin to see the process and eventually inspect the communication between the two but am finding it difficult to find anywhere that provides any information on doing such a thing. Nagios has been recommended to us as a test 'client'/NMS but their 'get started quick' section recommends downloading a 600Mb virtual machine - surely there is a quicker way to get started?
Any help or suggestions will be appreciated, I have been through the Wiki page but it doesn't seem to go into much detail about the MIBs and the having not had to deal with anything like the referenced RFCs before, while they may contain all of the information they seem completely impenetrable to me at the moment. Or if there are any books that can be recommended for an overview and implementation of v3?
Thanks for reading and even more thanks if you think you can help!
Source: (StackOverflow)
I want to analyze the Hadoop 1.0.3 Bandwidth consumption in my cluster.
Which tool/s can I use to only analyze the bandwidth consumption between its nodes used by all the processes related with all the hadoop components: hdfs, jobtrackers, tasktrackers, datanode, namenode, heartbeats, data transfer...
Also would like to associate the bandwith consumption with the process.
The main problem is that its processes do not use fix ports. If possible, would it be viable to use a specific ports range or interface/subinterface to use?
Source: (StackOverflow)
I want to find a way to combine these two pieces of code into a single function that will send me an email whenever a certain server goes down (i.e server no longer receives pings). How would I go about to do that with these 2 code segments?
import smtplib
import subprocess
##Ping
hostname = "x.x.x.x"
output = subprocess.Popen(["ping.exe",hostname],stdout = subprocess.PIPE).communicate()[0]
print(output)
if ('unreachable' in output):
print("Offline")
##Email
fromaddr = 'someone@gmail.com'
toaddrs = 'somebody@somewhere.com'
msg = 'Subject: %s\n\n%s' % ('SERVER STATUS', 'Server is Down')
# Login info
username = 'user'
password = 'pass'
# Outgoing SMTP
server = smtplib.SMTP('smtp.gmail.com:587')
server.starttls()
server.login(username,password)
server.sendmail(fromaddr, toaddrs, msg,)
server.quit()
Source: (StackOverflow)
A Chrome Packaged Application under Windows 10 doesn't seem to be using my public proxy settings under Internet Options. I'm trying to monitor this application's network activity via Fiddler installed on another computer. Every HTTP and HTTPS requests are successfully monitored there, except the ones from this packaged application.
I'm pretty sure it uses HTTP requests behind, because I generated it from an Android APK file, using ARC Welder. And I can see HTTP requests from Android application itself on my phone. But not from generated packaged chrome application on Windows. Is there anything I can do with the manifest file or something else?
Thank you.
Source: (StackOverflow)
Issue
I use Wireshark to capture a HTTP video stream and I've use the following filter to filter out the relevant GET requests.
http.request.uri contains "identifier" && http.request.method == "GET" && ip.addr == xxx.xxx.xxx.xxx
Questions
Is it possible to extract all get GET URLs to separate a .txt file?
Or is possible to extract the raw response packets (without the header) which match the filter above to separate files so that I have a bunch of individual video files eventually?
I hope I made myself clear enough ;-)
Thank you
Source: (StackOverflow)