[systemd-devel] hostname and dnsdomainname
Hi, I can set a hostname with hostnamectl set-hostname --static newHostname I have a DNS domain server in my local LAN. so when I restart the machine, it gets this full hostname, which can be displayed by hostname -f newHostname.mydomanName and hostname alone shows newHostname Is there some way (for example, restarting some service) by which I can be assigned the domain name without performing a full reboot ? Regards, Kevin ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] journalctl - Error was encountered while opening journal files: Invalid argument
On 06/19/2015 09:31 PM, Johannes Ernst wrote: After a reboot, root gets this: # journalctl Error was encountered while opening journal files: Invalid argument No other output. What does 'strace journalctl' say? Thanks, Daniel ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Bind key combination to isolate emergency mode
On Sat, Jun 20, 2015 at 5:26 PM, Thomas Meyer tho...@m3y3r.de wrote: Hi, Is it possible to bind a key combination in systemd to perform a switch into emergency mode or another target? And would this key binding also work in situations where the system is under heavy cpu load and heavy swapping? Sort of. There's a single key combination (Alt+ArrowUp by default) which maps to kbrequest.target, though it only works on the console and not within Xorg the likes. You can pull in emergency.target via that. Also don't forget the magic SysRq keys – Alt+SysRq+F will run the OOM killer in case of heavy swapping, Alt+SysRq+E/I will sigterm/sigkill all programs (systemd will restart gettys afterwards), and Alt+SysRq+N will renice high-priority processes. You need to enable this via sysctl.conf though. -- Mantas Mikulėnas graw...@gmail.com ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Bind key combination to isolate emergency mode
Am Samstag, den 20.06.2015, 18:01 +0300 schrieb Mantas Mikulėnas: On Sat, Jun 20, 2015 at 5:26 PM, Thomas Meyer tho...@m3y3r.de wrote: Hi, Is it possible to bind a key combination in systemd to perform a switch into emergency mode or another target? And would this key binding also work in situations where the system is under heavy cpu load and heavy swapping? Sort of. There's a single key combination (Alt+ArrowUp by default) which maps to kbrequest.target, though it only works on the console and not within Xorg the likes. You can pull in emergency.target via that. Also don't forget the magic SysRq keys – Alt+SysRq+F will run the OOM killer in case of heavy swapping, Alt+SysRq+E/I will sigterm/sigkill all programs (systemd will restart gettys afterwards), and Alt+SysRq+N will renice high-priority processes. You need to enable this via sysctl.conf though. Hi Mantas, thanks for the hint. I will try this. I remember that SysRq was once always enabled? It now seems to be disabled in current Fedora releases. I think enabling F key should be default. At least it shouldn't be possbile to do something bad with it, or is it? -- Mantas Mikulėnas graw...@gmail.com ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH][v1]random-seed: Save random seed as early as possible
Hi Lennart, A second thought, splitting systemd-random-seed.service into: 1. systemd-random-seed-load.service: which only do the seed loading job 2. systemd-random-seed-save.service: which will save a new seed, and is After, but not Requires or Wants systemd-random-seed-load.service Both of the services use the same binary systemd-random-seed with different argv[1](load vs save) Seems better than the patch v1, what do you think? 2015-06-19 21:34 GMT+08:00 cee1 fykc...@gmail.com: Hi all, As discussed at http://lists.freedesktop.org/archives/systemd-devel/2015-June/033075.html, this patch saves seed with ** good ** random number as early as possible, as opposed to the original behavior, which saves a random number when shutdown. Note: 1. If seed loading failed, it will not save a new seed. May not be the proper behavior? 2. The STATUS sent by the second and third sd_notify() are not shown in systemctl status systemd-random-seed.service, need some kind of improvement. Please comment and give suggestions :) -- Regards, - cee1 -- Regards, - cee1 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Bind key combination to isolate emergency mode
Hi On Sat, Jun 20, 2015 at 4:26 PM, Thomas Meyer tho...@m3y3r.de wrote: Hi, Is it possible to bind a key combination in systemd to perform a switch into emergency mode or another target? And would this key binding also work in situations where the system is under heavy cpu load and heavy swapping? That's not implemented, no. You'd have to write a daemon which does this yourself. Thanks David ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [ANNOUNCE] systemd v221
2015-06-20 2:06 GMT+08:00 Lennart Poettering lenn...@poettering.net: On Fri, 19.06.15 16:06, Lennart Poettering (lenn...@poettering.net) wrote: Heya! It's primarily a bugfix release, but we also make sd-bus.h and sd-event.h public. (A blog story on sd-bus and how to use it will follow shortly.) The blog story is online now: http://0pointer.net/blog/the-new-sd-bus-api-of-systemd.html Enjoy, Glad to see this :) BTW, what about libabc? Would libsystemd be part of libabc? Also libsystemd is a linux-specific library, will it further ports and integrates some kernel libraries to libabc?? -- Regards, - cee1 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Bind key combination to isolate emergency mode
Hi, Is it possible to bind a key combination in systemd to perform a switch into emergency mode or another target? And would this key binding also work in situations where the system is under heavy cpu load and heavy swapping? With kind regards Thomas ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Improve boot-time of systemd-based device, revisited
2015-06-19 15:34 GMT+08:00 Chaiken, Alison ali...@she-devel.com: cee1 fykc...@gmail.com writes: 3.1 consider disabling readahead collection in the shipped devices, but leave readahead replay enabled. ceel, are you aware that readahead is deprecated in systemd and has not been included since about release 216? Some of us in automotive are still working on it. I have some patches here https://github.com/chaiken/systemd-hacks/tree/packfilelist against 215 that add various features. We may soon be forward-porting these, along with readahead itself, to the latest version. Glad to hear that :) The readahead doesn't work very well on my experiment, I spent considerable time performing boot experiments on production hardware, including trying different I/O schedulers.My conclusion was that readahead provides benefits in boot-time only when large, monolithic binaries start. If these gigantic applications were rearchitected to be more modular and could load libraries dynamically when needed instead of all at once, I suspect that the speedup associated with readahead would vanish. Nonetheless, under the right conditions, readahead may speed up boot on real hardware in product-relevant conditions. The problem is actually quite complex in the case of eMMC boot devices, which have their own sophisticated embedded controllers. To properly optimize the whole system, we need to know the behavior of that controller and model what happens at boot in the full system using different Linux I/O schedulers and readahead strategies. Unfortunately we don't have all that information. My suspicion is that we might actually boot faster from raw NAND flash, but then of course we have to perform our own wear-levelling and block sparing. BTW, I wonder whether the F2FS helps, which seems very friendly to flash storage. The replaying sequence: A, B, C The actual requesting sequence: C, B, A If we can figure out the requesting sequence, it can achieve real read ahead[1]. I have verified in detail that readahead worked as intended: the degree to which the system was I/O-bound did decrease, even in cases where there was no net speedup. Any idea why? 4. Get rid of systemd-cgroups-agent. This requires introduction of a new kernel interface to get notifications for cgroups running empty, for example via fanotify() on cgroupfs. Is there any related work in processing? Are you aware of JoinControllers? You appear to have old versions of software, which doesn't garner much sympathy from developers. So this option can reduce the times of invoking systemd-cgroups-agent? Note the points list in my previous mail come from http://freedesktop.org/wiki/Software/systemd/Optimizations/ and https://wiki.tizen.org/wiki/Automotive_Fast_Boot_Optimization, they seems interesting to me. These makes it hard to use systemd in a customized system. The Linux services business benefits from churn in userspace code . . . Kernel scheduler of an analogy - there's no kernel scheduler specific for embedded device, nor a kernel scheduler specific for linux server, but a scheduler for all the cases. So it should do with systemd, right? What I call for is to make the cold boot logic declarative, something like: main.c: log_to_A mount_X mount_Y Good news: you are free to choose SysVInit. What I mean is the initialization stage of systemd, that's e.g. mounting the API filesystem, etc. I expect a declarative expression of that, which will help to customization and debugging(without going deep to the code) I wonder whether a property system also makes sense in systemd's world? systemd unit files are already declarative lists of properties, right? The property system is something likes a system preference system(i.e. similar to a system dconf), IIRC, os x has a similar thing. My question is do we need a similar thing in systemd world, since systemd seems aiming to provide the basic infrastructure of a linux distribution? -- Regards, - cee1 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [ANNOUNCE] systemd v221
On Sat, Jun 20, 2015 at 6:08 PM, cee1 fykc...@gmail.com wrote: 2015-06-20 2:06 GMT+08:00 Lennart Poettering lenn...@poettering.net: On Fri, 19.06.15 16:06, Lennart Poettering (lenn...@poettering.net) wrote: Heya! It's primarily a bugfix release, but we also make sd-bus.h and sd-event.h public. (A blog story on sd-bus and how to use it will follow shortly.) The blog story is online now: http://0pointer.net/blog/the-new-sd-bus-api-of-systemd.html Enjoy, Glad to see this :) BTW, what about libabc? Would libsystemd be part of libabc? Also libsystemd is a linux-specific library, will it further ports and integrates some kernel libraries to libabc?? Assuming you mean this: https://git.kernel.org/cgit/linux/kernel/git/kay/libabc.git Libabac is an example stub that does absolutely nothing, and in the future it will keep doing nothing. Kay ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] journalctl - Error was encountered while opening journal files: Invalid argument
On Jun 19, 2015, at 23:37, Daniel Mack dan...@zonque.org wrote: On 06/19/2015 09:31 PM, Johannes Ernst wrote: After a reboot, root gets this: # journalctl Error was encountered while opening journal files: Invalid argument No other output. What does 'strace journalctl' say? # strace journalctl execve(/usr/bin/journalctl, [journalctl], [/* 18 vars */]) = 0 brk(0) = 0x7f1c03a8d000 access(/etc/ld.so.preload, R_OK) = -1 ENOENT (No such file or directory) open(/etc/ld.so.cache, O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=204989, ...}) = 0 mmap(NULL, 204989, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f1c036d close(3)= 0 open(/usr/lib/librt.so.1, O_RDONLY|O_CLOEXEC) = 3 read(3, \177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0\0\1\0\0\0\220!\0\0\0\0\0\0..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=31672, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1c036cf000 mmap(NULL, 2128856, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f1c032da000 mprotect(0x7f1c032e1000, 2093056, PROT_NONE) = 0 mmap(0x7f1c034e, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7f1c034e close(3)= 0 open(/usr/lib/liblzma.so.5, O_RDONLY|O_CLOEXEC) = 3 read(3, \177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\0\1\0\0\0\2001\0\0\0\0\0\0..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=154288, ...}) = 0 mmap(NULL, 2249360, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f1c030b4000 mprotect(0x7f1c030d9000, 2093056, PROT_NONE) = 0 mmap(0x7f1c032d8000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x24000) = 0x7f1c032d8000 close(3)= 0 open(/usr/lib/liblz4.so.1, O_RDONLY|O_CLOEXEC) = 3 read(3, \177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\0\1\0\0\0\300$\0\0\0\0\0\0..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=71968, ...}) = 0 mmap(NULL, 2167144, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f1c02ea2000 mprotect(0x7f1c02eb3000, 2093056, PROT_NONE) = 0 mmap(0x7f1c030b2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0x7f1c030b2000 close(3)= 0 open(/usr/lib/libgcrypt.so.20, O_RDONLY|O_CLOEXEC) = 3 read(3, \177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\0\1\0\0\0\0\221\0\0\0\0\0\0..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=919976, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1c036ce000 mmap(NULL, 3016352, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f1c02bc1000 mprotect(0x7f1c02c98000, 2097152, PROT_NONE) = 0 mmap(0x7f1c02e98000, 40960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd7000) = 0x7f1c02e98000 close(3)= 0 open(/usr/lib/libacl.so.1, O_RDONLY|O_CLOEXEC) = 3 read(3, \177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\0\1\0\0\0\300 \0\0\0\0\0\0..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=35384, ...}) = 0 mmap(NULL, 2130592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f1c029b8000 mprotect(0x7f1c029c, 2093056, PROT_NONE) = 0 mmap(0x7f1c02bbf000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7f1c02bbf000 close(3)= 0 open(/usr/lib/libpthread.so.0, O_RDONLY|O_CLOEXEC) = 3 read(3, \177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0\0\1\0\0\0\320`\0\0\0\0\0\0..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=142832, ...}) = 0 mmap(NULL, 2213040, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f1c0279b000 mprotect(0x7f1c027b3000, 2093056, PROT_NONE) = 0 mmap(0x7f1c029b2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7f1c029b2000 mmap(0x7f1c029b4000, 13488, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f1c029b4000 close(3)= 0 open(/usr/lib/libc.so.6, O_RDONLY|O_CLOEXEC) = 3 read(3, \177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0\0\1\0\0\0\260\10\2\0\0\0\0\0..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=1979984, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1c036cd000 mmap(NULL, 3807760, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f1c023f9000 mprotect(0x7f1c02592000, 2093056, PROT_NONE) = 0 mmap(0x7f1c02791000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x198000) = 0x7f1c02791000 mmap(0x7f1c02797000, 14864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f1c02797000 close(3)= 0 open(/usr/lib/libgpg-error.so.0, O_RDONLY|O_CLOEXEC) = 3 read(3, \177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\0\1\0\0\0\20)\0\0\0\0\0\0..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=76320, ...}) = 0 mmap(NULL, 2171480, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
Re: [systemd-devel] Can kdbus send signal to the source connection?
Hi, After removing /usr/lib/systemd/systemd-cgroups-agent, all seems to work OK. Thank you for your help! Best Regards, Li Cheng At 2015-06-17 18:16:06, eshark eshar...@163.com wrote: Hi, With my kdbus broadcast patch, I found that the systemd process would endlessly emit the signal type=signal sender=:1.2 destination=n/a object=/org/freedesktop/systemd1/agent interface=org.freedesktop.systemd1.Agent member=Released .What does this signal mean ? I searched the source codes, and found that systemd-cgroups-agent would send this signal. But from the log, systemd-cgroups-agent only send this signal several times , not endlessly. And I cannot locate the place where systemd send such signal. Following are the logs: 27[3.633361@3] systemd-cgroups-agent[196]: Lch-sd_bus_emit_signal org.freedesktop.systemd1.Agent Released 27[3.633660@2] systemd-cgroups-agent[216]: Lch-sd_bus_emit_signal org.freedesktop.systemd1.Agent Released 6[3.633989@2] Lch-kdbus_bus_broadcast: conn_dst-id = 0x14, pid = 216, pid name = systemd-cgroups, tid = 216, tid name = systemd-cgroups 30[3.634008@2] systemd-cgroups-agent[216]: Lch-Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/agent interface=org.freedesktop.systemd1.Agent member=Released cooki e=1 reply_cookie=0 error=n/a 30[3.648452@0] systemd[1]: Lch-Got message type=signal sender=:1.2 destination=n/a object=/org/freedesktop/systemd1/agent interface=org.freedesktop.systemd1.Agent member=Released cookie=1 reply_cookie =0 error=n/a 6[3.650378@0] EXT4-fs (mmcblk0p9): re-mounted. Opts: (null) 6[3.652074@3] Lch-kdbus_bus_broadcast: conn_dst-id = 0x12, pid = 196, pid name = systemd-cgroups, tid = 196, tid name = systemd-cgroups 30[3.652220@3] systemd-cgroups-agent[196]: Lch-Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/agent interface=org.freedesktop.systemd1.Agent member=Released cooki e=1 reply_cookie=0 error=n/a 6[3.652284@3] Lch-kdbus_bus_broadcast: conn_dst-id = 0x2, pid = 1, pid name = systemd, tid = 1, tid name = systemd 30[3.653329@3] systemd[1]: Lch-Sent message type=signal sender=:1.2 destination=n/a object=/org/freedesktop/systemd1/agent interface=org.freedesktop.systemd1.Agent member=Released cookie=1 reply_cooki e=0 error=n/a 30[3.654166@3] systemd[1]: Lch-Got message type=signal sender=:1.20 destination=n/a object=/org/freedesktop/systemd1/agent interface=org.freedesktop.systemd1.Agent member=Released cookie=1 reply_cooki e=0 error=n/a 6[3.654642@3] Lch-kdbus_bus_broadcast: conn_dst-id = 0x2, pid = 1, pid name = systemd, tid = 1, tid name = systemd 30[3.654784@3] systemd[1]: Lch-Sent message type=signal sender=:1.20 destination=n/a object=/org/freedesktop/systemd1/agent interface=org.freedesktop.systemd1.Agent member=Released cookie=1 reply_cook ie=0 error=n/a 30[3.654958@3] systemd[1]: Lch-Got message type=signal sender=:1.18 destination=n/a object=/org/freedesktop/systemd1/agent interface=org.freedesktop.systemd1.Agent member=Released cookie=1 reply_cooki e=0 error=n/a ... 6[ 809.109334@1] Lch-kdbus_bus_broadcast: conn_dst-id = 0x2, pid = 1, pid name = systemd, tid = 1, tid name = systemd 30[ 809.109397@1] systemd[1]: Lch-Sent message type=signal sender=:1.2 destination=n/a object=/org/freedesktop/systemd1/agent interface=org.freedesktop.systemd1.Agent member=Released cookie=1 reply_cooki e=0 error=n/a 30[ 809.109481@1] systemd[1]: Lch-Got message type=signal sender=:1.2 destination=n/a object=/org/freedesktop/systemd1/agent interface=org.freedesktop.systemd1.Agent member=Released cookie=1 reply_cookie =0 error=n/a 6[ 809.109726@1] Lch-kdbus_bus_broadcast: conn_dst-id = 0x2, pid = 1, pid name = systemd, tid = 1, tid name = systemd 30[ 809.109789@1] systemd[1]: Lch-Sent message type=signal sender=:1.2 destination=n/a object=/org/freedesktop/systemd1/agent interface=org.freedesktop.systemd1.Agent member=Released cookie=1 reply_cooki e=0 error=n/a 30[ 809.109872@1] systemd[1]: Lch-Got message type=signal sender=:1.2 destination=n/a object=/org/freedesktop/systemd1/agent interface=org.freedesktop.systemd1.Agent member=Released cookie=1 reply_cookie =0 error=n/a Thanks! Li Cheng At 2015-06-17 14:11:11, eshark eshar...@163.com wrote: Hi, I'm so sorry for not giving you more details, I'm a freshman here, but I'll try to do better in the future. I will give the answers under each of the questions . At 2015-06-16 18:54:23, David Herrmann dh.herrm...@gmail.com wrote: Hi On Tue, Jun 16, 2015 at 12:07 PM, eshark eshar...@163.com wrote: At 2015-06-16 15:54:10, David Herrmann dh.herrm...@gmail.com wrote: Can you be more specific, please? What do you mean by network module of our systemd cannot work OK? Does this only happen with kdbus? Yes. It's OK with DBus. Does this only happen with you kdbus-patch to make broadcasts being sent to oneself? Yes.