Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/caibingcheng/channel
Transmit message from A to B
https://github.com/caibingcheng/channel
linux redirection socket
Last synced: 1 day ago
JSON representation
Transmit message from A to B
- Host: GitHub
- URL: https://github.com/caibingcheng/channel
- Owner: caibingcheng
- Created: 2024-02-19T10:20:26.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2024-05-20T09:45:12.000Z (6 months ago)
- Last Synced: 2024-05-21T07:56:58.013Z (6 months ago)
- Topics: linux, redirection, socket
- Language: C++
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### channel
**channel** is a output redirection tool on Linux, relies on the network application layer. As no authentication is required, it is not recommended to use it in a public network.
### Usage
#### Basic
Server:
```shell
$ echo "Hello, World!" | channel -s
Hello, World!
```Client:
```shell
$ channel
Hello, World!
```#### Embedded system
It is especially beneficial in embedded systems when resources are insufficient for log files or log processing.
On some embedded systems, the disk space is limited, we cannot store full log files when doing performance testing. **channel** can transmit log in realtime to the host, and the host can write to file or process it.
On the other hand, the embedded system is usually not equipped with powerful environment, such as python/ruby, now we can transmit the output to the host and process it.
Embedded system:
```shell
$ echo "Hello, World!" | channel -s
Hello, World!
# or transmit top command output
$ top -n 1000 -d 1 -b | channel -s
# or transmit application output
$ 2>&1 | channel -s
```Host:
```shell
# just receive and write to file, because the host disk space is sufficient
$ channel -i | tee log.txt
# or receive and process by another command, such as python script
$ channel -i |
```#### Share
Share realtime log with teamates, not copy files anymore.
Your machine:
```shell
$ echo "Hello, World!" | channel -s
Hello, World!
# or transmit log from embedded system
$ channel -i | channel -s
```Your teamate's machine:
```shell
$ channel -i
Hello, World!
```### Compile
```shell
$ make
$ make install
```Or cross compile for ARM:
```shell
$ make CROSS_COMPILE=aarch64-linux-gnu-
$ make install
```