Sponsored Content
Top Forums Shell Programming and Scripting Continuous nc data acquisition fails ocassionally Post 303019401 by Corona688 on Thursday 28th of June 2018 03:17:19 PM
Old 06-28-2018
GOT IT! If you want to send to nc more than once, you always have to do so from the same source port and IP. Otherwise nc will think you're a different sender and ignore it. And the source port is randomly chosen, unless you give the sender one with -p...

I have 192.168.0.126:19999 as the receiver here, and 192.168.0.150:20000 as the sender.

Receiving:

Code:
$ nc -u -l -p 20000 192.168.0.150 19999
asdf
asdf
...

Sending:

Code:
$ echo asdf | nc -p 19999 -u -w 1 192.168.0.126 20000
$ echo asdf | nc -p 19999 -u -w 1 192.168.0.126 20000
$

Note that the sender is not quitting at end-of-line, it's quitting at end-of-file, so should still be able to handle a long, slow stream.

Last edited by Corona688; 06-28-2018 at 06:09 PM..
These 2 Users Gave Thanks to Corona688 For This Post:
 

5 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Need info regarding CDP - continuous data protection

HI frnds, i am going to work on CDP(continuous data protection),does any one of them have any idea reg CDP ... any docs or Links...might be helpful to me in understanding it.... (1 Reply)
Discussion started by: deep
1 Replies

2. Shell Programming and Scripting

Continuous checking of a file

I have a requirement like this... I want to go to a particular server for which i have acess .I want to do a ssh to that server from one server and check if a file is theer or not..and i need the script to chcek continuosly till it finds the file.When it finds the file i want it to come out... (9 Replies)
Discussion started by: kanta_bhakti
9 Replies

3. UNIX for Dummies Questions & Answers

Extracting data between continuous non empty xml tags

Hi, I need help in extracting only the phone numbers between the continuous non empty xml tags in unix. I searched through a lot of forum but i did not get exact result for my query. Please help Given below is the sample pipe delimited file. I have a lot of tags before and after... (6 Replies)
Discussion started by: zen01234
6 Replies

4. Shell Programming and Scripting

Continuous Copying from a directory to another.

Hello Folks, Looking for a script, where i can check for the existing of the files in a directory and copying to another. How can i achieve it in loop for over period of time. whatever files comes into the folder copied in another without duplicate and should be continuous loop. ... (8 Replies)
Discussion started by: sadique.manzar
8 Replies

5. UNIX for Beginners Questions & Answers

Continuous for loop

Hi All, Please help ***************** a=100 and run for loop that will minus 30 from 100 an will display value run loop will run till display value will be 0 ***************** Thanking you (1 Reply)
Discussion started by: Praful Pednekar
1 Replies
COROSYNC-NOTIFYD(8)					      System Manager's Manual					       COROSYNC-NOTIFYD(8)

NAME
corosync-notifyd - Listen for important corosync events and send dbus and/or snmp traps. SYNOPSIS
corosync-notifyd [-f] [-l] [-o] [-s] [-m] [manager] [-d] [-h] DESCRIPTION
corosync-notifyd uses corosync API to listen for important cluster events and can log them, generate dbus signals or genterate snmp traps. OPTIONS
-f Start application in foreground. -l Log all events. -o Print events to stdout (turns on -l). -s Send SNMP traps on all events. -m Set the SNMP manager address. -d Send DBUS signals on all events. -h Print this help EXAMPLES
$ corosync-notifyd -o corosync-notifyd[18505]: troll[23374016] corosync-notify:18505:12 is now connected to corosync corosync-notifyd[18505]: troll[23374016] corosync-notify:18505:13 is now disconnected from corosync corosync-notifyd[18505]: troll[23374016] is now quorate corosync-notifyd[18505]: r2[1550100672] ip:192.168.100.92 joined corosync-notifyd[18505]: r2[1550100672] ip:192.168.100.92 left $ corosync-notifyd -o Note this output below is from "dbus-monitor --system" signal sender=:1.216 -> dest=(null destination) serial=2 path=/com/redhat/cluster/corosync; interface=com.redhat.cluster.corosync; member=ConnectionStateChange string "troll" uint32 23374016 string "corosync-notify:18900:12" string "connected" signal sender=:1.216 -> dest=(null destination) serial=3 path=/com/redhat/cluster/corosync; interface=com.redhat.cluster.corosync; member=ConnectionStateChange string "troll" uint32 23374016 string "corosync-notify:18900:13" string "disconnected" signal sender=:1.216 -> dest=(null destination) serial=4 path=/com/redhat/cluster/corosync; interface=com.redhat.cluster.corosync; member=QorumStateChange string "troll" uint32 23374016 string "quorate" signal sender=:1.216 -> dest=(null destination) serial=5 path=/com/redhat/cluster/corosync; interface=com.redhat.cluster.corosync; member=NodeStateChange string "r2" uint32 1550100672 string "192.168.100.92" string "joined" signal sender=:1.216 -> dest=(null destination) serial=6 path=/com/redhat/cluster/corosync; interface=com.redhat.cluster.corosync; member=NodeStateChange string "r2" uint32 1550100672 string "192.168.100.92" string "left" SEE ALSO
corosync(8), corosync-objctl(8), dbus-monitor(1), AUTHOR
Angus Salkeld 2011-01-14 COROSYNC-NOTIFYD(8)
All times are GMT -4. The time now is 11:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy