How To set up SNMP manager and Agent - network-programming

I am new to network programming.
I have learnt the basics of SNMP and now I want to test out the commands.
I need to know what are the software tools available to set up SNMP manager and also to simulate SNMP agent. I would prefer opensource tools in linux.
Also suggest the pre-requisites to start coding for SNMP in C/C++, like libraries, compilers, IDE etc.
Thanks in Advance.

If you are on Linux Net-SNMP is what you're looking for.

Related

What will be the alternate of win32api for Linux? [duplicate]

I'm moving from windows programming (By windows programming I mean using Windows API) to Linux Programming.
For programming Windows, the option we have is Win32API (MFC is just a C++ wrapper for the same).
I want to know if there is something like Linux API (equivalent to WINAPI) that is exposed directly to the programmer? Where can I find the reference?
With my little knowledge of POSIX library I see that it wraps around part of Linux API. But what about creating GUI applications? POSIX doesn't offer that. I know there are tons of 3rd party Widget toolkits like gtk, Qt etc. But I don't want to use the libraries that encapsulates Linux API. I want to learn using the "Core Linux API".
If there are somethings that I should know, please inform. Any programmer who is familiar with both Windows & Linux programming, please map the terminologies of Linux world so that I can quickly move on.
Any resources (books,tutorials,references) are highly appreciated.
I think you're looking for something that doesn't exactly exist. Unlike the Win32 API, there is no "Linux API" for doing GUI applications. The closest you can get is the X protocol itself, which is a pretty low level way of doing GUI (it's much more detailed and archaic than Win32 GDI, for example). This is why there exist wrappers such as GTK and Qt that hide the details of the X protocol.
The X protocol is available to C programs using XLib.
What you must understand is that Linux is very bare as to what is contained within it. The "Core" Linux API is POSIX and glibc. Linux is NOT graphical by default, so there is no core graphics library. Really, Windows could be stripped down to not have graphics also and thus not have parts of the win32 API like GDI. This you must understand. Linux is very lightweight compared to Windows.
For Linux there are two main graphical toolkits, GTK and Qt. I myself prefer GTK, but I'd research both. Also note that GTK and Qt exist for Windows to, because they are just wrappers. If you go take a look at the X protocol code for say xterm, you'll see why no one tries to actually creating graphical applications on top of it.
Oh, also SDL is pretty nice, it is pretty bare, but it is nice if your just needing a framebuffer for a window. It is portable between Linux and Windows and very easy to learn. But it will only stretch so far..
Linux and win aren't quite as different as it looks.
On both systems there exists a kernel that is not graphical.
It's just that Microsoft doesn't document this kernel and publishes an API that references various different components.
On Unix, it's more transparent. There really is a (non-GUI) kernel API and it is published. Then, there are services that run on top of this, optionally, and their interfaces are published without an attempt to merge them into an imaginary layer that doesn't really exist.
So, the lowest GUI level is a the X Window System and it has a lowest level library called Xlib. There are various libraries that run on top of this one, as you have noted.
I would highly recommended looking at the QT/C++ UI framework, it's arguably the most comprehensive UI toolkit for any platform.
We're using it at work developing cross platform apps that run on windows, osx and linux.
It also runs on Nokia's smart phone Operating System Maemo which has recently been merged with Intel's Moblin Linux OS, now called MeeGo.
This is going to sound insane since you're asking about "serious" stuff like C++ and C (and the "core linux API"), but you might want to consider building in something else. For instance:
Java Swing (many people love it! Others hate it and call it obsolete)
Mono GTK# (C# or VisualBasic or whatever you want, lots of people say it's pretty cool, but they're not not that many people)
Adobe AIR (ActionScript, you might hate it)
Titanium (totally new and unproven, but getting a lot of buzz in the iPhone world, at least)
And many other possibilities, some of which let you work on multiple platforms at once.
Sorry if this answer is not at all what you're looking for. The "real" answers on Linux are "pick a toolkit," which is also no answer at all :)
Have a look at Cairo. This something roughly similar to GDI+ and is under the hood of some of of the few usable GUI programs for Linux i.e. Firefox or Eclipse (SWT). It wraps most the natsy and ancient Linux stuff for you into a nice API that runs on most Linux installations without locking you into a entire subsystems like GTK or QT.
There is also the docs for the two different desktop platforms: Gnome and KDE that might help you down that road.

Unified infrastructure monitoring tool

I am looking for a tool which is similar to CA UIM, but in open source. I would like the tools to monitor mainly our HP enclosures, blades, interconnect bays along with the virtualised server installed on each HP enclosure.
Depends how deep you need to go with monitoring.
If your needs are basic, Nagios, Chef and Graylog combined can generally get you pretty close.

Another way instead SNMP

Is there an other way of monitoring the system threshold values (RAM, CPU) instead of SNMP?
There should be as simple way as client-server interaction since defining TRAP in SNMP is not easy at the beginning?
Thanks in advance.
Well if you're quering a Windows machine you can use WMI. It is really powerfull and there is also a Linux porting if you are quering from a Linux machine. For example if you want to monitor RAM usage you can execute the following query:
select FreePhysicalMemory from Win32_OperatingSystem
Now if you want more information I need to know your platform system and what language you will use.

How to run Erlang based robot? Is it possible to convert it into .hex and run over microcontroller?

I am working on Erlang robotic project. I have made a wallfollower robot program which has two files 1. a C program to communicate with hardware(I think we can not directly use Erlang for this) and 2. Erlang program to call these functions. I want to know where(platforms) I can run this robot.
Is it possible to run this robot over micro-controller (8051 or ARM7) based hardware?
Is it possible to convert Erlang program into C code or directly into .hex file?
You might want to have a look to this project:
http://erlang-embedded.com/
They presented it today at the Erlang Factory Conference in London.
Also, you might want to contact someone from the DMI (formerly DIIT) from Catania, Italy. They spent many years working on Erlang powered robots:
http://eurobot.dmi.unict.it/?p=16
Hope this helps.
To the best of my knowledge:
there isn't any port of Erlang VM over micro-controllers (assuming it would even make sense)
there isn't any way to turn Erlang BEAM code to .hex format: BEAM VM code needs a virtual machine to operate in.
If you want something lightweight with task/threading capability for micro-controllers, why not consider TinyOS ?
The Erlang VM does a lot more than just interpret the erlang bytecode for you. It also handles the interprocess messaging, and does a lot of the heavy lifting that makes erlang so robust and fault tolerant. translating erlang code to machine code would require translating a good portion of the vm code as well. You'd be better off porting the vm itself to a micro-controller and running the apps on that.

Does anyone here have experience developing for Minix?

Recently I have become curious about the Minix OS. http://www.minix3.org/
I am very taken with descriptions of its robustness & reliability features, but I have noticed a distinct paucity of software packages available for the platform.
Has anybody here developed software for (or ported software to) Minix? Anything unexpected about the process?
Minix 3 is a new version; LINUX was prompted on the original Minix.
Minix is really best suited to small systems of embedded systems. If you have an old x86 PC around it should run minix handily, giving you an environment very much like what we called "an amazing workstation" in the mid-80's.
I loved programming in that environment; I'd say go for it, but remember that it is an experimenal environment, not what you want for your day-to-day system.
Coded round robin scheduler and such with nano, SSH connection can be used to code in new fashion platforms and send back the files. Minix is a great way to learn basics about Operating Systems.
I came across this piece while finding out how to contribute to minix. I liked it:
http://prasannakumartsm.wordpress.com/

Resources