I have installed and started the MongoDB on EC2 Linux instance. How can I verify whether it is running or not? 1 way I got to know how to verify whether it is started or not is: By checking the contents of the file at /var/log/mongodb/mongod.log for a line reading: [initandlisten] waiting for connections on p…
Receiving socket information from netfilter NF_INET_PRE_ROUTING hook function in linux kernel
I wrote a netfilter hook function for incoming packets in linux kernel. Is there a way to get the receiving socket information from the hook function. The code is Lets assume I have a udp socket open at port 15000 and a udp packet arrives at port 15000. In the above written hook function how can I access the …
Schedule a function that belongs to an R package
I’m trying to build an R package whose goal is to run a series of analyses by taking input data and writing output data to an external database (PostgreSQL). Specifically, I need a set of operations to be scheduled to run on a daily basis. Therefore, I have written some bash scripts with R code (using t…
How to do a GET on my localhost node server using curl?
I am trying to GET a page from my localhost server using the command line on linux. I have my node’s REST endpoint like this: And going here on my browser works perfectly: However, I can’t figure out how to use CURL to do the same GET request via the command line. Here is what I have tried: curl -…
import cv2 on centos 64 bit
I already copy the cv2 and complete the procedure installing opencv and python and I also think the default python installation is usr/lib64/python2.7 and there is also usr/lib/python2.7 and I also move the cv2 using copy -r usr/lib/python2.7/site-packages/cv2.so to usr/lib64/python2.7/site-packages/ it succe…
What starts this docker process on my laptop?
Every time I boot up my Lubuntu 16.04 laptop I can see I have a running docker container: It serves a Jenkins application on the port 80 and requesting localhost/ in the browser redirects to http://localhost/login?from=%2F and shows a Jenkins warning page: A wget request shows: How can I know which service is…
Pass bash script arguments to ansible command in script
I’m trying to run this command from a bash script and pass the extra-vars from the bash arguments. I run the script like below and get this error: I even tried escaping the quotes but it didn’t work. How can I get this to run? Answer Or, you can change your script to use $*:
MSSQL Server for Linux Docker Versions
I currently have Microsoft SQL Server 2017 (CTP2.1) – 14.0.600.250 (X64) May 10 2017 12:21:23 Copyright (C) 2017 Microsoft Corporation. All rights reserved. Developer Edition (64-bit) on Linux (Ubuntu 16.04.2 LTS). Are there any earlier versions available? SQL Server 2012, 2014, 2016? I don’t want…
android sdk build tools 25 on centos 6.8 error
I’m using jenkins for CI and after updating my build tools version to 25 I got this error: I need to use buildtools 25 and my server centos version is 6.8. How can I update glibc ? Answer Apparently, the program you are trying to use was not compiled for Red Hat Enterprise Linux 6 (which only provides g…
pthread is faster than serial in Windows but slower than serial in Linux
I am trying to run the same C++ parallel code to calculated pi with Monte Carlo algorithm on Windows and Linux with the same number of threads (4 threads with 4 CPUs). While the parallel code is faster than the serial implementation on Windows, it is much slower on Linux. Here is the program: output on Window…