I am trying to use the “nohup” command to avoid killing a background process when exiting the terminal on linux MATE. The process I want to run is a MPIrun process and I use the following command: when I leave the terminal, the processes running on the different cores are killed. Also another thin…
How to access python return value from bash script
I’m trying to understand how to access from a bash script the return value of a python script. Clarifying through an example: foo.py start.sh If I run the bash script, this prints the message “exec main..”. How can I store in script_output the return value (execution ok)? If I direct executi…
change arp refresh rate (package sending rate)
i have a measurement setup where i want to trigger an oscilloscope base on a network package arriving. I have good results for a few seconds but somewhere between 20s and 40s i get a wrong trigger. My research showed that this could come from the arp packages send from the device. I tried to disable the arp s…
find port number of IBM MQ Queue Manager
I have created a queue manager using these commands in a linux machine the queue manager is created successfully, i wanted to know on which port is the queue manager MQ1 running, i tried all possible ways netstat -au and also ps -ef command. It looks like it is running on a different port. I am unable to find…
linux dlopen : how to make loading lib manager
I have the same code compiled with different arch options (FMV does not work as the functions return sse and i can’t change “default” to something with sse) How can i make a meta-library that at load time checks the cpu capability and load the corresponding lib? (without any dlsym machinery)…
Using unbuffered pipe as “dummy” file output
I’ve been dealing with a weird issue that I can’t find a way to solve. My situation is as follows. I have an application in python called “app1”, that requires a file for outputting the results of it’s execution. I have a secondary application, called “app2”; a binary…
Doing git clone with bash script, could not read Password for repository
I’m trying to deploy Amazon EC2 instance through CloudFormation and I’m trying to clone a repository with a bash script with cfn-init. However, when I deploy the EC2 instance, I can see from cloud-init-output.log that the git clone fails, and this is the error: How can I input the password with th…
SIGPIPE in C++ determining which TCP socket is disconnected
I’m using Linux/Ubuntu. I’ve written a pair of classes that implement a TCP server and TCP client, respectively. Part of the code is to have graceful recovery from disconnects. My only problem is with SIGPIPE. I’ve written code to capture the signal, but I’d like it to start the “…
$SHLVL does not increase in ( echo $SHLVL)
I am learning shell scripts and stuck at this little experimental shell scripts: Without doubt, $A in line 3 and line 4 are different from each other, which can be explained that it is because the parent process cannot read variables created in the child process, that is, the subshell. However, the $SHLVL in …
Why do write syscalls print `%` at end on linux x86_64 (nasm)?
The following hello-world program displays a % sign at the end of the printed string. Why is this and how can I remove it? Here is my program: And here is the output when I run the executable: hello, world!% Thanks in advance. Edit: It seems to be caused by zsh (not reproducible in bash). The question is why …