You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The list command should show also the installed but not enabled, never started services.
This would require dinit (or at least dinitctl) to be able to determine which services have been installed (but not yet loaded). One option would be to assume that every file in the services directory is in fact a service description file, but that seems liable to cause issues; or, attempt to parse every such file as a service description in order to weed out non-service-description files, but that seems like an ugly solution and doesn't completely solve possible issues anyway; or, to have a separate file listing all installed services, which is less prone to accidental confusion between service and non-service but which requires this file to be updated appropriate when services are installed or uninstalled. This latter would be my preferred approach, and patches implementing this are welcome.
Thanks, on a second thought, im not sure if this is the wanted behavior when someone do list... Maybe an option to include them like systemd --all. Or another app is also a good idea. Check if the services are valid is also usefull... even if to do that you just have to try to start it... well an app can check multiple...
I think that the problem to fix here is, "whats the name of the service of the package i installed ?"
It could be just an app that lists the files in the 2 or 3 folders where dinit looks for services. Or it could be a kind of a diagniostic tool. Or do nothing is also an option...
Have thought about it a bit more. I think it makes sense to add an --all option to dinitctl list that causes it to display all non-executable files in the description directories as potential services (probably with some name-based filtering, eg excluding files beginning with dot). It is a better experience for the users if they have this option and it's unlikely that other files should end up in the service directories anyway.
A step back, how to list the running services ?
On my artix it shows all the services that has ever started (around 40) and all with the same status, started, must be something broke.
dinitctl list shows all loaded services regardless of their state. The leading glyphs indicate service state, eg [ {-}] samba-smbd means that samba-smbd is a stopped service, check man dinitctl for more information. There is no way currently to restrict the list to only running services.
You can also use dinitctl status <servicename> to check the state of a single service though that is not completely reliable with the last release due to a bug (it may give an error message, which means nothing about the state of the service; since been fixed in development).
With all above in mind, if dinitctl list is showing all services as started even though some are definitely not currently running, that would be a bug. However, it works fine for me. Try stopping a specific service and re-check status just to be sure.
that was fast! It shows [{+} ] for all the 49 services.
The status of a ghost service gives an error, after I stop the service (both running and non running) list shows the correct stopped status.
Some service has pid:xxx but not all of the really running services.
what services should be shown ? I think, the running services, the enabled services, the manually started and stopped services ? idk , the manually started one-shot services ? idk.
Maybe the "system services" could be hidden, and shown only if the future "--all" option is set ?
By system services i mean the services that are built-in dinit and mandatory.
that was fast! It shows [{+} ] for all the 49 services.
The status of a ghost service gives an error, after I stop the service (both running and non running) list shows the correct stopped status.
Ok so it sounds like all services are running and correctly showing as running.
Some service has pid:xxx but not all of the really running services.
Only process and bgprocess services can have a pid associated.
Maybe the "system services" could be hidden, and shown only if the future "--all" option is set ?
By system services i mean the services that are built-in dinit and mandatory.
There aren't any services built-in to dinit. The only (somewhat) mandatory service is "boot". The services you are seeing are what the distribution provides
There aren't any services built-in to dinit. The only (somewhat) mandatory service is "boot".
Some example: loginready, setup, cleanup, pseudofs, sysusers, vconsole, mount, hostname, misc, modules...
I dont think that one wants to see these when run list... maybe im wrong... How can I call these services ? internal ? os init services ?
Dinit doesn't make any distinction between these services and other services. I think such functionality would have to be part of an external tool. I guess I consider this out-of-scope for DInit itself.
If service don't have any PID-file or ServiceStop command - we can interpret that service as "one time command" (or have a specific "not script" type for that) and those service are immediately "stopped" after command end.
@davmac314 I ran across this issue when searching for a way to list available installed services (ones that are not already enabled). As this issue is a bit dated already, I'm not sure if this has been solved and perhaps I am just unaware of it.. or if it has been deemed as undesirable or unnecessary functionality.
# os: chimera linux
# dinitctl --version
Dinit version 0.19.4pre.
As an example, I have rsync installed, a service files gets installed along with it to /lib/dinit.d/rsyncd, and the service is not enabled, and as such does not show up in dinitctl list.
It would be handy to have a list-available or list --available to show the names of services in dinit readable service directories (dinit.d) that are not currently enabled. This is useful when I install something and when the service name is not the same as the package name, or if I happen to install something and only later decide to enable it.
Currently I use this in a shell alias, but it is a bit of an abomination:
@dropwhile it's an open issue, therefore: it has not been resolved, and it is considered worth doing something about. If it was resolved the issue would be marked as closed.
Activity
davmac314 commentedon Mar 26, 2022
This would require dinit (or at least dinitctl) to be able to determine which services have been installed (but not yet loaded). One option would be to assume that every file in the services directory is in fact a service description file, but that seems liable to cause issues; or, attempt to parse every such file as a service description in order to weed out non-service-description files, but that seems like an ugly solution and doesn't completely solve possible issues anyway; or, to have a separate file listing all installed services, which is less prone to accidental confusion between service and non-service but which requires this file to be updated appropriate when services are installed or uninstalled. This latter would be my preferred approach, and patches implementing this are welcome.
Sure, patches welcome for this too.
jackghg commentedon Mar 26, 2022
Thanks, on a second thought, im not sure if this is the wanted behavior when someone do list... Maybe an option to include them like systemd --all. Or another app is also a good idea. Check if the services are valid is also usefull... even if to do that you just have to try to start it... well an app can check multiple...
I think that the problem to fix here is, "whats the name of the service of the package i installed ?"
jackghg commentedon Mar 28, 2022
It could be just an app that lists the files in the 2 or 3 folders where dinit looks for services. Or it could be a kind of a diagniostic tool. Or do nothing is also an option...
davmac314 commentedon Mar 31, 2022
Have thought about it a bit more. I think it makes sense to add an
--alloption todinitctl listthat causes it to display all non-executable files in the description directories as potential services (probably with some name-based filtering, eg excluding files beginning with dot). It is a better experience for the users if they have this option and it's unlikely that other files should end up in the service directories anyway.jackghg commentedon Mar 31, 2022
good!
jackghg commentedon Apr 20, 2022
A step back, how to list the running services ?
On my artix it shows all the services that has ever started (around 40) and all with the same status, started, must be something broke.
davmac314 commentedon Apr 20, 2022
dinitctl listshows all loaded services regardless of their state. The leading glyphs indicate service state, eg[ {-}] samba-smbdmeans thatsamba-smbdis a stopped service, checkman dinitctlfor more information. There is no way currently to restrict the list to only running services.You can also use
dinitctl status <servicename>to check the state of a single service though that is not completely reliable with the last release due to a bug (it may give an error message, which means nothing about the state of the service; since been fixed in development).With all above in mind, if
dinitctl listis showing all services as started even though some are definitely not currently running, that would be a bug. However, it works fine for me. Try stopping a specific service and re-check status just to be sure.jackghg commentedon Apr 20, 2022
that was fast! It shows [{+} ] for all the 49 services.
The status of a ghost service gives an error, after I stop the service (both running and non running) list shows the correct stopped status.
Some service has pid:xxx but not all of the really running services.
jackghg commentedon Apr 20, 2022
what services should be shown ? I think, the running services, the enabled services, the manually started and stopped services ? idk , the manually started one-shot services ? idk.
Maybe the "system services" could be hidden, and shown only if the future "--all" option is set ?
By system services i mean the services that are built-in dinit and mandatory.
davmac314 commentedon Apr 20, 2022
Ok so it sounds like all services are running and correctly showing as running.
Only process and bgprocess services can have a pid associated.
There aren't any services built-in to dinit. The only (somewhat) mandatory service is "boot". The services you are seeing are what the distribution provides
jackghg commentedon Apr 21, 2022
Some example: loginready, setup, cleanup, pseudofs, sysusers, vconsole, mount, hostname, misc, modules...
I dont think that one wants to see these when run list... maybe im wrong... How can I call these services ? internal ? os init services ?
davmac314 commentedon Apr 21, 2022
Dinit doesn't make any distinction between these services and other services. I think such functionality would have to be part of an external tool. I guess I consider this out-of-scope for DInit itself.
kopavel commentedon Jan 28, 2023
If service don't have any PID-file or ServiceStop command - we can interpret that service as "one time command" (or have a specific "not script" type for that) and those service are immediately "stopped" after command end.
jackffmm commentedon Jun 6, 2023
I'm the OP, this is my new account.
dropwhile commentedon Jan 22, 2025
@davmac314 I ran across this issue when searching for a way to list available installed services (ones that are not already enabled). As this issue is a bit dated already, I'm not sure if this has been solved and perhaps I am just unaware of it.. or if it has been deemed as undesirable or unnecessary functionality.
As an example, I have rsync installed, a service files gets installed along with it to
/lib/dinit.d/rsyncd, and the service is not enabled, and as such does not show up indinitctl list.It would be handy to have a
list-availableorlist --availableto show the names of services in dinit readable service directories (dinit.d) that are not currently enabled. This is useful when I install something and when the service name is not the same as the package name, or if I happen to install something and only later decide to enable it.Currently I use this in a shell alias, but it is a bit of an abomination:
davmac314 commentedon Jan 26, 2025
@dropwhile it's an open issue, therefore: it has not been resolved, and it is considered worth doing something about. If it was resolved the issue would be marked as closed.
That said, it's not high priority.