Bug 964760

Summary: systemd-analyze blame doe snot disply "type=simple" services
Product: [Fedora] Fedora Reporter: Harald Reindl <h.reindl>
Component: systemdAssignee: systemd-maint
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: ben.lewis, johannbg, lnykryn, mschmidt, msekleta, notting, plautrba, systemd-maint, vpavlin, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-20 15:19:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Harald Reindl 2013-05-19 16:26:38 UTC
after palying around with my httpd.service and wanted to look if type=simple improves start-time i realized that services with type=simple are missing in systemd-analyze confirmed by also not see preload.service there

more or less a cosmetical problem but however, reported

[root@rh:~]$ rpm -q systemd
systemd-201-2.fc18.7.x86_64
____________________________________________________

[root@rh:~]$ systemd-analyze blame | grep httpd
[root@rh:~]$ systemd-analyze blame | grep preload
____________________________________________________

[root@rh:~]$ systemctl status httpd.service
httpd.service - Apache Webserver
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
   Active: active (running) since So 2013-05-19 18:18:21 CEST; 4min 7s ago
 Main PID: 2194 (httpd)
   CGroup: name=systemd:/system/httpd.service
           ├─2194 /usr/sbin/httpd -D workstation -DFOREGROUND 
           ├─2317 /usr/sbin/httpd -D workstation -DFOREGROUND 
           ├─2318 /usr/sbin/httpd -D workstation -DFOREGROUND 
           ├─2319 /usr/sbin/httpd -D workstation -DFOREGROUND 
           ├─2320 /usr/sbin/httpd -D workstation -DFOREGROUND 
           └─2321 /usr/sbin/httpd -D workstation -DFOREGROUND 

[root@rh:~]$ cat /usr/lib/systemd/system/httpd.service
[Unit]
Description=Apache Webserver
After=network.target network.service named.service nss-lookup.target

[Service]
Type=simple
EnvironmentFile=-/etc/sysconfig/httpd
ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND
ExecReload=/usr/sbin/httpd $OPTIONS -k graceful
ExecStop=/usr/sbin/httpd $OPTIONS -k graceful-stop
KillSignal=SIGCONT
TimeoutStopSec=5
Restart=always
RestartSec=1
UMask=006
PrivateTmp=yes
CapabilityBoundingSet=~CAP_SYS_PTRACE
InaccessibleDirectories=/boot
InaccessibleDirectories=/home
InaccessibleDirectories=/root
InaccessibleDirectories=/usr/local/scripts
InaccessibleDirectories=/var/lib/rpm
InaccessibleDirectories=/var/spool

[Install]
WantedBy=multi-user.target
____________________________________________________

[root@rh:~]$ systemctl status preload.service 
preload.service - Adaptive readahead daemon
   Loaded: loaded (/etc/systemd/system/preload.service; enabled)
   Active: active (running) since So 2013-05-19 18:18:17 CEST; 4min 22s ago
 Main PID: 632 (preload)
   CGroup: name=systemd:/system/preload.service
           └─632 /usr/sbin/preload -f --verbose 1 

[root@rh:~]$ cat /etc/systemd/system/preload.service
[Unit]
Description=Adaptive readahead daemon
After=kdm.service

[Service]
Type=simple
ExecStart=/usr/sbin/preload -f --verbose 1
Restart=always
RestartSec=1
Nice=19
IOSchedulingClass=3

[Install]
WantedBy=multi-user.target

Comment 1 Michal Schmidt 2013-05-20 15:19:00 UTC
"Type=simple" services that have no ExecStartPre commands spend zero time in the activating state. They go from being inactive straight into running.

"systemd-analyze blame" shows only services whose starting time is more than zero.