LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Closed Thread
  Search this Thread
Old 06-17-2022, 04:04 PM   #31
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,550

Rep: Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404

Quote:
Originally Posted by tuxuser1 View Post
This is the daemons supervision offered by Unitd.
I used dbus unit as example.
For the others init systems, if a process receive a SIGKILL, SIGTERM or whatever you want, it will restart but you know nothing about that.
This monitoring is important for security reason as well.
You imagine that someone or the bad code kills your web/application server (just an example).
Unitd inform you that someone is killing your process.
Unitd keeps track all that happen about a process.
The others init systems only restart it but you know nothing!
I'm coding from twenty years and I don't understand how someone doesn't think a similar support.
I was been force to implement it. Believe me, I should prefer go to holiday.
Unitd is not systemd or other.
Unitd was born from my idea which is inside me from ten years.

For the tests, I simulated to send SIGTERM, SIGKILL and SIGQUIT to dbus unit.
So, you ask us to replace the SysV init system and the well tested init scripts of Slackware for... some fancy logs on daemon supervision?

But we have a daemon supervisor included in Slackware 15.0 and it's NOT an init system - it's just a program which executes and watch another program and it's called daemon. You can find it's homepage there:

https://github.com/raforg/daemon

Feel free to contact the daemon's developer and to propose features or patches. Looks like he's a very cool guy. And maybe together with him you can find a way to add your fancy logging to this daemon.

So, please do not tell me we should change the init system and to tailor OMG! WTF? number of unit files, just for doing a proper daemon supervising. Because that's not true, as was demonstrated practically, it's enough a standalone program for this. And we already have it on Slackware.

However, no offense intended, BUT apparently the Slackers aren't that interested about daemon supervision, because looks like they do not use so much the Slackware included daemon supervisor, outside of supervising the PipeWire daemons on user side.

Honestly, personally I use to remember them from time of time that we have a daemon supervisor within Slackware, BUT nobody looks too enthusiast regarding the daemon supervision on the init system scripts.

Regarding how fast is the parallel execution of services by an init system, several people explained already that the speed is not that impressive on a full fledged init system. I for one I will tell you that I do not think that the current openSUSE Tumbleweed boots noticeable faster than Slackware current. Maybe it's a bit faster. BUT, I do not think that that "a bit faster" is worth to change a well tested SysV init system with something like UNITD, which is experimental at best.

I have nothing against you project, BUT I think that you have chosen a wrong target audience.

Because from what I seen, the Slackers aren't that eager to change their SysV init system, they aren't that interested in the daemon supervision and IF you look for Slackware adoption of your UNITD, well... I'm afraid that our lifespan is too short for this to happen. Because Slackware is very, very slow to adopt new major technologies, like is an init system.

Honestly, I believe that Slackware will change it's init system ONLY IF it will be forced/required by the included software to do this. And this may happen to be systemd, because the software depends more and more on its features.

Last edited by LuckyCyborg; 06-17-2022 at 04:20 PM.
 
1 members found this post helpful.
Old 06-17-2022, 04:32 PM   #32
tuxuser1
Member
 
Registered: Nov 2021
Posts: 165

Original Poster
Rep: Reputation: Disabled
When I written this thread was only for informat you that a new init system is out there.
Many users on Slackware uses Runit, included me. Now their have another choice.
I never think to want replace sysvinit.
You are saying that i want to replace sysvinit...I never said and i never thought.
You have built a "tower" uselessly.
Run another daemon to supervision another daemon?
Unitd have not need of that.
Unitd makes that and It makes well. It meets my requirements.
Sysvinit should need it.
I am aboslutely calm and happy.
 
3 members found this post helpful.
Old 06-17-2022, 07:40 PM   #33
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,463
Blog Entries: 7

Rep: Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561
Quote:
Originally Posted by LuckyCyborg View Post
But we have a daemon supervisor included in Slackware 15.0 and it's NOT an init system - it's just a program which executes and watch another program and it's called daemon. You can find it's homepage there:

https://github.com/raforg/daemon
I've asked this before, but could you please provide a practical example of how this would work?

How would we use daemon to supervise (for example) ntpd?
 
Old 06-17-2022, 09:18 PM   #34
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,221

Rep: Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943
Quote:
Originally Posted by rkelsen View Post
I've asked this before, but could you please provide a practical example of how this would work?

How would we use daemon to supervise (for example) ntpd?
I don't know about ntpd specifically, but daemon allows you to "daemonize" any program. I personally use it for running syncthing as my user (automatically brings it up on login, and quits on logout). It's called like this:
Code:
/usr/bin/daemon --respawn --bind --name=syncthing --command='/opt/syncthing/syncthing -no-browser -logfile=default'
Then syncthing is running and can be interacted with through various commands; `daemon --list` will show "syncthing" as a daemonized process. The "--bind" argument means it stops when my user's logind session ends, and "--respawn" will bring it back up if it crashes (you can use --acceptable to set a limit on respawns). There are a bunch of other options but I've not looked into them too much.
 
Old 06-18-2022, 02:18 AM   #35
tuxuser1
Member
 
Registered: Nov 2021
Posts: 165

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by drgibbon View Post
I don't know about ntpd specifically, but daemon allows you to "daemonize" any program. I personally use it for running syncthing as my user (automatically brings it up on login, and quits on logout). It's called like this:
Code:
/usr/bin/daemon --respawn --bind --name=syncthing --command='/opt/syncthing/syncthing -no-browser -logfile=default'
Then syncthing is running and can be interacted with through various commands; `daemon --list` will show "syncthing" as a daemonized process. The "--bind" argument means it stops when my user's logind session ends, and "--respawn" will bring it back up if it crashes (you can use --acceptable to set a limit on respawns). There are a bunch of other options but I've not looked into them too much.
I have some questions:
1 ) That means for each process which I want to supervise, will I call "n" times "/usr/bin/daemon --respawn --bind etc etc?"
2) If someone or something kills your process, daemon informs you of this event ?
3) Does it keep track the old process data?

Last edited by tuxuser1; 06-18-2022 at 03:21 AM.
 
Old 06-18-2022, 03:32 AM   #36
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,550

Rep: Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404
Quote:
Originally Posted by rkelsen View Post
I've asked this before, but could you please provide a practical example of how this would work?

How would we use daemon to supervise (for example) ntpd?
Well, a translation of /etc/rc.d/rc.ntpd to the usage of daemon supervisor will start with instructing the supervised program to not daemonize itself. It should run in foreground, which for ntpd is the parameter '-n'

Also, the daemon supervisor knows how to switch to a particular user itself while running, then we will instruct the daemon (not the ntpd) to run as user ntp and group ntp .

Then, a literal translation of the init script would be like:
Code:
#!/bin/sh
# Start/stop/restart ntpd.

DAEMONARGS="--user=ntp:ntp --pidfiles=/run"

# Start ntpd:
ntpd_start() {
  echo -n "Starting NTP daemon:  /usr/sbin/ntpd -g"
  /usr/bin/daemon $DAEMONARGS --name=ntpd --respawn --command='/usr/sbin/ntpd -g -n'
  echo
}

# Stop ntpd:
ntpd_stop() {
  echo -n "Stopping NTP daemon..."
  /usr/bin/daemon $DAEMONARGS --name=ntpd --stop
  echo
}

# Restart ntpd:
ntpd_restart() {
  /usr/bin/daemon $DAEMONARGS --name=ntpd --restart
}

# Check if ntpd is running
ntpd_status() {
  /usr/bin/daemon $DAEMONARGS --name=ntpd --running --verbose
}

case "$1" in
'start')
  ntpd_start
  ;;
'stop')
  ntpd_stop
  ;;
'restart')
  ntpd_restart
  ;;
'status')
  ntpd_status
  ;;
*)
  echo "usage $0 start|stop|restart|status"
esac
You will note the variable $DAEMONARGS which contains a series of common parameters passed to daemon.

You may avoid its usage by using a configuration file for the daemon, put in the /etc/daemon.conf.d/ntpd.conf and with the content:
Code:
ntpd  user=ntp:ntp,pidfiles=/run
Where the first word from this line represents obviously the --name passed to daemon, while everything else are parameters used for this --name .

In this case, the init script will become:

Code:
#!/bin/sh
# Start/stop/restart ntpd.

# Start ntpd:
ntpd_start() {
  echo -n "Starting NTP daemon:  /usr/sbin/ntpd -g"
  /usr/bin/daemon --name=ntpd --respawn --command='/usr/sbin/ntpd -g -n'
  echo
}

# Stop ntpd:
ntpd_stop() {
  echo -n "Stopping NTP daemon..."
  /usr/bin/daemon --name=ntpd --stop
  echo
}

# Restart ntpd:
ntpd_restart() {
  /usr/bin/daemon --name=ntpd --restart
}

# Check if ntpd is running
ntpd_status() {
  /usr/bin/daemon --name=ntpd --running --verbose
}

case "$1" in
'start')
  ntpd_start
  ;;
'stop')
  ntpd_stop
  ;;
'restart')
  ntpd_restart
  ;;
'status')
  ntpd_status
  ;;
*)
  echo "usage $0 start|stop|restart|status"
esac

Last edited by LuckyCyborg; 06-18-2022 at 02:36 PM.
 
Old 06-18-2022, 03:49 AM   #37
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,550

Rep: Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404
Quote:
Originally Posted by tuxuser1 View Post
I have some questions:
1 ) That means for each process which I want to supervise, will I call "n" times "/usr/bin/daemon --respawn --bind etc etc?"
Yep. In fact, it's supposed this to happen in different init scripts.

Believe or not, the Slackware uses SysV init and init scripts written in the noble Bash language.

Quote:
Originally Posted by tuxuser1 View Post
2) If someone or something kills your process, daemon informs you of this event ?
3) Does it keep track the old process data?
I have no expertise to respond to those questions, neither to evaluate the features usefulness, so how about to ask the daemon's developer directly?

Like I said already, he looks being a very friendly guy, so I'm almost certain that he will explain you in detail.

Anyway, the daemon supervision and the program running as PID EINZ are totally different things, as demonstrated by The Practice.

And anyway, if you believe that those are some really useful features, I think that they should be added eventually to Slackware's daemon supervisor, not the people to change their init system for reasons.

Last edited by LuckyCyborg; 06-18-2022 at 04:12 AM.
 
Old 06-18-2022, 04:00 AM   #38
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,550

Rep: Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404
Quote:
Originally Posted by tuxuser1 View Post
Many users on Slackware uses Runit, included me.
What means "many" to you? Anything more than two or three, but still a number small enough to be counted on a hand?

Last edited by LuckyCyborg; 06-18-2022 at 04:03 AM.
 
Old 06-18-2022, 04:14 AM   #39
tuxuser1
Member
 
Registered: Nov 2021
Posts: 165

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by LuckyCyborg View Post
Yep. In fact, it's supposed this to happen in different init scripts.

Believe or not, the Slackware uses SysV init and init scripts written in the noble Bash language.



I have no expertise to respond to those questions, neither to evaluate the features usefulness, so how about to ask the daemon's developer directly?

Like I said already, he looks being a very friendly guy, so I'm almost certain that he will explain you in detail.

Anyway, the daemon supervision and the program running as PID EINZ are totally different things, as demonstrated by The Practice.

And anyway, if you believe that those are some really useful features, I think that they should be added eventually to Slackware's daemon supervisor, not the people to change their init system for reasons.

There is no need to ask to the daemon developer because I don't see some command which retrieves these informations.
Probably, if him doesn't store these informations, I think that him could makes it without problems.
The point is not this. Do we realize how many daemon instances have to we create to do that??? You are crazy!
I never judge the job the other programmers in particular the daemon developer job which will have done a nice work.
You say that my logs are fancy, I'd say that "fancy" is the attempt to add this feature to an now obsolete init system. It had its life. The world goes on!
To the slowness we also add useless resources usage.
I can bet that after seeing Unitd supervision many programmers will add their project a similar support.
I didn't write that before because i don't know sysvinit and how it works but now, seems clear the advantages which Unitd leads on the table.
Unitd also offers an interface for someone who wants a GUI.
Last but not least, the software design of Unitd should permit whatever changes.

Personal Opinion
I worked for many years in IT world and I always saw that the companies refuse to use systemd free distro
on their servers because the processes administration tools which their offer are not enough.
The systemd free distro was always installed on the simple desktop of a generic person which hasn't particular meets but never on the server.
Unitd can invert this trend offering a processes supervision, informations that nobody offer with fastness and lightness.
 
1 members found this post helpful.
Old 06-18-2022, 05:34 AM   #40
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,550

Rep: Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404Reputation: 3404
Quote:
Originally Posted by tuxuser1 View Post
The point is not this. Do we realize how many daemon instances have to we create to do that??? You are crazy!
Technically and practically, ZERO.

As you noticed, the Slackers are so interested about daemon supervision that 4 (four) months later after the release of Slackware 15.0 they still asks about basic examples of the daemon supervisor usage in the init scripts.

Quote:
Originally Posted by tuxuser1 View Post
You say that my logs are fancy, I'd say that "fancy" is the attempt to add this feature to an now obsolete init system. It had its life. The world goes on!
I heard those slogans 15 years ago or so in the Ubuntu forums.

IF someone dared to ask a question about SysV init (the one with a bunch of symlinks) there was a bunch of Masters of Nothing who loved to derail the thread on how obsolete is SysV init.

You know what? When Ubuntu adopted systemd, honestly I loved to see them running away yelling that the world is doomed and with a big carrot stuck on their back. I've laugh with tears!

Quote:
Originally Posted by tuxuser1 View Post
To the slowness we also add useless resources usage.
Blah, blah, blah. Again, those are slogans known by mine since 15 years at least. You can do better, you know?

Quote:
Originally Posted by tuxuser1 View Post
I worked for many years in IT world and I always saw that the companies refuse to use systemd free distro
on their servers because the processes administration tools which their offer are not enough.
Nope. It's only about admins training...

When you learn Fedora's init system, you know also how to handle Ubuntu, SUSE or even Arch Linux. Because they use the same init system. All of them uses systemd.

Quote:
Originally Posted by tuxuser1 View Post
The systemd free distro was always installed on the simple desktop of a generic person which hasn't particular meets but never on the server.
What makes you to believe that Slackware is a "systemd free" distribution?

In fact, there's no official statement that Slackware is "antisystemd" distro and it already contains elogind and eudev, which represents 2/3 of original systemd solution.

In fact, with your so original systemd init system, err... unitd, the Slackware will complete the original solution of systemd. With units on init system!

Quote:
Originally Posted by tuxuser1 View Post
Unitd can invert this trend offering a processes supervision, informations that nobody offer with fastness and lightness.
Blah, blah, blah. Keep dreaming about our PID EINZ!

Last edited by LuckyCyborg; 06-18-2022 at 09:14 AM.
 
Old 06-18-2022, 05:50 AM   #41
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,463
Blog Entries: 7

Rep: Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561
Quote:
Originally Posted by LuckyCyborg View Post
As you noticed, the Slackers are so interested about daemon supervision that 4 (four) months later after the release of Slackware 15.0 they still asks about basic examples of the daemon supervisor usage in the init scripts.
To be fair, I'm not convinced that it's required. The Slackware servers I administer (which are being used for commercial purposes) have never had a service fail.

At this point the record is measured in decades.
 
2 members found this post helpful.
Old 06-18-2022, 06:28 AM   #42
tuxuser1
Member
 
Registered: Nov 2021
Posts: 165

Original Poster
Rep: Reputation: Disabled
Until I don't show you the supervision, you spoke about it,
now you say that the slackers are not interested to a daemon supervision... hahahah
You are great and very fun!!
Now the advantages that Unitd brings on the table are clear and cristallin like the water.
You can judge, attack or whatever you want but the facts are these.
Happy week-end and stay serene!
 
Old 06-18-2022, 07:15 AM   #43
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,065

Rep: Reputation: Disabled
Quote:
Originally Posted by tuxuser1 View Post
Now the advantages that Unitd brings on the table are clear and cristallin like the water.
For you, indeed. If for others too, they will try it.
 
Old 06-18-2022, 11:01 PM   #44
linuxdaddy
Member
 
Registered: May 2022
Location: New Mexico, USA
Distribution: Slackware 15.0 & 64 bit-current, antiX
Posts: 118

Rep: Reputation: 29
Just a few thoughts, OP posted this was an idea and interested persons thing and got
blasted on here as trying to reform Slackware is a harsh wow. Don't post new ideas
on here is what I gather from this . I was jumped on the other thread for merely asking
when to update. Not a very friendly thing. Been using Slackware since V3.2 kernel 2.0.29

as OP posted "Exactly, Unitd was born for who wants use it.
Linux is freedom."

They had no implications on reforming Slackware and this post has a lot of "we" statements that imply
they are part of dev. WOW, I guess free to post new ideas is a no-no !!

Last edited by linuxdaddy; 06-18-2022 at 11:19 PM.
 
4 members found this post helpful.
Old 06-19-2022, 05:53 AM   #45
ZhaoLin1457
Senior Member
 
Registered: Jan 2018
Posts: 1,032

Rep: Reputation: 1238Reputation: 1238Reputation: 1238Reputation: 1238Reputation: 1238Reputation: 1238Reputation: 1238Reputation: 1238Reputation: 1238
Quote:
Originally Posted by linuxdaddy View Post
Just a few thoughts, OP posted this was an idea and interested persons thing and got
blasted on here as trying to reform Slackware is a harsh wow. Don't post new ideas
on here is what I gather from this . I was jumped on the other thread for merely asking
when to update. Not a very friendly thing. Been using Slackware since V3.2 kernel 2.0.29
I think that this thread was quite civil compared with what Mr. Pottering got, after all...

I understand that when you staring at other peoples Pid One, you should also have a hippopotamus skin.

Quote:
Originally Posted by linuxdaddy View Post
as OP posted "Exactly, Unitd was born for who wants use it.
Linux is freedom."
I would believed you if OP would have posted this news thread in the Fedora Forums. But he did not did it, and even he did it, they would have laugh in his face.

Then why he posted here, in the forum of a Linux distribution using SysV init? Because I suspect that in his mind is nothing about "freedom", but about potential "market" as he thinks that SysV is obsolete.

Quote:
Originally Posted by linuxdaddy View Post
They had no implications on reforming Slackware and this post has a lot of "we" statements that imply
they are part of dev.
Announcing his invention in the Slackware Forums and not in the Fedora's of Arch's Forums, respectfully I ask you to believe something else.

However, the Slackware 15.0 was released with some of its features like Wayland suport for KDE Plasma5 or a functional PipeWire, because there was some regular users who teamed up and solved some particular issue of software which wants systemd.

Out of brilliant work of Mr. Hameleers there was LuckyCyborg and GMGF who struggled with taming elogind to bling up the Plasma5 on Wayland. There was LuckyCyborg, 0XBF. me, marav and many others who struggled with taming the PipeWire daemons, widely used on Wayland and by those who want a better alternative to PulseAudio.

So, yes. There is a "we" of regular users who struggled and sweated to make work software which otherwise needs systemd. All this effort was done in the premise that Slackware uses its custom SysV init system and it's landmark.

Quote:
Originally Posted by linuxdaddy View Post
WOW, I guess free to post new ideas is a no-no !!
Again, I would have been agreed with you if OP posted a thread in the Fedora Forums, but he posted here, in the forums of a Linux distribution who still uses the "obsolete" SysV init.

Looks like it's all about "market" and don't let me imagine Slackware adopting unitd and several years later "we" , as in Slackware community, running donation mills because his dog got cancer or an airplane landed on his cat.

Why "we" should take care about his dog's health issues, considering that SysV init exists since immemorial times and anyway there's systemd if we can't live without init services handled by "units" ?

Then let "us" to explain him that we have no strong feeling against systemd, runit or unitd, but "we" just want to use SysV init, for what we sweated for.
 
1 members found this post helpful.
  


Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
init: execv(“/system/bin/init”) failed / No such file or directory / cyclic reboots while trying to virtualize android on my jetson nano marietto Linux - Virtualization and Cloud 3 04-05-2021 11:59 AM
Ubutnu won't boot. Error: Target file system doesn't have /sbin/init. No init found. Zeljka_Lin Linux - Newbie 9 05-02-2011 06:56 AM
What is the exact diff between init 1,init S and init s challavijay Linux - Newbie 1 08-05-2010 06:51 AM
System hangs,if gives init 3 or init 4 Sailaja Reddy Red Hat 1 09-20-2004 01:31 AM
Redhat linux9.0:System hangs,if gives init 3 or init 4 Sailaja Reddy Linux - Newbie 4 09-16-2004 03:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration