[systemd-devel] systemd-encrypt is a little painful
Hi guys, After making https://www.youtube.com/watch?v=gh3jkIENmAM I'm thinking the install process could be a lot smoother if: somehow systemd could do the initramfs, i.e. take over mkinitcpio's hook role I don't understand why sd-encrypt can't autodiscover the cryto_LUKS root partition. Appending a line like: options rw rd.luks.name=device-UUID=cryptroot root=/dev/mapper/cryptroot is fraught with error and frustration!! Furthermore if you get the above line wrong, the emergency systemd shell appears completely useless. There is the 1m30s timeout that I can never escape, and the emergency shell is confusing and not fit for purpose in the sense of correcting the /dev/mapper/cryptroot address. If these should be new issues or perhaps they are issues already, then do let me know. https://github.com/systemd/systemd/issues?q=sd-encrypt Sidenote: would be cool if a basic en.network could be generated. Perhaps this is all done already in Fedora? haha, I use Arch btw. Thank you, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Formatting Execstart= for readability
Hi there, I maintain a service file with a lot of switches in the ExecStart https://github.com/kaihendry/pingprom/blob/master/prometheus%40.service#L8 I want to almost document each switch ... e.g. -storage.local.retention=8544h # keep data for a year I know inline comments do *not* work in bash IIUC: https://gist.github.com/kaihendry/ff751622c6454176837b1c340b5cfccb And similarly when I try break up lines on something like https://s.natalian.org/2017-08-16/test.service [Service] ExecStart=/usr/bin/curl -X POST -d "fizz=systemd" # some docs -d "some=else" # more docs https://requestb.in/19v8a0m1 It also doesn't work. Am I missing a tool or way to better format/document process arguments like I want? Many thanks! ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Zero downtime restart of Web application (Nginx, Puma, JRuby)
On Thu, 14 Jul 2016, at 05:07 PM, David Timothy Strauss wrote: > Dokku would be about a 5-10 lines of shell script with services running > in > systemd. I would love to see that 10 lines of shell you claimed, but I think you might be underestimating the fine work that went into Dokku! Cheers, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Zero downtime restart of Web application (Nginx, Puma, JRuby)
On Sat, 18 Jun 2016, at 07:56 PM, Paul Menzel wrote: > Is that possible by just using systemd, or is a load balancer like > HAProxy or a special NGINX configuration and service file templates > needed? I'm looking for answers too and the best switcheroo I've found so far is http://dokku.viewdocs.io/dokku/deployment/zero-downtime-deploys/ which leverages Docker and it's not at all integrated with systemd. Guess a systemd integrated solution would be leveraging machinectl, journalctl and more powerful service control, but I haven't seen an orchestrated deployment like that yet. Maybe CoreOS has something, I am not sure. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Wishlist: HandleLidSwitchDocked ... when powered?
Hi there, I want my T460s machine to suspend on lid close only when it's not charging off mains. I've looked over https://www.freedesktop.org/software/systemd/man/logind.conf.html & https://wiki.archlinux.org/index.php/Power_management and I don't see how this can be achieved. Is it reasonable for me to file a bug on https://github.com/systemd/systemd/ about it? Or am I missing something? Basically I want systemd to consider my laptop being powered by mains as being "docked". I think. Kind regards, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Time synchronization over HTTP?
On Mon, 27 Jun 2016, at 08:33 PM, Reindl Harald wrote: > normally service level agreemnets contain basic prerequisites and if the > are ignored the customers has to pay a penalty in case of support cases You live in a different world to me. Just going to follow up with a blog I found on the matter of “time over HTTPS”: http://phk.freebsd.dk/time/20151129.html Though he considers this method for sanity checking atm. https://twitter.com/bsdphk/status/747346942351544320 So it doesn't really validate my proposal as an authoritative source. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Time synchronization over HTTP?
On Mon, 27 Jun 2016, at 01:03 PM, Mantas Mikulėnas wrote: > Who would host the sync server? Or would you just point it at a random > site > and hope its operators don't mind? It's already bad enough that systemd > defaults to Google's private NTP servers, IMHO. Reminds me of the "Am I on the Internet?" problem. Yeah, most people default to google.com as that example does: https://github.com/ccrisan/motioneyeos/blob/master/board/common/overlay/etc/init.d/S50date#L21 > (I also have a strong dislike for network admins who cling to their "HTTP > only" firewall policies... I don't see why NTP is a 'lesser' protocol > than > HTTP and DNS, both of which require either the respective ports or a > local > proxy in order to work. Timesyncd already supports picking up local NTP > servers from DHCP, afaik.) I'm with you, and I've fought this problem for a while. But the typical confusing "connection untrusted" due to bad time customer support requests is costing me too much. Cheers, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Time synchronization over HTTP?
On Mon, 27 Jun 2016, at 10:42 AM, Reindl Harald wrote: > are you aware that in case of many machines you should setp *one* ntpd > and the other machines only acess this internal host to take away load > from pool.ntp.org which would also solve the problem access port 123 > outside your network from all the other deployments? Yes I am, but the administrators who deploy Webconverger don't do this sadly. I heard from someone that some routers do this automatically, but anyway, it doesn't help me come up with a general solution. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Time synchronization over HTTP?
Hi there, I had a quick look at https://github.com/systemd/systemd/tree/master/src/timesync to try work out if /usr/lib/systemd/systemd-timesyncd had some sort of fallback if ntp UDP port 123 traffic is blocked. This happens all too often with my deployments of Webconverger and I was wondering if asking for HTTP based time synchronization was a sane thing to ask for from systemd. An example implementation can be found here: https://github.com/ccrisan/motioneyeos/blob/master/board/common/overlay/etc/init.d/S50date#L31 Many thanks, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Pulseaudio & systemd-nspawn
On Mon, 2 Nov 2015, at 09:46 PM, Felipe Sateler wrote: > Maybe the better option is to load the tcp pulseaudio module, allow > connections from the container ip, and inject PULSE_SERVER envvar into > the container. Using tcp will not work since I'm using OpenVPN which seems to usurp all network traffic. Any other ideas? Many thanks, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Run cleanup service on stop
On Wed, 4 Nov 2015, at 05:41 PM, Andrei Borzenkov wrote: > Why? It sounds like exact use case for Pre/Post commands. Well, with long lines like: ExecStartPre=/bin/bash -c 'grep -q noclean /etc/webc/cmdline || for d in ~/{.mozilla,.cache,.adobe,.macromedia,Downloads}; do rm -vrf $d; done' ExecStopPost=/bin/bash -c 'grep -q noclean /etc/webc/cmdline || for d in ~/{.mozilla,.cache,.adobe,.macromedia,Downloads}; do rm -vrf $d; done' It looks a little ugly, no? I do realise it could be in a separate shell script. Anyway, I'm keen to learn for completeness sake what I am missing, to trigger a "clean up" service file to execute when stopping my main service. :} Thank you, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Run cleanup service on stop
Hi there guys, I have a service where it's important that it cleans up *after* it's run. In fact it's probably a good idea to make sure it's clean *before* it's run too. I got as far as: After=clean.service Requires=clean.service But that does not seem to clean on stop (say if the machine is shutting down). What am I missing? My alternative approach which seems to work is to use: ExecStartPre=... ExecStopPost=... But it looks a little ugly. Here is my source: http://s.natalian.org/2015-11-03/service-or-exec.tar Be great to review/critique and suggestions for improvement. I would like to get $HOME onto a private tmpfs going into the future, though I am not sure how to achieve that with systemd. Are there any similar examples I could study? Many thanks, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] journalctl's http://localhost:19531/browse
On Tue, 3 Nov 2015, at 02:27 AM, Lennart Poettering wrote: > Hmm, maybe there's something wrong with the ACLs on the journal files > or the directory they reside in? Normally, there should be an ACL that > allows the "systemd-journal" group access to all files, and > systemd-journal-gatewayd is running with that group among its > auxiliary group ids... Still at a loss to resolve this. How I loathe unix permissions. I'd rather run systemd-journal-gatewayd as my user instead systemd+ as it's running now to avoid this time wasting exercise. > CORS? I don't know what that means? It's a Web server header that permits what Web apps can interact with it. https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS So a possible API would be: /usr/lib/systemd/systemd-journal-gatewayd --header="Access-Control-Allow-Origin: *" Which would be seen in the output of `curl -I 'http://localhost:19531/entries?boot'`, and the * would allow any Web app no matter where it's hosted to get log events IIUC. So not a good default but could be useful. :) Cheers, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] journalctl's http://localhost:19531/browse
On Mon, 2 Nov 2015, at 07:58 PM, Colin Guthrie wrote: > I suspect that you'd probably want to hide this behind some kind of > proxy for security reasons. That proxy could add appropriate > authentication (e.g IP restrictions, user auth etc) and add in any > additional headers). > I could be wrong with this suggestion, but this would be my first guess > at how you would solve this problem. You are correct it could be solved by a proxy. A lot of bad APIs can be solved with a proxy. But you must concede that it is an awful obstacle/dependency to getting things done. ;) ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] journalctl's http://localhost:19531/browse
On Mon, 2 Nov 2015, at 06:10 PM, Lennart Poettering wrote: > Note that the website will show only those accessible to the > "systemd-journal" group. > > Did you run "logger" unprivileged? Did you run journalctl privileged? > That might explain the difference? In that video earlier I ran journalctl as my user, so unprivileged, but it still sees my logger commands, unlike http://localhost:19531/browse Though what you said sounds like a good explanation. However how do make the Web interface show my user's `logger` invocations? I did try adding my user to the systemd-journal group, but that didn't seem to solve my issue. > well, systemd-journal-gatewayd serves that already, you can just use > that... Ah! Perfect. Oh but I need a way to setup CORS so I can access it from my Webapp: http://s.natalian.org/2015-11-02/systemd-journal-gatewayd.png Shall I file a bug? https://github.com/systemd/systemd/issues?utf8=%E2%9C%93=is%3Aissue+is%3Aopen+systemd-journal-gatewayd Kind regards, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Pulseaudio & systemd-nspawn
Hi there, I'm trying to have a super simple way of launching a browser in a VPN. I am on Archlinux with systemd 227-1 with pulseaudio 7.1-1 & I have another Arch container configured like so: X1C3:~$ cat /etc/systemd/system/systemd-nspawn@firefox.service.d/override.conf [Service] ExecStart= ExecStart=/usr/bin/systemd-nspawn --bind-ro=/home/hendry/.Xauthority:/root/.Xauthority \ --bind=/tmp/.X11-unix \ --bind=/dev/snd \ --bind=/run/user/1000/pulse:/run/user/1000/pulse \ -D /home/hendry/containers/firefox \ --bind /dev/shm \ --bind /etc/machine-id \ --network-veth -b I then have a script like so: sudo systemctl start systemd-nspawn@firefox sudo systemd-run -M firefox --setenv=DISPLAY=:0 firefox This usually fails on first invocation with: Failed to create bus connection: No such file or directory I guess because the container isn't ready yet. Not sure what the fix is there. The main issue is sound playback. Sound works in Youtube, but not within flashplugin. sudo machinectl -M firefox shell Connected to the local host. Press ^] three times within 1s to exit session. [root@firefox ~]# aplay -l aplay: device_list:268: no soundcards found... Furthermore once I do have sound playback in Youtube in the "firefox" container, my pulseaudio server stops working on my host system: http://s.natalian.org/2015-11-02/1446434406_765x1058.png Any ideas how to share my audio playback device between host and container(s)? Many thanks, p.s. I will update http://dabase.com/e/12009/ when I have found a working setup ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] journalctl's http://localhost:19531/browse
Hi guys, Just playing around with the journalctl Web interface here: http://s.natalian.org/2015-11-02/journalctl.mp4 How come messages like `logger foo` do not appear in http://localhost:19531/browse but they do in `journalctl -b -f`? Is the API for http://localhost:19531/ defined somewhere since I wouldn't mind creating my own Web interface with the JSON. Ideally the server could support text/event-stream like I demonstrate here: https://www.youtube.com/watch?v=XmCDji3t7eg I did notice `journalctl -o json-sse`, but you need a server to hand those off to the browser. How should that be done with libmicrohttpd ?? Cheers, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Calculating Web page loads accurately with systemd-nspawn's network-veth Xorg
On Mon, 24 Aug 2015, at 08:05 PM, Lennart Poettering wrote: I'd be careful with things like this... You invoke firefox as PID 1 then. On UNIX PID 1 is special, it needs to reap foreign children and needs to handle signals differently, thus taking arbitrary processes and running them like this is problematic. Then the typical usage from the systemd-nspawn man page: systemd-nspawn [OPTIONS...] [COMMAND Is a bit flawed, no? Not sure what you are suggesting I should do instead. Run as -b and boot into systemd first? That is annoying since then I need to login, setup DISPLAY env again (not sure why) and then manually run firefox. Wish it was one step! :) http://s.natalian.org/2015-08-25/1440468175_856x1036.png That said running with -n doesn't seem to work without -b since systemd-networkd needs to setup the container's networking, no ? sudo systemd-nspawn --setenv=DISPLAY=:0 \ --setenv=XAUTHORITY=~/.Xauthority \ --bind-ro=$HOME/.Xauthority:/root/.Xauthority \ --bind=/tmp/.X11-unix \ -D ~/containers/firefox \ -n firefox # doesn't work since systemd-networkd isn't being run IIUC ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Calculating Web page loads accurately with systemd-nspawn's network-veth Xorg
Hi there, I've managed to get Firefox running like so: sudo systemd-nspawn --setenv=DISPLAY=:0 \ --setenv=XAUTHORITY=~/.Xauthority \ --bind-ro=$HOME/.Xauthority:/root/.Xauthority \ -D ~/containers/firefox \ firefox However I want to have network isolation so I can calculate Web page loads accurately. When I use --network-veth switch I get: Error: Can't open display: :0 type errors. I assume it's because Xorg can't network to my local host's Xorg server. Any tips how to manage this mapping? I need network isolation going for accurate measurements from $(grep firefox /proc/net/dev), with hopefully _no Xorg traffic_ shown. :} Many thanks, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Calculating Web page loads accurately with systemd-nspawn's network-veth Xorg
On Sun, 23 Aug 2015, at 10:05 PM, Mantas Mikulėnas wrote: Try adding --bind=/tmp/.X11-unix, for the named X11 sockets. Ah! Thank you Mantas. I logged this tip on http://dabase.com/e/12009/ ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Unit type .busname is not supported on this system. when setting up timer
On Thu, 18 Jun 2015, at 07:04 PM, Lennart Poettering wrote: What does systemctl status say for it? http://s.natalian.org/2015-06-18/1434659705_1912x1036.png Sorry, my fault. Seems like I failed to run: systemctl daemon-reload... Many thanks, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Unit type .busname is not supported on this system. when setting up timer
On Thu, 18 Jun 2015, at 07:04 PM, Lennart Poettering wrote: What does systemctl status say for it? http://s.natalian.org/2015-06-18/1434659705_1912x1036.png Sorry, my fault. Seems like I failed to run: systemctl daemon-reload... Many thanks, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Unit type .busname is not supported on this system. when setting up timer
On Thu, 18 Jun 2015, at 06:56 PM, Lennart Poettering wrote: nah, this is completely unrelated. The message was printed on kdbus-less systems. We have now downgraded this so that nobody has to see this unless he turns on debug logging. Ah, ok. Though could you recognise what's wrong with my timer/service ? http://s.natalian.org/2015-06-17/1434580520_1912x1036.png Trying to do a backup whilst no one uses the Internet. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Unit type .busname is not supported on this system. when setting up timer
Hi there, Trying to setup a timer on my Archilnux Arm Raspberry PI running systemd 219-6. Can anyone spot a problem with my timer? http://s.natalian.org/2015-06-17/1434580520_1912x1036.png Getting these wierd error messages like: Unit type .busname is not supported on this system. systemd-analyze verify didn't help. I also wonder if I can somehow stop the rsync job at say 4AM. Kind regards, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] How to debug blocking service start?
On Tue, 7 Apr 2015, at 11:13 PM, Lennart Poettering wrote: What does networkctl status say when this happens? And networkctl status -a? Oooh, I love those commands. Here is the output which says I'm routable: http://s.natalian.org/2015-04-08/networkctl.txt Maybe all of this has something to do with the way I've setup systemd-networkd. I have dejavu now... quite possibly this all is related to: https://bugs.freedesktop.org/show_bug.cgi?id=89352 Kind regards, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] How to debug blocking service start?
Thanks for the reply Lennart! I'm sorry I couldn't attend your FOSSASIA talk in Singapore. I was on holiday. On Sat, 4 Apr 2015, at 12:16 AM, Lennart Poettering wrote: something else that runs before it is hanging hence. What does systemctl list-jobs say before you run this and it hangs? [root@rpi2 ~]# systemctl list-jobs JOB UNIT TYPE STATE 95 surf.service start waiting 97 systemd-networkd-wait-online.service start running 96 network-online.targetstart waiting 3 jobs listed. So, maybe the network-online target is not ever bring hit? I'm using systemd-networkd and I'm certainly online, so I am not sure where the problem lies. Any ideas? Here is the surf service file: http://ix.io/hiQ This is my systemctl http://ix.io/hiR Kind regards, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] How to debug blocking service start?
First, thanks for trying to help me Kai. Awesome name btw. On Fri, 27 Mar 2015, at 03:26 AM, Kai Krakow wrote: Try Type=simple to not let it wait. That is telling systemd, that the binary will not daemonize - athough it should be default according to [1]. It's still getting stuck with Type=simple. http://s.natalian.org/2015-03-27/simple.png Isn't there a better way to debug than running journalctl -u service -f in parallel? The frustrating thing is that the SAME service file works fine on another rpi2. However, I'm not sure whether the rest of the setup will work. You should probably make it a user service, so that you won't have to pass DISPLAY. Your special setup may be part of the problem. Also keep in mind that After=graphical.target doesn't imply that X11 is ready to accept connections You mean systemctl --user right? https://wiki.archlinux.org/index.php/Systemd/User I don't like that since it seems like a lot of extra crud. What's the big deal about passing in the DISPLAY environment? I don't see the point of having a non-root user. Trying to keep things as simple as possible to achieve my use case. Which is to start a browser once online. - even worse: it doesn't imply that it is started late in the boot process. Your service may start as early as graphical.target becomes scheduled to start [3] - and that may be well before even basic system setup is finished. Instead, I suggest using a DM with autologin, and then spawn a user service from there. As an alternative, you may want to try working with timer units [2] to activate surf.service a few seconds after X11 is guarenteed to be up, but that would just be a bandaid. Well, if X wasn't up up, I was hoping Restart=always would do the rest. [1]: man systemd.service [2]: man systemd.timer Timers seem like a kluge, just to know when X is ready. Cheers, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] How to debug blocking service start?
On Fri, 27 Mar 2015, at 12:14 PM, Daurnimator wrote: My first guess based on that screenshot is case: Simple vs simple. No I fixed that problem. :) http://ix.io/h8U Wish there was a service validator service. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] How to debug blocking service start?
Hi there, How do I figure out why or where something is stuck? http://s.natalian.org/2015-03-25/systemd-start-issue.png `journalctl -u surf -f` prints nothing. Binary surf runs fine when I run it manually. Many thanks, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Requiring hardware device and escaping device names
On 31 March 2014 09:54, Kai Hendry hen...@webconverger.com wrote: Not sure what to try next? If I start it manually `sudo systemctl start shkd@-dev-input-event0.service`, it starts working again. Is http://www.freedesktop.org/software/systemd/man/systemd.service.html#TimeoutSec= the right way to proceed? Not sure. RestartSec=5 did the trick! Not sure why systemd gives up trying to restart a process, despite Restart=always http://ix.io/bog Sidenote: Even though my /etc/udev/rules.d/98-shk-local.rules has ENV{SYSTEMD_WANTS}+=shkd@%N.service, how come shkd@sys-devices-platform-bcm2708_usb-usb1-1\x2d1-1\x2d1.2-1\x2d1.2.2-1\x2d1.2.2:1.0-input-input0.service shkd@sys-devices-platform-bcm2708_usb-usb1-1\x2d1-1\x2d1.2-1\x2d1.2.2-1\x2d1.2.2:1.0-input-input2.service show up?? These are sys devices (%p) not %N ($devnode). Still don't understand where [hendry@alarmpi ~]$ systemctl status shkd@sys-devices-platform-bcm2708_usb-usb1-1\x2d1-1\x2d1.2-1\x2d1.2.2-1\x2d1.2.2:1.0-input-input1.service shkd@sys-devices-platform-bcm2708_usb-usb1-1x2d1-1x2d1.2-1x2d1.2.2-1x2d1.2.2:1.0-input-input1.service - Simple HotKey Daemon Loaded: loaded (/etc/systemd/system/shkd@.service; disabled) Active: inactive (dead) Comes from. Kind regards, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Requiring hardware device and escaping device names
On 26 March 2014 22:55, Jóhann B. Guðmundsson johan...@gmail.com wrote: SUBSYSTEM==input, ENV{ID_INPUT_KEYBOARD}==?*, ENV{.INPUT_CLASS}=kbd, TAG+=systemd, ENV{SYSTEMD_WANTS}+=shkd@%p.service Trying to teach myself how to fish here. How did you know it would match this particular device? $ udevadm monitor monitor will print the received events for: UDEV - the event which udev sends out after rule processing KERNEL - the kernel uevent KERNEL[290197.779159] remove /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2:1.0/input/input7/event0 (input) KERNEL[290197.788432] remove /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2:1.0/input/input7 (input) KERNEL[290197.791409] remove /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2:1.0/0003:13BA:0001.0008/hidraw/hidraw0 (hidr aw) KERNEL[290197.799059] remove /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2:1.0/0003:13BA:0001.0008 (hid) KERNEL[290197.799463] remove /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2:1.0 (usb) KERNEL[290197.799878] remove /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.2 (usb) UDEV [290198.000420] remove /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2:1.0/input/input7/event0 (input) UDEV [290198.019272] remove /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2:1.0/0003:13BA:0001.0008/hidraw/hidraw0 (hidr aw) UDEV [290198.028247] remove /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2:1.0/input/input7 (input) UDEV [290198.033868] remove /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2:1.0/0003:13BA:0001.0008 (hid) UDEV [290198.051687] remove /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2:1.0 (usb) UDEV [290198.057794] remove /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.2 (usb) KERNEL[290199.905920] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.2 (usb) UDEV [290199.916744] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.2 (usb) KERNEL[290199.918617] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2:1.0 (usb) KERNEL[290199.926306] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2:1.0/0003:13BA:0001.0009 (hid) KERNEL[290199.926697] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2:1.0/input/input8 (input) KERNEL[290199.934673] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2:1.0/input/input8/event0 (input) KERNEL[290199.936852] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2:1.0/0003:13BA:0001.0009/hidraw/hidraw0 (hidr aw) UDEV [290199.979780] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2:1.0 (usb) UDEV [290200.026897] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2:1.0/0003:13BA:0001.0009 (hid) UDEV [290200.046996] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2:1.0/0003:13BA:0001.0009/hidraw/hidraw0 (hidr aw) UDEV [290200.059797] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2:1.0/input/input8 (input) UDEV [290200.121850] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2:1.0/input/input8/event0 (input) /etc/systemd/system/shkd@.service [Unit] Description=Simple HotKey Daemon [Service] ExecStart=/usr/local/bin/shkd %I Restart=always [Install] WantedBy=multi-user.target So IIUC, just have the udev rule there will start the systemd service. No need to enable anything? Anyway, it doesn't seem to work. [hendry@alarmpi ~]$ systemctl | grep shk shkd@-devices-platform-bcm2708_usb-usb1-1-1-1-1.2-1-1.2.2-1-1.2.2:1.0-input-input0-event0.service loaded failed failed Simple HotKey Daemon shkd@-devices-platform-bcm2708_usb-usb1-1-1-1-1.2-1-1.2.2-1-1.2.2:1.0-input-input0.service loaded failed failed Simple HotKey Daemon system-shkd.slice loaded active active system-shkd.slice [hendry@alarmpi ~]$ sudo systemctl status shkd@-devices-platform-bcm2708_usb-usb1-1-1-1-1.2-1-1.2.2-1-1.2.2:1.0-input-input0-event0.service shkd@-devices-platform-bcm2708_usb-usb1-1-1-1-1.2-1-1.2.2-1-1.2.2:1.0-input-input0-event0.service - Simple HotKey Daemon Loaded: loaded (/etc/systemd/system/shkd@.service; disabled) Active: failed (Result: start-limit) since Thu 1970-01-01 07:30:16 SGT; 44 years 2 months ago Process: 200 ExecStart=/usr/local/bin/shkd %I (code=exited, status=1/FAILURE) Main PID: 200 (code=exited, status=1/FAILURE) Jan 01 07:30:16 alarmpi systemd[1]: Unit shkd@-devices-platform-bcm2708_usb-usb1-1-1-1-1.2-1-1.2.2-1-1.2.2:1.0-input-input0-ev... state. Jan 01 07:30:16 alarmpi systemd[1]: shkd@-devices-platform-bcm2708_usb-usb1-1-1-1-1.2-1-1.2.2-1-1.2.2:1.0-input-input0-event0estart. Jan 01 07:30:16 alarmpi systemd[1]: Stopping Simple HotKey Daemon... Jan 01 07:30:16 alarmpi systemd[1]: Starting Simple HotKey Daemon... Jan 01 07:30:16 alarmpi systemd[1]:
Re: [systemd-devel] Requiring hardware device and escaping device names
On 31 March 2014 01:00, Andrey Borzenkov arvidj...@gmail.com wrote: udevadm monitor --env would be more useful, it also shows device attributes after event is processed. Thank you Andrey! With %N and a reboot, the keyboard is working. However for interest sake, I un-plugged the USB device and re-inserted it and it doesn't work. Picture of it: http://up.dabase.com/2014-03-31/image.webp Here is the `udevadm monitor --env` log: http://sprunge.us/MFPQ I think shkd@-dev-input-event0.service start request repeated too quickly, refusing to start. is the issue. [hendry@alarmpi ~]$ systemctl --full | grep shk shkd@-dev-input-event0.service loaded failed failed Simple HotKey Daemon shkd@sys-devices-platform-bcm2708_usb-usb1-1\x2d1-1\x2d1.2-1\x2d1.2.2-1\x2d1.2.2:1.0-input-input0.service loaded failed failed Simple HotKey Daemon shkd@sys-devices-platform-bcm2708_usb-usb1-1\x2d1-1\x2d1.2-1\x2d1.2.2-1\x2d1.2.2:1.0-input-input2.service loaded failed failed Simple HotKey Daemon system-shkd.slice loaded active active system-shkd.slice [hendry@alarmpi ~]$ systemctl status shkd@-dev-input-event0.service shkd@-dev-input-event0.service - Simple HotKey Daemon Loaded: loaded (/etc/systemd/system/shkd@.service; disabled) Active: failed (Result: start-limit) since Mon 2014-03-31 09:30:21 SGT; 5min ago Process: 443 ExecStart=/usr/local/bin/shkd %I (code=exited, status=1/FAILURE) Main PID: 443 (code=exited, status=1/FAILURE) Mar 31 09:30:21 alarmpi systemd[1]: Unit shkd@-dev-input-event0.service entered failed state. Mar 31 09:30:21 alarmpi systemd[1]: shkd@-dev-input-event0.service holdoff time over, scheduling restart. Mar 31 09:30:21 alarmpi systemd[1]: Stopping Simple HotKey Daemon... Mar 31 09:30:21 alarmpi systemd[1]: Starting Simple HotKey Daemon... Mar 31 09:30:21 alarmpi systemd[1]: shkd@-dev-input-event0.service start request repeated too quickly, refusing to start. Mar 31 09:30:21 alarmpi systemd[1]: Failed to start Simple HotKey Daemon. Mar 31 09:30:21 alarmpi systemd[1]: Unit shkd@-dev-input-event0.service entered failed state. Mar 31 09:30:25 alarmpi systemd[1]: Starting Simple HotKey Daemon... Mar 31 09:30:25 alarmpi systemd[1]: shkd@-dev-input-event0.service start request repeated too quickly, refusing to start. Mar 31 09:30:25 alarmpi systemd[1]: Failed to start Simple HotKey Daemon. Not sure what to try next? If I start it manually `sudo systemctl start shkd@-dev-input-event0.service`, it starts working again. Is http://www.freedesktop.org/software/systemd/man/systemd.service.html#TimeoutSec= the right way to proceed? Not sure. Sidenote: Even though my /etc/udev/rules.d/98-shk-local.rules has ENV{SYSTEMD_WANTS}+=shkd@%N.service, how come shkd@sys-devices-platform-bcm2708_usb-usb1-1\x2d1-1\x2d1.2-1\x2d1.2.2-1\x2d1.2.2:1.0-input-input0.service shkd@sys-devices-platform-bcm2708_usb-usb1-1\x2d1-1\x2d1.2-1\x2d1.2.2-1\x2d1.2.2:1.0-input-input2.service show up?? These are sys devices (%p) not %N ($devnode). Hoping you can guide me further. :) Kind regards, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Requiring hardware device and escaping device names
Thanks Michael for answering, :) On 26 March 2014 18:59, Michael Biebl mbi...@gmail.com wrote: 2014-03-26 3:56 GMT+01:00 Kai Hendry hen...@webconverger.com: If your daemon is not functional if the hardware is not present, I'd probably start it via a udev rule and SYSTEMD_WANTS. Do you have an example for this please? I don't quite understand why I can't I just name the device in the service file. Why does it have to be so confusing. Still don't understand the need for escaping... is there a need? Thank you, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Requiring hardware device and escaping device names
Hi, I have a keyboard daemon that sometimes fails to come up, I guess because the device is not there. However my current attempt does not work: [hendry@alarmpi ~]$ cat /usr/lib/systemd/system/shkd.service [Unit] Description=Simple HotKey Daemon Requires=dev-input-by\x2did-usb\x2d13ba_0001\x2devent\x2dkbd.device [Service] Type=simple Restart=always ExecStart=/usr/local/bin/shkd /dev/input/by-id/usb-13ba_0001-event-kbd [Install] WantedBy=multi-user.target Is Requires= incorrect? Is my escaping correct? Do I need to actually escape in the first place? Btw I quickly put together a escaping and un-escaping tool here: http://systemd.dabase.com/ I'd really appreciate a review. Many thanks, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Requiring hardware device and escaping device names
On 25 March 2014 18:01, Kai Hendry hen...@webconverger.com wrote: Requires=dev-input-by\x2did-usb\x2d13ba_0001\x2devent\x2dkbd.device On #systemd IRC I was recommended After=, and I think it's working as it should! After=dev-input-by\x2did-usb\x2d13ba_0001\x2devent\x2dkbd.device Is Requires= incorrect? Is my escaping correct? Do I need to actually escape in the first place? Btw I quickly put together a escaping and un-escaping tool here: http://systemd.dabase.com/ I'd really appreciate a review. I still don't quite understand why systemd can't take /dev/input/by-id/usb-13ba_0001-event-kbd and realise it's a device. I.e. the need for it to be escaped. Kind regards, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] /etc/systemd/system/darkice.service
On 25 July 2013 17:37, Colin Guthrie gm...@colin.guthr.ie wrote: These targets are effectively static synchronisation points. The problem here is that you're trying to map a very dynamic concept (networks coming and going) to a static one (targets being reached). Well I'm happy just with coming. ;) I expecting network-online.target to depend on pingtest.service. pingtest.service exits 0 and network-online.target is then triggered reached. Hope this explains it to you a little. Thanks for taking the time to explain Colin. I do agree daemons need to handle this it sucks darkice doesn't. So I need a hack without going the NetworkManager-wait-online.service route. ;) ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] /etc/systemd/system/darkice.service
On 26 July 2013 04:17, Lennart Poettering lenn...@poettering.net wrote: We generally generate warnings about invalid lines and proceed. Aftre we parsed everything we then do a couple of checks whether a unit still makes sense with the stuff that was correctly parsed, and only if the unit does't pass that check we will fail it. I managed to see a foobar.service lacks ExecStart setting. Refusing. if I put ExecStart under [Unit] but if I do something like put Description under [Service] I don't get a warning. Maybe it's just me that finds it hard to know which stanzas belong under which heading. Is there a Unit validator? Does it work if you run it from the command line? Oh I figured it out http://lists.freedesktop.org/archives/systemd-devel/2013-July/012250.html They usually use exponentially increasing intervals, to avoid flooding. Despite what's said here on http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ I do think it might be handy if there was a simple (systemd provided) API to know whether we're online or not (in the 8.8.8.8 sense). Thanks for your help. I think I got where I wanted to with pingtest.service. However the naming of my USB mic issue as mentioned at the bottom of http://lists.freedesktop.org/archives/systemd-devel/2013-July/012292.html is still an issue for me. Darkice daemon assumes network and the hw:1,0 (as defined in my /etc/darkice.cfg) device else it bombs out. Can systemd instead perhaps check for hw:1,0 instead for the crazy long device name that changes depending on what port is plugged into? Thanks again, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] /etc/systemd/system/darkice.service
On 22 July 2013 23:56, Andrey Borzenkov arvidj...@gmail.com wrote: network-online.target has no requirement for pingtest.service. All that this configuration does is delaying network-online.target by at most 60 seconds, that's all. If network is not up at this point - too bad. That ping switch Lennart proposed, -w 60 or -W 60 doesn't actually wait if there is no network. So I've ended up with a shell script: ExecStart=/usr/bin/bash -c 'for i in `seq 60`; do ping -c 1 -nq 8.8.8.8 exit; sleep 1; done; exit 1' http://sprunge.us/KbUZ Which seems to work, however I can't seem to make network-online.target depend on pingtest.service with `RequiredBy=network-online.target` in the pingtest.service file. So even if pingtest fails, network-online.target ends up being active. :/ With the darkice service file, I ended up with http://sprunge.us/VXRU Restart=on-failure was needed since sometimes it would fail to start. No idea why. I can't confirm it was restarted in that cases since `systemctl status darkice.service` doesn't tell me this. Another problem is that if someone manages to connect the USB microphone in the wrong USB port, it fails to start: http://ix.io/6Ql Not sure how to wildcard bind the USB GO Mic here. Any tips? Kind regards, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] /etc/systemd/system/darkice.service
On 25 July 2013 00:56, Andrey Borzenkov arvidj...@gmail.com wrote: Do you really want all your services that depend on network being up to fail if your AP is busy and needs 61 seconds to establish connection? Firstly I use a PI with a wired connection with netctl ifplugd. I don't know if there is a sane replacement for ifplugd / network hotplug, but anyway it takes alarmingly about 10secs to get an IP. http://ix.io/6RA There should be only *one* darkice.service, that depends on network-online.target atm. Though if you take a look at http://ix.io/6Rz you can see `systemctl show -p Requires network-online.target` does not work for some reason. I was expecting it to say darkice.service. I probably just don't understand how dependencies work in systemd. Nightmare. Without being pedantic, I would be happy to make pingtest.service run continually until it gets the first taste of the Internet. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] /etc/systemd/system/darkice.service
On 24 July 2013 20:26, Colin Guthrie gm...@colin.guthr.ie wrote: Also as the previous enable would have written the .wants symlink, ti's probably work doing a rm -f /etc/systemd/system/network-online.target.wants/pingtest.service to ensure it's cleaned out properly (in theory it shouldn't do any harm, but perhaps an existing symlink here is somehow overriding the requires one...) Ah, that was the problem. I had to disable and enable it again to have my s,Wants,Requires, change to work. Crikey, systemd has some gotchas. Putting stanzas under wrong headings and this sucked hours from my life. So this smells like something you should trigger via a udev rule instead. Certainly the starting of it (you can specify SYSTEMD_UNIT= to make it start a unit on hotplug). Not sure how you'd handle the killing of it (unless the SYSTEMD_UNIT property magically stops it too?) I would prefer to rely on the `systemctl -t device --all --full | grep net`. It's a bit sad I can use a wildcard, or some logical OR statement in BindsTo IIUC=. I find /etc/udev/rules.d a bit gnarly to say the least! ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] /etc/systemd/system/darkice.service
On 25 July 2013 12:55, Kai Hendry hen...@iki.fi wrote: Though if you take a look at http://ix.io/6Rz you can see `systemctl show -p Requires network-online.target` does not work for some reason. I was expecting it to say darkice.service. I probably just don't understand how dependencies work in systemd. Nightmare. Oh the problem here as Colin earlier pointed out is that I had to disable and `systemctl enable pingtest.service` for the requires symlnk to properly written. Going back to the timeout, I started the PI without a network. Waited a minute or two. Then I started pingtest.service manually. I was surprised that network-online.target doesn't turn active. I had to manually start it. http://ix.io/6RD ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] /etc/systemd/system/darkice.service
On 19 July 2013 01:29, Lennart Poettering lenn...@poettering.net wrote: It is certainly surprising at first, but it makes a lot of sense. In systemd ordering deps and requirement deps are truly orthogonal. This is useful in many cases, because sometimes you just want to pull something else in, but not imply any ordering, sometimes you want to order without actually pulling it in, and often you want to do both. Of course, not all deps make sense in all combinations, but I think it's easy enough to grasp. What happens in the range of error cases when a user puts a Wants= line under the (wrong) [Install] heading? I tried it and network-online.target was loaded inactive dead, so it failed IIUC. No warning that Wants= line is in the wrong place. This sucks quite a lot imo. Wouldn't it be simpler if systemd ignored the headings? Anyway, it's just a comment. I am still trying to figure darkice starting out. I figure you could try this with a service like the following (untested): [Unit] Before=network-online.target [Service] ExecStart=/usr/bin/ping -nq 8.8.8.8 -w 60 -c 1 Type=oneshot StandardOutput=null [Install] WantedBy=network-online.target Then, install and enable this service, and pull in network-online.target from the service that you want to wait for the network to be around. I enabled the above as pingtest.service and added Wants=network-online.target under the [Unit] heading in darkice.service. Still I don't understand how pingtest.service can fail here with exit 2 and even more confusingly network-online.target is reached!? http://ix.io/6Nv This will timeout after 60 seconds. Isn't this better controlled by systemd itself? And not be a command line switch in the exec? It's hacky, generates awful traffic, and has quite some latency, but it should do what you asked for... Awful traffic? One successful ping and we continue IIUC. A lot of routers IIUC do a heart beat type ping to ensure it's up. And if not it would switch to another route or something. If routers are doing this, why can't my device? Is it really that expensive?? ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] /etc/systemd/system/darkice.service
Hi guys, http://sprunge.us/SLSF is the service file I have currently. I'm running http://archlinuxarm.org/ on a Rpi with systemd 204-3. I'm having issues creating a service file for darkice a audio streamer that depends on: * a network connection * a microphone sys-devices-platform-bcm2708_usb-usb1-1\x2d1-1\x2d1.2-1\x2d1.2:1.0-sound-card1.device First scenario, microphone unplugged: [root@pihsg ~]# systemctl status darkice.service darkice.service - DarkIce audio forwarder Loaded: loaded (/etc/systemd/system/darkice.service; enabled) Active: failed (Result: exit-code) since Thu 2013-07-18 17:49:41 SGT; 5min ago Process: 279 ExecStart=/usr/bin/darkice (code=exited, status=255) Jul 18 17:49:41 pihsg systemd[1]: Started DarkIce audio forwarder. Jul 18 17:49:41 pihsg darkice[279]: DarkIce 1.1 live audio streamer, http://code.google.com/p/darkice/ Jul 18 17:49:41 pihsg systemd[1]: darkice.service: main process exited, code=exited, status=255/n/a Jul 18 17:49:41 pihsg systemd[1]: Unit darkice.service entered failed state. I expected systemd to deny the start with sys-devices-platform-bcm2708_usb-usb1-1\x2d1-1\x2d1.2-1\x2d1.2:1.0-sound-card1.device loaded inactive dead sys-devices-platform-bcm2708_usb-usb1-1\x2d1-1\x2d1.2-1\x2d1.2:1.0-sound-card1.device Second scenario, microphone plugged in: [root@pihsg ~]# systemctl status darkice.service darkice.service - DarkIce audio forwarder Loaded: loaded (/etc/systemd/system/darkice.service; enabled) Active: failed (Result: exit-code) since Thu 1970-01-01 07:30:08 SGT; 43 years 6 months ago Process: 121 ExecStart=/usr/bin/darkice (code=exited, status=255) journalctl -b | grep -i dark reveals DarkIce: TcpSocket.cpp:226: gethostbyname error [0] So the network wasn't ready even when depending on nss-lookup.target. I did try tweaking restart interval settings to 20, but that didn't help either. Any tips? The network is brought up by netctl-ifplugd@eth0.service Many thanks, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] /etc/systemd/system/darkice.service
On 18 July 2013 20:27, Lennart Poettering lenn...@poettering.net wrote: You need an After= here for the device, too. Thanks this fixes the first scenario: http://sprunge.us/LiQF I must say needing After BindsTo is a bit confusing. I also don't see the need for different sections. Never quite know under which heading a stanza should go. The timestamp looks weird. Does the device have no RTC or so? no RTC, so does that mess up the retry interval code I wonder? Because I don't mind if systemd just retries it every so often. But that doesn't work. :/ Not sure I like the suggestions here: http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ I despise NetworkManager. Hasn't someone written a simple service that say pings 8.8.8.8 and if that's OK, says the network is up? That's how even enterprise routers work. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] journalctl to csv
On 29 January 2013 15:33, Zbigniew Jędrzejewski-Szmek zbys...@in.waw.pl wrote: Try 'journalctl --lines=0 --follow' with the latest git. Ah, I see the change: http://cgit.freedesktop.org/systemd/systemd/commit/?id=67e04a486b92fcb656049cb4d6b66148c7d2e61b I'm too much of a newbie to compile systemd from git on Arch just yet. Unless git is packaged somewhere? Thank you, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] journalctl to csv
On 29 January 2013 01:51, Zbigniew Jędrzejewski-Szmek zbys...@in.waw.pl wrote: So just 'journalctl MESSAGE_ID=b72ea4a2881545a0b50e200e55b9b06f MESSAGE_ID=b72ea4a2881545a0b50e200e55b9b070' should work. Indeed it does. Though how do I listen on journalctl for *future events*? `journalctl -f -b MESSAGE='Lid closed.' MESSAGE='Lid opened.' -o export | grep SOURCE_REALTIME_TIMESTAMP` annoyingly shows past events. Mayyybe tweaking --since, but that easily throws this `Failed to get realtime timestamp: Cannot assign requested address` error. Many thanks, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] journalctl to csv
Thanks! Any ideas how to stream out only new events? Ideally both open close? Many thanks, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Definitive place for powertop tunables?
Hi there, I would normally put these `powertop -html` tunables in rc.local: http://s.natalian.org/2012-11-19/1353291487_1366x768.png Is http://0pointer.de/public/systemd-man/tmpfiles.d.html the right place? If so powertop could do with some patches to help create the file, one would think. Many thanks, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] cgroup use case for preventing a system lock up if say a browser exhausts memory
On 12 November 2012 19:35, Colin Guthrie gm...@colin.guthr.ie wrote: When launching firefox becomes a user unit, then it will be contained within it's own cgroup and can have resource limits imposed with relative ease. Thanks Colin for your reply. I'm interested in a general systemd framework example of a system process resource limited. Do you have one you can point me to? What's important for me here, since this can run on machines with varying amount of memory that it's basically restarted when it's nearing memory exhaustion. Tbh I think the OOM killer should just do this, but I gather it's more complicated than that. Kind regards, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] cgroup use case for preventing a system lock up if say a browser exhausts memory
Hi there, I hope this is the right forum for a systemd question, to address a particular problem I'm trying to solve. Problem is I've found Firefox (for example, this probably can be extrapolated to any browser) to lock up machines when memory is exhausted. Ideally when the browser hits a certain limit (only 5% of free RAM left), Firefox is killed and restarted, to solve my particular kiosk use case. https://github.com/Webconverger/webc/issues/83 I've looked and tested varying unsatisfactory solutions and since I'm an Archlinux user who has been put onto systemd (tbh I'm impressed), I was eager to know if systemd can help. I can't help but notice how busy my `mount` looks now: http://ix.io/3nt I've done a quick couple of searches trying to find how to use cgroups for controlling limits with systemd and I'm still in the dark. I was half expecting a service file example to have a resource limit stanza. Am I looking in the right place? Many thanks, ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel