Giter VIP home page Giter VIP logo

Comments (11)

jhjaggars avatar jhjaggars commented on July 24, 2024

runlevelByService should have been implemented in the Ubuntu/Debian policy class, but it clearly wasn't. Anybody know how to provide the same information that is found in the redhat policy? (see sos/policies/redhat.py:50)

from sos.

adam-stokes avatar adam-stokes commented on July 24, 2024

So ill look at adding a method to interface with upstart to check existing processes

from sos.

bmr-cymru avatar bmr-cymru commented on July 24, 2024

Cool, thanks - might be an idea to sync up on that if you have some time? I was looking at the whole SysV/Upstart/Systemd spaghetti farm the other day and I'd like to make some cleanups here (either: one godlike startup module that handles all three, or as I'm leaning more toward right now, three separate modules for each - they are essentially orthogonal, can in some (weird) cases be installed together but also have a degree of overlap (compat. files and commands).

from sos.

adam-stokes avatar adam-stokes commented on July 24, 2024

Yea we should probably have a discussion on the best way to handle that

from sos.

bmr-cymru avatar bmr-cymru commented on July 24, 2024

Had a brief look at this today (to try to make a prototype cross-platform sunrpc). I can't seem to find a simple way of querying the runlevels that service $foo is enabled in on Debian/Ubuntu. I've looked at all the rc* and upstart commands and I don't see anything better than reading symlinks and parsing /etc/init stuff (which is gross).

from sos.

bmr-cymru avatar bmr-cymru commented on July 24, 2024

Parsing the output of initctl show-config seems to be the best I can find so far:

# initctl show-config| head -20
avahi-daemon
  start on (filesystem and started dbus)
  stop on stopping dbus
mountall-net
  start on net-device-up
passwd
  start on filesystem
rc
  emits deconfiguring-networking
  emits unmounted-remote-filesystems
  start on runlevel [0123456]
  stop on runlevel [!$RUNLEVEL]
rsyslog
  start on filesystem
  stop on runlevel [06]
tty4
  start on (runlevel [23] and ((not-container or container CONTAINER=lxc) or container CONTAINER=lxc-libvirt))
  stop on runlevel [!23]
udev
  start on virtual-filesystems

from sos.

adam-stokes avatar adam-stokes commented on July 24, 2024

Yea looks like initctl is the command referenced in the manpages for doing this sort of thing in upstart

from sos.

karibou avatar karibou commented on July 24, 2024

I'm revisiting this issue and I have a few questions :
runlevel_by_service is only used by two plugins : nfsserver & sunrpc. The other 26 plugins all use different ways of doing check_enabled().

Shouldn't we just rework these two plugins to not rely on runlevel information in order to defined them as enabled ? Most of the plugins do differently.

While I wait for your comment, I'll work on a patch set which will remove runlevel_by_service alltogether.

from sos.

adam-stokes avatar adam-stokes commented on July 24, 2024

Shouldn't we just rework these two plugins to not rely on runlevel information in order to defined them as enabled ? Most of the plugins do differently.

I think you should go ahead with the patch and we can review it to see if its feasible. Im guessing since the majority of other plugins tests enabled different ways we may be able to bypass 'runlevel_by_service'

from sos.

bmr-cymru avatar bmr-cymru commented on July 24, 2024

Run levels are being consigned to history anyway: what I'm interested in hearing proposals for is a service interface that's general enough to support SysV, systemd and non-Linux service management (i.e.. Windows services, Solaris SMF and OSX launchd). It should allow plug-ins to get a list of all services, as well as those enabled and disabled and to determine whether a given service is enabled or running (not the same thing!) by name.

from sos.

TurboTurtle avatar TurboTurtle commented on July 24, 2024

Closing this as the enablement check was simplified in a0410bd

from sos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.