[systemd-devel] systemd-fsck and ext4 blocksize
My system has an ext4 filesystem with 4K blocks, so I need to pass the -b 32768 option e2fsck when I check it. When systemd-fsck attempts to check that filesystem, it doesn't pass the appropriate flag; as a result the fail checks and the boot process stops. How do I teach systemd-fsck how to check that filesystem? Is there a place I can specify the e2fsck options it should use? JL ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] systemd-fsck and ext4 blocksize
On Fri, Mar 30, 2012 at 04:44, Jean-Luc Duprat j...@acm.org wrote: My system has an ext4 filesystem with 4K blocks, so I need to pass the -b 32768 option e2fsck when I check it. When systemd-fsck attempts to check that filesystem, it doesn't pass the appropriate flag; as a result the fail checks and the boot process stops. How do I teach systemd-fsck how to check that filesystem? Is there a place I can specify the e2fsck options it should use? No, the fsck.fstype program needs to find that out on its own, and better doesn't rely on some options passed to it by a user. Systemd can not really be involved in options like that, it just calls the plain 'fsck' tool, and does not really want to know what's going on with filesystem specifics. Kay ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Socket-Activation
On Fri, Mar 30, 2012 at 02:48:03PM +0100, Ayoub Arfaoui wrote: How to patch a service to be socket-activable ? http://0pointer.de/blog/projects/socket-activation.html http://0pointer.de/blog/projects/socket-activation2.html -- Tomasz TorczTo co nierealne -- tutaj jest normalne. xmpp: zdzich...@chrome.pl Ziomale na życie mają tu patenty specjalne. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Socket-Activation
On Fri, 30.03.12 14:48, Ayoub Arfaoui (ayoubb...@gmail.com) wrote: How to patch a service to be socket-activable ? http://0pointer.de/blog/projects/socket-activation.html http://0pointer.de/blog/projects/socket-activation2.html This is all linked from the systemd homepage BTW. http://www.freedesktop.org/wiki/Software/systemd Lennart -- Lennart Poettering - Red Hat, Inc. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] RFC : PATCH: initial implementation of system wide rlimit
Le lundi 26 mars 2012 à 18:51 +0200, Lennart Poettering a écrit : On Mon, 26.03.12 14:25, Frederic Crozat (fcro...@suse.com) wrote: ... Need to handle OOM. memdup() might be nicer to use here. (In fact, might be worth introducing newdup() here as a type-safe macro, i.e. a combination of new() and memdup()). Here is new version, fixing the various stuff you commented and I've also added newdup macro (in a separate git commit). -- Frederic Crozat fcro...@suse.com SUSE From 5008080dda662208278c159213adbd5211496043 Mon Sep 17 00:00:00 2001 From: Frederic Crozat fcro...@suse.com Date: Thu, 29 Mar 2012 17:53:41 +0200 Subject: [PATCH 1/2] macro: add newdup macro, equivalent of new + memdup but type-safe --- src/macro.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/macro.h b/src/macro.h index 19f259e..a85e72d 100644 --- a/src/macro.h +++ b/src/macro.h @@ -137,6 +137,7 @@ static inline size_t ALIGN_TO(size_t l, size_t ali) { #define memzero(x,l) (memset((x), 0, (l))) #define zero(x) (memzero((x), sizeof(x))) +#define newdup(x,l) ( (x= new(typeof(*l),1)) ? memcpy((x),(l),sizeof(*l)) : NULL) #define char_array_0(x) x[sizeof(x)-1] = 0; -- 1.7.7 From fa5f387335f0df5da5fec26aa3c537e0c0c8dc12 Mon Sep 17 00:00:00 2001 From: Frederic Crozat fcro...@suse.com Date: Wed, 21 Mar 2012 18:03:40 +0100 Subject: [PATCH 2/2] allow system wide limits for services --- src/main.c| 28 src/manager.c |8 src/manager.h |2 ++ src/service.c |8 4 files changed, 46 insertions(+), 0 deletions(-) diff --git a/src/main.c b/src/main.c index 7ae8841..f4295e4 100644 --- a/src/main.c +++ b/src/main.c @@ -80,6 +80,7 @@ static char **arg_default_controllers = NULL; static char ***arg_join_controllers = NULL; static ExecOutput arg_default_std_output = EXEC_OUTPUT_JOURNAL; static ExecOutput arg_default_std_error = EXEC_OUTPUT_INHERIT; +static struct rlimit *default_rlimit[RLIMIT_NLIMITS] = {}; static FILE* serialization = NULL; @@ -660,6 +661,22 @@ static int parse_config_file(void) { { Manager, DefaultStandardOutput, config_parse_output, 0, arg_default_std_output }, { Manager, DefaultStandardError, config_parse_output, 0, arg_default_std_error }, { Manager, JoinControllers, config_parse_join_controllers, 0, arg_join_controllers }, +{ Manager, LimitCPU, config_parse_limit,0, default_rlimit[RLIMIT_CPU]}, +{ Manager, LimitFSIZE,config_parse_limit,0, default_rlimit[RLIMIT_FSIZE]}, +{ Manager, LimitDATA, config_parse_limit,0, default_rlimit[RLIMIT_DATA]}, +{ Manager, LimitSTACK,config_parse_limit,0, default_rlimit[RLIMIT_STACK]}, +{ Manager, LimitCORE, config_parse_limit,0, default_rlimit[RLIMIT_CORE]}, +{ Manager, LimitRSS, config_parse_limit,0, default_rlimit[RLIMIT_RSS]}, +{ Manager, LimitNOFILE, config_parse_limit,0, default_rlimit[RLIMIT_NOFILE]}, +{ Manager, LimitAS, config_parse_limit,0, default_rlimit[RLIMIT_AS]}, +{ Manager, LimitNPROC,config_parse_limit,0, default_rlimit[RLIMIT_NPROC]}, +{ Manager, LimitMEMLOCK, config_parse_limit,0, default_rlimit[RLIMIT_MEMLOCK]}, +{ Manager, LimitLOCKS,config_parse_limit,0, default_rlimit[RLIMIT_LOCKS]}, +{ Manager, LimitSIGPENDING, config_parse_limit,0, default_rlimit[RLIMIT_SIGPENDING]}, +{ Manager, LimitMSGQUEUE, config_parse_limit,0, default_rlimit[RLIMIT_MSGQUEUE]}, +{ Manager, LimitNICE, config_parse_limit,0, default_rlimit[RLIMIT_NICE]}, +{ Manager, LimitRTPRIO, config_parse_limit,0, default_rlimit[RLIMIT_RTPRIO]}, +{ Manager, LimitRTTIME, config_parse_limit,0, default_rlimit[RLIMIT_RTTIME]}, { NULL, NULL, NULL, 0, NULL } }; @@ -1404,6 +1421,14 @@ int main(int argc, char *argv[]) { m-swap_auto = arg_swap_auto; m-default_std_output = arg_default_std_output; m-default_std_error = arg_default_std_error; +for (j = 0; j RLIMIT_NLIMITS; j++) { +if (default_rlimit[j]) { +newdup(m-rlimit[j],default_rlimit[j]); + +if (!m-rlimit[j]) +goto finish; +} +} if (dual_timestamp_is_set(initrd_timestamp)) m-initrd_timestamp = initrd_timestamp; @@ -1543,6 +1568,9 @@ finish: if (m) manager_free(m); +for (j = 0; j RLIMIT_NLIMITS;
[systemd-devel] debugging guide
Hello, I'm debugging a systemd shutdown problem where systemd hangs. I would like to track the shutdown process - presumably using log_error() all over the place. What is the best-practices development cycle for testing changes to the source? Do you use a VM and if so, do you build an RPM (or whatever flavour of package you prefer) after every patch to install the changes into your .iso? This was the best I could do but I was hoping there was a simpler way. Regards, Gustav Paul ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] systemd-journalctl Failed to iterate through journal: Cannot allocate memory
Lennart, I think I found another clue. I noticed that the directory /var/log/journal was being used in addition to /var/run/log/journal. I do not want persistent logging, so I removed /var/log/journal. When I did this, systemd-journalctl appeared to work correctly. Obviously I am mis-understanding (and mis-using) the journaling features of systemd. Could you please point me to any overview of where and how the journaling sub-system stores its data? Best regards, Dave. On 03/29/2012 03:42 PM, David Lambert wrote: Thanks Lennart, it looks like your guess was spot on! See attached trace. Any suggestions on how to narrow this down further? On 03/29/2012 09:38 AM, Lennart Poettering wrote: Hmm, my guess is that we might have too many mem maps open? Can you check strace? Anything suspicious there? Lennart ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel