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…
Tag: linux
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 …
how to add @ at the first byte of the line after matching line pattern
I need help from expert on this. How can I add @ at the first byte of the line after found matching pattern. For example as below : Input: Output: Answer You may execute the following sed script on the file: sed -n ‘/TESTING/{p;n;s/^/@/;};p;’ file -n – don’t print output on default /TE…
How to add Chromedriver to PATH in linux?
Trying to use Selenium with Chrome in a python script. I get the following error: I know the location of the chromedriver executable. How do I add it to the PATH? thank you Answer You can specify the absolute path to your chrome driver in your script as such: Or you can add the path to your webdriver in the