Posts

Showing posts from May, 2017

How do I find the number of CPUs in C++11?

Below is the code snippet that helps to get the number CPUs in C++11: ------------------------------------------------------------------------------------------------------- // Get the number of parallel threads possible. Just an hint to create number of threads unsigned int n = std::thread::hardware_concurrency(); std::cout << n << " concurrent threads are supported.\n"; -------------------------------------------------------------------------------------------------------

Graylog - an easy solution for log management

Image
Recently, I was researching for opensource log management tools. I had only two requirements. Log Search and Log analytics. A lot of posts in the internet suggested me to use an ELK stack. But, I wanted to do something different. I found graylog as an alternative to ELK. One can setup and run it in minutes. It uses mongodb, elastic search and graylog server. Here is the login page: grylog provides different options to stream logs into graylog server. I used the simple UDP listener and forwarded logs from multiple devices into this listener. Next step is to create dashboards using the search. Here is the search page: Once search is done, you can add the widgets to a dashboard. The dashboard will help you to get the summary of your devices at one shot. It is also possible to generate alerts on different conditions. More here: https://www.graylog.org/