summaryrefslogtreecommitdiff
path: root/src/core/manager.c
AgeCommit message (Collapse)Author
2013-06-02analyze: show unit file loading on plotThomas Hindoe Paaboel Andersen
This will add another color to the legend called "Loading unit files" Like the generators it will mark a part of the systemd bar indicating the time spent while loading unit files.
2013-06-02analyze: show generators on plotUmut Tezduyar
2013-05-30systemctl: suggest 'systemctl daemon-reload' without --systemZbigniew Jędrzejewski-Szmek
--system is default anyway, and some poor user might type 9 characters without needing to.
2013-05-29systemd: record efi timestamps after /sys is mountedZachary Cook
This partially reverts commit c3a170f3, which moved efi_get_boot_timestamps too early in main(), before /sys is assured to be mounted Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64371 [tomegun: in particular /sys/firmware/efi/efivars needs to be mounted, which is not a problem if a systemd-initramfs containing the correct module is being used. But not everyone uses an initramfs...]
2013-05-09Start ctrl-alt-del.target irreversiblyEelco Dolstra
This makes ctrl-alt-del reboots more robust, just like "systemctl reboot".
2013-04-25unit: rework stop pending logicLennart Poettering
When a trigger unit wants to know if a stop is queued for it, we should just check precisely that and do not check whether it is actually stopped already. This is because we use these checks usually from state change calls where the state variables are not updated yet. This change splits unit_pending_inactive() into two calls unit_inactive_or_pending() and unit_stop_pending(). The former checks state and pending jobs, the latter only pending jobs.
2013-04-25systemd: record the timestamps as early as possibleHarald Hoyer
The time for systemd initialization and selinux policy loading is accounted to the initrd or the kernel, which is wrong. Instead of: Startup finished in 5.559s (firmware) + 36ms (loader) + 665ms (kernel) + 975ms (initrd) + 1.410s (userspace) = 8.647s the more correct output is: Startup finished in 5.559s (firmware) + 36ms (loader) + 665ms (kernel) + 475ms (initrd) + 1.910s (userspace) = 8.647s
2013-04-24Add set_consume which always takes ownershipZbigniew Jędrzejewski-Szmek
Freeing in error path is the common pattern with set_put().
2013-04-18move _cleanup_ attribute in front of the typeHarald Hoyer
http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html
2013-04-17systemd: ignore hw timestamps in containersZbigniew Jędrzejewski-Szmek
They are irrelevant and misleading. E.g. systemd-analyze: Startup finished in 6d 4h 15min 32.330s (kernel) + 49ms 914us (userspace) = 6d 4h 15min 32.380s becomes Startup finished in 53.735ms (userspace) = 53.735ms which looks much better :)
2013-04-08Do not serialize environment, when switching rootHarald Hoyer
When switching root, i.e. LANG can be set to the locale of the initramfs or "C", if it was unset. When systemd deserializes LANG in the real root this would overwrite the setting previously gathered by locale_set(). To reproduce, boot with an initramfs without locale.conf or change /etc/locale.conf to a different language than the initramfs and check a daemon started by systemd: $ tr "$\000" '\n' </proc/$(pidof sshd)/environ | grep LANG LANG=C To prevent that, serialization of environment variables is skipped, when serializing for switching root. https://bugzilla.redhat.com/show_bug.cgi?id=949525
2013-04-05Use initalization instead of explicit zeroingZbigniew Jędrzejewski-Szmek
Before, we would initialize many fields twice: first by filling the structure with zeros, and then a second time with the real values. We can let the compiler do the job for us, avoiding one copy. A downside of this patch is that text gets slightly bigger. This is because all zero() calls are effectively inlined: $ size build/.libs/systemd text data bss dec hex filename before 897737 107300 2560 1007597 f5fed build/.libs/systemd after 897873 107300 2560 1007733 f6075 build/.libs/systemd … actually less than 1‰. A few asserts that the parameter is not null had to be removed. I don't think this changes much, because first, it is quite unlikely for the assert to fail, and second, an immediate SEGV is almost as good as an assert.
2013-04-04util: add a bit of syntactic sugar to run short code fragments with a ↵Lennart Poettering
different umask
2013-04-04util: make time formatting a bit smarterLennart Poettering
Instead of outputting "5h 55s 50ms 3us" we'll now output "5h 55.050003s". Also, while outputting the accuracy is configurable. Basically we now try use "dot notation" for all time values > 1min. For >= 1s we use 's' as unit, otherwise for >= 1ms we use 'ms' as unit, and finally 'us'. This should give reasonably values in most cases.
2013-03-31Partially revert e62d8c394474Zbigniew Jędrzejewski-Szmek
The ~80 chars per line part wasn't well received.
2013-03-31ModernizationZbigniew Jędrzejewski-Szmek
Use _cleanup_ and wrap lines to ~80 chars and such.
2013-03-15core: reuse the same /tmp, /var/tmp and inaccessible dirMichal Sekletar
All Execs within the service, will get mounted the same /tmp and /var/tmp directories, if service is configured with PrivateTmp=yes. Temporary directories are cleaned up by service itself in addition to systemd-tmpfiles. Directory which is mounted as inaccessible is created at runtime in /run/systemd.
2013-03-13util, manager: and mempset() and use itMichal Schmidt
Just like mempcpy() is almost identical to memcpy() except the useful return value, so is the relation of mempset() to memset().
2013-03-13manager: use more stpcpy()Michal Schmidt
2013-03-13manager: push back animation timer whenever a job finishesMichal Schmidt
The running jobs animation is supposed to hide itself when jobs are progressing sufficiently fast.
2013-03-06manager: remove timer fd explicitly from epollEnrico Scholz
Forked processes can keep the old fd alive triggering epoll over and over again else. https://bugs.freedesktop.org/show_bug.cgi?id=61697
2013-03-04core/manager: fix conditions to start and stop watching running jobsMichal Schmidt
Harald encountered division by zero in manager_print_jobs_in_progress. Clearly we had the watch enabled when we shouldn't - there were no running jobs in m->jobs, only waiting ones. This is either a deadlock, or maybe some of them would be detected as runnable in the next dispatch of the run queue. In any case we mustn't crash. Fix it by starting and stopping the watch based on n_running_jobs instead of the number of all jobs.
2013-03-02manager: turn a superfluous check into assertMichal Schmidt
The crash that the check prevented has been fixed by commit 9e9e2b7.
2013-03-01manager: print p and then free itLukas Nykryn
2013-03-01core: fix running jobs counters after reload/reexecMichal Schmidt
All active units will call unit_notify() during coldplug, so we just make sure we're counting from zero again and get the correct result for n_on_console. For n_running_jobs we likewise reset it to zero and then count the running jobs as we encounter them in deserialization.
2013-03-01manager: prevent segfault in manager_print_jobs_in_progress()Harald Hoyer
2013-02-28core/manager: print status messages about running jobsMichal Schmidt
Sometimes the boot gets stuck until a timeout hits. The usual timeouts are on the order of minutes, so users may lose patience. Print animated status messages telling the names of units with running jobs to make it easy to see what systemd is waiting for. The animation looks cooler with a shorter interval, but 1 s is OK and should not be too hard on slow serial console users.
2013-02-28util, core: add support for ephemeral status linesMichal Schmidt
Ephemeral status lines do not end with a newline and they expect to be overwritten by the next printed status line.
2013-02-28core/manager: make a couple of functions staticMichal Schmidt
They're not used outside manager.c anymore.
2013-02-28core: add manager_status_printf()Michal Schmidt
unit_status_printf() checks the state of the manager, not of the unit as such. Move it to manager.c and rename it to manager_status_printf(). Temporarily keep unit_status_printf as a wrapper macro.
2013-02-22core, systemctl: add support for irreversible jobsMichal Schmidt
Add a new job mode: replace-irreversibly. Jobs enqueued using this mode cannot be implicitly canceled by later enqueued conflicting jobs. They can however still be canceled with an explicit "systemctl cancel" call.
2013-02-13build-sys: make EFI support build-time optionalLennart Poettering
2013-02-13manager: pass environment over daemon-reexecOleksii Shevchuk
Fixes this bug: alxchk > systemctl --user set-environment A=B alxchk > systemctl --user show-environment | grep ^A= A=B alxchk > systemctl --user daemon-reexec alxchk > systemctl --user show-environment | grep ^A= alxchk >
2013-02-11manager: clean environment before passing it on to othersLennart Poettering
2013-02-06systemd: raise level of message about lookup pathsZbigniew Jędrzejewski-Szmek
This can be pretty important for the user, and is not trivial to figure out in all cases. Also show failing path in error messages.
2013-02-06systemd: do not remove empty paths from unit lookup pathZbigniew Jędrzejewski-Szmek
The ability to start a new unit with 'systemctl start ...' should not depend on whether there are other units in the directory. Previously, an additional 'systemctl daemon-reload' would be necessary to tell systemd to update the list of unit lookup paths.
2013-01-22Replace autoconf int max test with simple defineZbigniew Jędrzejewski-Szmek
2013-01-22Fix some typosEelco Dolstra
2013-01-19core: if the bootloader supports it, determine firmware and boot loader delayLennart Poettering
This allows us to print simple performance data of all parts of the boot now: - firmware - boot loader - kernel - initrd - userspace This only works for bootloaders which support passing TSC data via EFI variables. As of now that's only gummiboot.
2013-01-18build-sys: add autoconf macro to pick macro for x32 compatibilityZbigniew Jędrzejewski-Szmek
2013-01-08core: properly initialize kernel timestampLennart Poettering
2013-01-06systemd: use unit logging macrosZbigniew Jędrzejewski-Szmek
2013-01-06core/manager: modernize styleZbigniew Jędrzejewski-Szmek
2012-12-22nspawn: try to orderly shutdown container when receiving SIGTERMLennart Poettering
2012-12-22socket: support socket activation of containersLennart Poettering
2012-11-25manager: fix build on 32bit systemsLennart Poettering
2012-11-25timer: recalculate next elapse for calendar timer units when the system ↵Lennart Poettering
clock is changed
2012-11-22manager: introduce watch_init() initializer for watchesLennart Poettering
2012-10-18manager: connect SIGRTMIN+24 to terminating --user instancesLennart Poettering
2012-10-13log: introduce a macro to format message idZbigniew Jędrzejewski-Szmek
The MESSAGE_ID=... stanza will appear in countless number of places. It is just too long to write it out in full each time. Incidentally, this also fixes a typo of MESSSAGE is three places.