Linux

linux rpc order and retransmision

We use RPC (udp socket) in our application and we noticed that RPC retransmit it messages when it was not received (or confirmed) by the target application. Does RPC present the order of messages? let say we have message 1 and message 2, does it wait for message 1 to be confirmed by the receiver and then sends message 2?…
Read more

Asp core and Asp 4.5 deployment on linux

with visual studio 2015 come a preview of asp 5. I’m interested about asp 5 and mvc 6 because seems works on linux. I ‘ve to build some service on linux but I’ve great confusion about net core and net 4.5. My question is this : can I run an asp 5 site on linux? I must use only net…
Read more

Linux grep and sort log files

I looked almost everywhere (there, there, there, there and there) with no luck. What I have here is a bunch of log files in a directory, where I need to look for a specific ID (myID) and sort the output by date. Here is an example : in file1.log : 2015-09-26 15:39:50,788 – DEBUG – blabla : {‘id’ : myID}…
Read more

Simple script works with /bin/sh but not /bin/bash

My simple script is like this: #!/bin/sh DEF=.file_name_with_a_leading_dot.sh . ${DEF} Notice the /bin/sh on the top line. When I run that simple script I get an error that the file isn’t found. But, if I change that top line to #!/bin/bash then the script finds that file in the current directory just fine. But, On my Ubuntu linux laptop I…
Read more

Is it possible to open message queue in linux with huge number of elements?

According to documentation, /proc/sys/fs/mqueue/msg_max can be used in order to increase the limit of messages in the queue. The documentation also says, that the limit should not exceed HARD_MSGMAX, which is 65,536 since Linux 3.5. However, trying to open queue even with 500 elements fails with EMFILE: #include <stdio.h> #include <mqueue.h> #include <errno.h> #include <string.h> #include <stdlib.h> #include <stddef.h> #include…
Read more

linux – serial port programming ( ASCII to Byte )

I tried to receive data from serial port. However, those data is unrecognized to me. The root cause is because those are in ASCII. To decode the data, it needs to be the byte formate. The buffer I’ve created is unsigned char [255] and I try to print out the data by using while (STOP==FALSE) { res = read(fd,buf,255); buf[res]=0;…
Read more