I have tried this on two operating systems (first on Fedora then on Ubuntu(recommended)) and I am still confused so I am reaching out to the community. I have access to ARIN’s bulk whois data and want to parse the xml file and throw it into a database. I came across a Perl script that does exactly this …
Iterating Ansible setup command
I want to use ansible setup module to retrieve hosts specs and I tried with a bash for loop. Ansible version: 2.4 My hosts inventory has been defined in a group of machines which I called rhelmachines I would like to collect the following list of variables called “specs” I am then trying to includ…
Does linux process VSZ equal 0 mean kernel space application?
I notice some process always have VSZ as 0 how to understand why they have 0 VSZ? Answer VSZ is the Virtual Memory Size. It includes all memory that the process can access, including memory that is swapped out, memory that is allocated, but not used, and memory that is from shared libraries. So, the top comma…
meaning of EPOLLERR from epoll_wait with a pipe
This is similar to the question 1 but is about pipes. If epoll_wait returns EPOLLERR for the write end of a pipe, how do I distinguish a general error condition from the read end of the pipe been closed? For the sockets case the answer was to use “use getsockopt and SO_ERROR to get the pending errorR…
Reactive Extension .NetCore Observing on MainThread
I’m trying to do a lot of network operation in parallel, and I want to set a timeout to each operation. Since Parallel.ForEach doesn’t have an easy timeout option, I’m using System.Reactive. this is my code: I’m using the Observable.Amb operator to run in parallel a 60 seconds timer, t…
How do I find a system memory leak in linux?
I’ve got a monolithic piece of software, a game on a basic linux kernel, that seems to leak memory in swap space. The memory usage of the process itself is reported as constant over a day or so but the free memory on the system is consistently decreasing until there is no more physical ram space. There …
Kafka – Broker: Group coordinator not available
I have the following structure: Created topic with replication factor 3 and partitions 3 by kafka-topics shell script. And use group localConsumers. it works fine when leader is ok. Consumers’ log But if leader is down – I get the error in consumer (systemctl stop kafka): Node 3 is unavailable. ok…
getuid/geteuid strange behaviour
I’ve got a simple code, which basically looks like: Which basically outputs the real and effective user id. Now, once build with: go build main.go; I also call sudo chown root:root main && sudo chmod 4755 main to get -rwsr-xr-x permissions on the file. If I understand the concept of the setuid b…
How to replace ‘-u username -p password’ with new value in linux shell?
old value: 10.125.11.5:27017 -u username -p password new value: 10.125.19.6:27017 I want to replace all the old value in *.py files (current directory folder and subdirectory) using shell,how to do? seems sed or grep can not work with’-u’ or ‘-p’. Answer Suppose you have an inputfile w…
Do we need to unlocking a mutex after recived a signal from cond variable?
I making an app in C for educational purposes with mutexes and conditional variables. Short example here: Can you explain me, why after “while” statment (and recived signal from second thread) we need to unlock the mutex, when signal makes that mutex is locked? I get it from a lot examples from we…