[systemd-devel] Started process not attach to its related service.
Benoit SCHMID
Benoit.Schmid at unige.ch
Tue Nov 22 08:39:00 UTC 2016
Good morning,
This topic is related to the systemd-sysv-generator thread submited by
my colleague.
I post it with another subject becaus I prefer to create another thread
as it would make too many different questions in the same thread.
1. I have defined a service.
It is started by systemd on boot:
# systemctl status sap
● sap.service - SYSV: Startup/Shutdown SAP and Oracle Listener
Loaded: loaded (/etc/rc.d/init.d/sap; bad; vendor preset: disabled)
Active: active (exited) since Tue 2016-11-22 09:22:23 CET; 3min 7s ago
Docs: man:systemd-sysv-generator(8)
Process: 14124 ExecStart=/etc/rc.d/init.d/sap start (code=exited,
status=0/SUCCESS)
2. This service starts /etc/rc.d/init.d/sap start.
% cat /etc/rc.d/init.d/sap
#!/bin/bash
...
case "$1" in
start)
# Oracle listener and instance startup
echo -n "Starting Oracle Listener: "
su - $ORA_OWNR -c "env ORACLE_HOME=/oracle/XXX/12102
/oracle/XXX/12102/bin/lsnrctl start LISTENER_XXX"
touch /var/lock/subsys/sap
echo "OK"
;;
...
3. The desired process is correctly started:
# ps -ef | grep -i lsnr
oracle 14955 1 0 09:22 ? 00:00:00
/oracle/XXX/12102/bin/tnslsnr LISTENER_XXX -inherit
4. But this process is not attached to sap service.
It is attached to the user-xxxx
CGroup: /
├─1 /usr/lib/systemd/systemd --switched-root --system
--deserialize 2
├─user.slice
...
│ └─user-xxxx.slice
│ └─session-c2.scope
│ └─14955 /oracle/XXX/12102/bin/tnslsnr LISTENER_XXX -inherit
...
Why is the processed attached to user-xxxx.slice instead of sap?
Why has sap no attached process to it?
Thanks in advance for your answers.
--
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Benoit Schmid Tel: (+41-22) 379-7209
University of Geneva - Information Technology Division
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
More information about the systemd-devel
mailing list