J
J
juffinhalli2012-05-11 11:52:43
linux
juffinhalli, 2012-05-11 11:52:43

Can you tell us real cases of benefit from inetd?

Good afternoon, hackers!
Please explain the possibilities of using inetd. In theory, there are many beautiful words "superserver", etc.
But how useful is this tool in real practice?
The only theoretical advantage that I could see is saving PC resources, but only BEFORE the first request to the running daemons. After the request, we get a theoretical disadvantage from eating resources already by inetd itself and no longer needed. I have not yet found the function to stop the demons, when they have worked their way out and are no longer needed. As a result, I do not see any tangible benefits from its use.
In orthodox Debian, most of the daemons I have encountered support only the standard "inet.d" mechanism for starting and running. The only daemon where the builders of binary packages have provided integration with inetd out of the box is the gradually aging Samba 3.
On the other hand, its description is relatively common in the technical literature and other sources. And, most likely, for good reason.
Please explain where I'm wrong. Is this a rudimentary package or am I just not reading the HOWTO carefully?
Share real cases.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
DmZ, 2012-05-11
@juffinhalli

inetd (and its modification xinetd) does not work with daemons :) In fact, there is a “superserver” that allows you to “simplify” the development of network servers. It starts a copy of the server when it receives a connection and redirects all traffic to the server's stdin/out.
That is, with the standard approach, the network server will go through the following stages: start, daemonize, wait for a connection, receive a connection, process data, close the connection, go to waiting.
And with the inetd approach, it will be: start, process data, exit.
This is convenient if you need to put some control scripts into the world that work with the console, then you can telnet to them via tcp. At one time, scripts for managing labs on a tsiska hung for me - starting / stopping virtual machines, displaying the status.
The simplest example:

#!/bin/bash

echo -n "Test program :) input somethig: "
read VAR
echo "Your input: $VAR"
echo "Bye"

It will work both from the console and via telnet if you hang it on inetd.
It is also convenient to use xinetd to forward ports of some non-critical services, so as not to bother with NAT / firewall.

V
Vitaly Peretyatko, 2012-05-11
@viperet

On the Zyxel router, Keenetic significantly saved memory by running the web server through mini_inetd, since the web server served the admin panel and was needed very rarely, if it was just started, it hangs and constantly eats memory, which the cat cried on the router anyway. Through mini_inetd - it worked great, it was launched only for the duration of request processing.

E
Evgeny Yablokov, 2012-05-12
@Gular

It's better to use xinetd instead of inetd because inetd is very old and full of holes. xinetd is stripped of some of this.
One of the advantages in the same type of configuration of services through it. There is flexibility, but different types of limits and so on can be configured in the standalone mode of services, as a rule.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question