Getbulk operation with list of Oids as input - snmp

The problem
I am using snmp4j libraries and built a snmp connector
I have created two operations one using the Getbulk and one with Get. Both take in a list of OID's. Both work as attended with out problems. The only problem I am having is on network devices very far way. It takes exactly the same time for each of them. right at 2 minutes. I feel like this is a very long wait time. Although on devices that are close it is very fast and under 5 seconds.
The question
I am wondering does the Getbulk not ask for all the information at once and then comes back with all the information. Or does it ask for each of the OID's in the list one at a time. The same as the Get?
Is there a way to make one call to get all the information I need with one call to the device or is only that I can make repeated calls to the device?
Do I have other options?
Does any body have working java example to achieve this.

Related

Which technique for locating many similar Base Pointer Adresses (fast)?

I try to catch some Base Pointer Adresses from a Windows Application which I want to Bot (Its not a game, Its an Online Broker). So, I know how to find Base Pointer Adresses, but I do this with Cheatengine (Find Adresses, set Breakpointes, search for the Output Adresses... and so on) - but this takes very much time for Base Pointers with 6+ Offsets. Maybe there is a much faster technique how to scrape them out of Memory?
And here is my presumption: In This Pic you can see, there are many similar Entrys (Forex Entrys), and they are all similar structured. They have a Adress for Ask-Value and Bid-Value - these are the Pointers I need! The Values are represented as Double. Maybe, I can find multiple Adresses at once, if I find the one from another. I thought on object oriented programing, where many Instances have Adresses nearby to the other. So, is there a way to find multiple at once, and fast?
I tried some stuff with OllyDbg, and didnt find some nearby (But my skills with OllyDbg are not insane, I still dont know all functions of it). Do you guys have a better solution, how I can find them faster? I dont really want to code some stuff in Assembler - but if nececary, I can do this. Would be great if you can help. There are 89 Entrys, and I will need per something like 20 - 30 minutes. Would be awful.
Cheers!
Filthy Frank
Using pointers and offsets is not the correct way to go about this. On the back end they're just using HTTP and an API. You should either use that directly or hook the function that does it and then work with the data right after it is received by the client.

Using Graphite/Grafana for non time based data

I have been reading through documentation and have been able to get Graphite to receive data I have been sending it. I can definitely see the benefit in tracking things like concurrent users and network load.
But now I have been tasked with implementing it on the client to show things like RAM, and CPU usage. In addition to this, I must also track actions (users buying things). Maybe I am missing a large chunk of the picture here, but I am not sure how I would do these things. Do I need a timestamp? I've also seen plugins for pie charts and such and this would indicate I could perhaps create graphs from devices with different statistics.
What am I missing?
I don't think you're missing anything.
Any data you send on to, say, InfluxDB (as that's what I've used the most) will be timestamped automatically when it arrives - unless you specify an explicit one yourself.
If you're showing, for example, CPU load you can write your query to pick up the latest value, or perhaps an average (mean value) over time, or the max or min over a period of time as appropriate.
Pie charts can also be used successfully to graph relationships over time.
The key is to create a specific query (I use SQL directly) to craft the data used for the panel type. There are excellent examples in the documentation.

Most simple "get started" with jmeter

I'm trying to get going with JMeter, and am having trouble finding a really simple tutorial for the first "getting started" the docs seem to be very verbose, covering all kinds of scenarios.
Can anyone point me at something that would take me from having downloaded the app (I can run it, and get a gui) to the point where I can send a single, predefined GET request, at a specific rate.
Just one request, no login, nothing. But I'd like to be able to send it at a selected rate.
This will do two things for me, first, get past that wall of info that I'm finding and give me a starting point from which to experiment. Second, it's actually pretty much all I want to do anyway; I don't want to record results, I just want to hit a server at specific steady state rates, and observe the OS level impact on the server when it stabilizes (number of threads, memory usage, rate of context switching, cpu usage). I'll get to more complex things later, maybe.
I'm sure someone has written something to achieve this, but google keeps finding heavyweight "tomes" that are off-putting to wade through and feel like they're wasting huge amounts of my time :(
(Oh, and I did search here, but only found more complex stuff; hope I didn't get egg on my face with a duplicate!)
TIA,
Toby
I find Blazemeter's JMeter tutorial to be very beginner friendly:
http://community.blazemeter.com/knowledgebase/topics/10018-jmeter-tutorials
http://community.blazemeter.com/knowledgebase/articles/197560-jmeter-video-tutorial-writing-your-first-jmeter-s
(I'm not affiliated with Blazemeter)
The structure of the simplest JMeter Test Plan as per your scenario should be something like:
Thread Group - to set a number of threads and iterations
HTTP Request - to configure endpoint, path, parameters, etc.
Constant Throughput Timer - to set exact desired request execution rate (N requests per second)
Hope this helps.
Gach, as so often is the case, the terminology was obscuring that first level of understanding that allows one to make use of the docs. I found what I needed right there in the regular documentation:
http://jmeter.apache.org/usermanual/build-web-test-plan.html

write only stream

I'm using joliver/EventStore library and trying to find a way of how to get a stream not reading any events from it.
The reason is that I want just to write some events into that store for specific stream without loading all 10k messages from it.
The way you're expected to use the store is that you always do a GetById first. Even if you new up an Aggregate and Save it, you'll see in the CommonDomain EventStoreRepository that it will first correlate it with the existing data.
The key reason why a read is needed first is that the infrastructure needs to work out how many events have gone before to compute the new commit sequence number.
Regarding your citing of your example threshold that makes you want to optimize this away... If you're really going to have that level of events, you'll already be into snapshotting territory as you'll need to have an appropriately efficient way of doing things other than blind write too.
Even if you're not intending to lean on snapshotting, half the benefit of using EventStore is that the facility is buitl in for when you need it.

Best form of IPC for a decentralized roguelike?

I've got a project to create a roguelike that in some way abstracts the UI from the engine and the engine from map creation, line-of-site, etc. To narrow the focus, i first want to just get the UI (player's client) and engine working.
My current idea is to make the client basically a program that decides what one character (player, monsters) will do for its turn and waits until it can move again. So each monster has a client, and so does the player. The player's client prints the map, waits for input, sends it to the engine, and tells the player what happened. The monster's client does the same except without printing the map and using AI instead of keyboard input.
Before i go any futher, if this seems somehow an obfuscated way of doing things, my goal is to learn, not write a roguelike. It's the journy, not the destination.
And so i need to choose what form of ipc fits this model best.
My first attempt used pipes because they're simplest and i wrote a
UI for the player and a program to pipe in instructions such as
where to put the map and player. While this works, it only allows
one client--communicating through stdin and out.
I've thought about making the engine a daemon that looks in a spool
where clients, when started, create unique-per-client temp files to
give instructions to the engine and recieve feedback.
Lastly, i've done a little introductory programing with sockets.
They seem like they might be the way to go, and would allow the game
to perhaps someday be run over a net. I'd like to, if possible, use
a simpler solution, and since i'm unfamiliar with them, it's more
error prone.
I'm always open to suggestions.
I've been playing around with using these combinations for a similar problem (multiple clients talking via a single daemon on the local box, with much of the intelligence shoved off into the clients).
mmap for sharing large data blobs, with unix domain sockets, messages queues, or named pipes for notification
same, but using individual files per blob instead of munging them all together in an mmap
same, but without the files or mmap (in other words, more like conventional messaging)
In general I like the idea of breaking things up into separate executables this way -- it certainly makes testing easier, for instance. I think the choice of method comes down to usage patterns -- how large are messages, how persistent does the data in them need to be, can you afford the cost of multiple trips through the network stack for a socket-based message, that sort of thing. The fact that you're sticking to Linux makes things easy in terms of what's available -- you don't need to worry about portability of message queues, for instance.
This one's also applicable: https://stackoverflow.com/a/1428542/1264797

Resources