Socat

Pipe One Serial Port to Another in Linux [closed]

本小妞迷上赌 提交于 2021-02-10 09:30:10
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . Improve this question I am looking for a means to pipe one serial ports data (regardless of data type) to another serial port. In my case I am trying to take in data from one serial port and output it through a radio connected to another serial port in real time. I already know what

Send image over http via socat bash webserver

℡╲_俬逩灬. 提交于 2021-02-08 08:59:48
问题 I am trying to write a webserver in bash using socat. I am having trouble serving image requests. I'm opening the socat listening connection like so: socat -T 30 -d -d TCP-L:$LISTENIP,reuseaddr,fork,crlf SYSTEM:"$0 \"docroot=$DOCROOT\"" I'm serving the image with the following, where $1 is the docroot and $2 is the image file name. function serve_png { if [ -e $1$2 ] then SIZE=`stat -c '%s' $1$2` echo -ne "HTTP/1.1 200 OK\nContent-type: image/png\nContent-length: $SIZE\n\n" cat $1$2 else echo

[转帖]k8s 部署问题解决

ぃ、小莉子 提交于 2021-02-01 06:22:49
k8s 部署问题解决 https: // www.jianshu.com/p/f53650a85131 本文记录一下在部署 k8s 时遇到的一些问题及解决方法,具体部署流程可以参考 ubuntu 安装 k8s 。 从snap安装导致的初始化问题 由于一开始我安装的时候没有配置好镜像源,所以导致了 apt 下载 k8s 三件套时出现了找不到对应包的问题,再加上 ubuntu 又提示了一下 try sudo snap isntall kubelet ... 所以我就用 snap 安装了三件套,使用的安装命令如下: snap install kubelet --classic snap install kubeadm --classic snap install kubectl --classic 虽然我在网上也找到了不少用 snap 成功部署的例子,但是迫于技术不精,最终实在是无法解决出现的问题,换用了 apt 安装之后就一帆风顺的安装完成了。下面记录一下用 snap 安装时出现的问题: kubelet isn't running or healthy 使用 kubeadm init 初始化时出现了下述错误,重复四次之后就超时退出了: [kubelet -check ] The HTTP call equal to 'curl -sSL http : / /localhost :

How to test a remote port is reachable with socat

吃可爱长大的小学妹 提交于 2021-01-21 05:47:12
问题 How to test a remote port is reachable with socat? with netcat we can nc -zv 192.168.1.15 22 How to do that with socat? 回答1: I would imagine that the first example in the man page would work socat - TCP4:www.domain.org:80 For your example, this would be (and adding 2 second connect timeout): socat - TCP4:192.168.1.15:22,connect-timeout=2 and the response would be the sshd connect banner (if that is what is listening) SSH-2.0-OpenSSH_5.3 or socat[12650] E connecting to AF=2 192.168.189.6:23:

How to test a remote port is reachable with socat

蓝咒 提交于 2021-01-21 05:46:06
问题 How to test a remote port is reachable with socat? with netcat we can nc -zv 192.168.1.15 22 How to do that with socat? 回答1: I would imagine that the first example in the man page would work socat - TCP4:www.domain.org:80 For your example, this would be (and adding 2 second connect timeout): socat - TCP4:192.168.1.15:22,connect-timeout=2 and the response would be the sshd connect banner (if that is what is listening) SSH-2.0-OpenSSH_5.3 or socat[12650] E connecting to AF=2 192.168.189.6:23:

pxc群集搭建

馋奶兔 提交于 2020-12-31 10:04:01
pxc群集搭建 1.环境 Percona-XtraDB 5.7.22-22-29.26-log percona-xtrabackup-24-2.4.12 192.168.99.210:3101(第一节点) 192.168.99.211:3101 192.168.99.212:3101 2.安装 安装包获取(根据操作系统类型获取不同安装包): wget https://www.percona.com/downloads/Percona-XtraDB-Cluster-LATEST/Percona-XtraDB-Cluster-5.7.22-29.26/binary/tarball/Percona-XtraDB-Cluster-5.7.22-rel22-29.26.1.Linux.x86_64.ssl102.tar.gz wget https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.12/binary/redhat/7/x86_64/percona-xtrabackup-24-2.4.12-1.el7.x86_64.rpm 所有节点上做以下操作: \\安装依赖包 yum install -y git scons gcc gcc-c++ openssl check cmake bison boost

How do I connect to a websocket manually, with netcat/socat/telnet?

て烟熏妆下的殇ゞ 提交于 2020-12-24 06:43:00
问题 I am trying to connect to the reference websocket echo server "manually", in order to learn how the protocol works (I am using socat for that). However, the server invariably closes the connection without providing an answer. Any idea why? Here is what I do: socat - TCP:echo.websocket.org:80 Then, I paste the following text in the terminal: GET /?encoding=text HTTP/1.1 Origin: http://www.websocket.org Connection: Upgrade Host: echo.websocket.org Sec-WebSocket-Key: P7Kp2hTLNRPFMGLxPV47eQ==

How do I connect to a websocket manually, with netcat/socat/telnet?

和自甴很熟 提交于 2020-12-24 06:42:51
问题 I am trying to connect to the reference websocket echo server "manually", in order to learn how the protocol works (I am using socat for that). However, the server invariably closes the connection without providing an answer. Any idea why? Here is what I do: socat - TCP:echo.websocket.org:80 Then, I paste the following text in the terminal: GET /?encoding=text HTTP/1.1 Origin: http://www.websocket.org Connection: Upgrade Host: echo.websocket.org Sec-WebSocket-Key: P7Kp2hTLNRPFMGLxPV47eQ==

centos7安装rabbitmq3.7.9

落爺英雄遲暮 提交于 2020-12-17 23:23:49
感谢此兄: https://blog.51cto.com/huwei555/2341513?source=dra (centos7 安装rabbitmq 3.7) 以root用户登录。 cd /home/soft 安装依赖包 yum -y update yum install gcc gcc-c++ glibc-devel make ncurses-devel openssl-devel xmlto unixODBC-devel -y 安装各种依赖 wget –no-cache http://www.convirture.com/repos/definitions/rhel/6.x/convirt.repo -O /etc/yum.repos.d/convirt.repo 设置socat依赖包 yum makecache yum install socat 安装socat依赖 安装erlang依赖 wget https://github.com/rabbitmq/erlang-rpm/releases/download/v20.3.8.17/erlang-20.3.8.17-1.el7.centos.x86_64.rpm 从github获取最新版erlang,避免版本太小不支持rabbitmq rpm -ivh erlang-20.3.8.17-1.el7.centos.x86

Haproxy

耗尽温柔 提交于 2020-10-28 11:01:25
一、HAProxy的核心功能 负载均衡:L4和L7两种模式,支持RR/静态RR/LC/IP Hash/URI Hash/URL_PARAM Hash/HTTP_HEADER Hash等丰富的负载均衡算法 健康检查:支持TCP和HTTP两种健康检查模式 会话保持:对于未实现会话共享的应用集群,可通过Insert Cookie/Rewrite Cookie/Prefix Cookie,以及上述的多种Hash方式实现会话保持 SSL:HAProxy可以解析HTTPS协议,并能够将请求解密为HTTP后向后端传输 HTTP请求重写与重定向 监控与统计:HAProxy提供了基于Web的统计信息页面,展现健康状态和流量数据。基于此功能,使用者可以开发监控程序来监控HAProxy的状态 二、HAProxy的关键特性 性能 采用单线程、事件驱动、非阻塞模型,减少上下文切换的消耗,能在1ms内处理数百个请求。并且每个会话只占用数KB的内存。 大量精细的性能优化,如O(1)复杂度的事件检查器、延迟更新技术、Single-buffereing、Zero-copy forwarding等等,这些技术使得HAProxy在中等负载下只占用极低的CPU资源。 HAProxy大量利用操作系统本身的功能特性,使得其在处理请求时能发挥极高的性能,通常情况下,HAProxy自身只占用15%的处理时间,剩余的85