Comments (11)
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.
So ill look at adding a method to interface with upstart to check existing processes
from sos.
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.
Yea we should probably have a discussion on the best way to handle that
from sos.
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.
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.
Yea looks like initctl is the command referenced in the manpages for doing this sort of thing in upstart
from sos.
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.
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.
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.
Closing this as the enablement check was simplified in a0410bd
from sos.
Related Issues (20)
- [flatpak] Missing flatpak versions break sos execution HOT 1
- RFE: run systemd-analyze on various 'targets' HOT 4
- [component] report ignores --tmp-dir from preset
- Adding preset leaves its temp directory
- sos report masking not working if we not used following plugins - host, login, networking. HOT 1
- [slurm] Could not open conf file /etc/slurm/slurm.conf because the slurmd is running in `Configless` mode. HOT 3
- [transport] saltstack causes a final error trying to parse the package list from down nodes
- Sos stores upload passwords in the sos.log and manifest.json files. HOT 10
- sos [report|collect] can leak upload user password to stdout
- [snap] boto version is pinned
- Obtain CNI files for containerd HOT 2
- can't collect KUB stats, plugin can't be used HOT 20
- The sos-4.6.1.tar.gz seems to reference sos-4.6.0 HOT 5
- plugin for Kubeflow HOT 6
- add /run/mount/utab HOT 2
- [ubuntu][microk8s] Extend kubernetes options to microk8s plugin HOT 2
- [plugin] Helm with helm list HOT 6
- implement PROXMOX / PVE plugin HOT 2
- [RFE] Extend `sos clean` to have an option for environment variables HOT 4
- Planning release sos-4.7.0 HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sos.