Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp65125imj; Wed, 13 Feb 2019 04:51:00 -0800 (PST) X-Google-Smtp-Source: AHgI3IbS19OI9ZLN7FLaHBAjN2kb+9JXcnMHOaKpGxvhZL/31eD6x/6Jx5B9qz1EJjculj8aBcxb X-Received: by 2002:a62:20d1:: with SMTP id m78mr353191pfj.250.1550062260083; Wed, 13 Feb 2019 04:51:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550062260; cv=none; d=google.com; s=arc-20160816; b=ThVfpSFiD+ziYKnPj38UR+B+WorTW7KOYpNkM1XhJbp1B0glz/geUEtoxkc9sN2vlt Fg3FT3JbWF/Z29I94JpV1J9g+buIltdLFUATtGm3OTiExaN79EHdluNFsBqm8VLCipEp b/HKFZ37FYz/2quZS0S5KdMxkSGhOrKJv7Wdlki9v8TssnlYvkZFTt985uGDT/k3Jt78 mFmk7xuU9fUW6Xly06jSFEPr20ewKDZ03sqWuO4975SbbVXSLSDIz9jHO4VuZrzLnai9 ipDTHCjq5Xutj186mvNdP7WXMK8XHFDDLxa5A8TiNRINg3UrSmO5/JBvw5OmeoNUJnW/ JYzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=8IJYKgmjf2yR7+aqwtgCOFEalvWTzcVJSGELSJ0mLE8=; b=MSdV91O9kooPekqud4vP2hbAlUd293XMMBjL7aXcnNLvJR7XBqjV+e6miOQk8EpArc UY4uFX8oENmCklRz4vtBu7QBlucwJz/SesroQBJ2N+b7X/iZlk8rsy4UcAse5mwodNlI IJkfssn1PowVZBD0WFhwo1gZQSgtkCxE9cULGdrxlWNhSmcsBMBOKR6XBTy3O69cHwfS aAEkiyhn1o4jssEia1GR71JFlWBiFxCA5bZZ0ptfPmYQFdG6HV+VydQwxufyIR/qiccL 2ySkv61niZaPDLNcbjL9hxPPbyUIuRgHut5uhbNQhT6oxPBuO4qJ4SvqOT9kMKICFGMZ y+YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Bv2GK8ub; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g6si14328407pgc.55.2019.02.13.04.50.43; Wed, 13 Feb 2019 04:51:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Bv2GK8ub; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390508AbfBMII5 (ORCPT + 99 others); Wed, 13 Feb 2019 03:08:57 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:33096 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730406AbfBMII5 (ORCPT ); Wed, 13 Feb 2019 03:08:57 -0500 Received: by mail-pg1-f196.google.com with SMTP id z11so804896pgu.0 for ; Wed, 13 Feb 2019 00:08:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=8IJYKgmjf2yR7+aqwtgCOFEalvWTzcVJSGELSJ0mLE8=; b=Bv2GK8ubktaQH+dCG4j4mCDa0scPCOpYd8tiGdRJuhLebjuY80LubUZ7cp9eN1FvWH UrtGbLcpXux0K+nISeaJM9YZ2FI75f8RYwsxrlaw1Xk+CiOERHGPEt6Gi6L7vxp2Jprz T+q39kQCu/JgtRKwzGwnaXGXk7DcloPh4p2LU1nT2DS0pkwjq5RP7Eu6Z/NDjZUnr3A6 r/wgVaSRkDLBY1ZdoBxhrLEjcst4JpR6bAYLtrEMV+2+0nXqJDmw88JXlfL13Uf6mO2o yyOPLimsx4GIka0flcwA7OtigmP9duQVVpVF2+K8Wt4GANNxgtJpHZKO95Z93MsJZiQs KPsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=8IJYKgmjf2yR7+aqwtgCOFEalvWTzcVJSGELSJ0mLE8=; b=ETTqz9vdW8M1EBPIuJ4dpd1Ju8+dONyLzHghO7XpuyApyVGYGd9j7upeuhoEgju+L9 ZoZKWeCrhiHDp4igSMypdp/606FeK4wD4J/jFHPnL4+DcsuECazRnhzZOpGtVvJK3+km q2MBoPN+2d28hpy5vICPgODuqlaWu9O/A6Is240iDXJFGel0z5AFmPKXYQ4CjIp2hHA5 EkqVzlL95C8hubAsR9BOSHuorBTCRgeBxsB8U8tfQYTavMU2TN4fLjVkukCuPxTppU0l NskyP7QzJkiPyYzZ8KS3XTHlclSj4qNI/gO3onJXwYj1aLaguRmr8eDo3R+rBgzF1tmf B/Vw== X-Gm-Message-State: AHQUAubNqzAlaAVKYZAdkeMenTRLsfQMsyhgIofjQ/ZeLBUd42Pxy1Nh poz0jwpUZJXkhEV18/F/Dw0= X-Received: by 2002:aa7:8508:: with SMTP id v8mr8387925pfn.14.1550045336481; Wed, 13 Feb 2019 00:08:56 -0800 (PST) Received: from localhost ([39.7.15.189]) by smtp.gmail.com with ESMTPSA id t5sm26785485pfb.60.2019.02.13.00.08.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Feb 2019 00:08:55 -0800 (PST) Date: Wed, 13 Feb 2019 17:08:52 +0900 From: Sergey Senozhatsky To: xiang xiao Cc: Sergey Senozhatsky , Steven Rostedt , Petr Mladek , Sergey Senozhatsky , linux-kernel@vger.kernel.org, Xiang Xiao Subject: Re: [PATCH] printk: add KERN_NOTIME to skip the timestamp Message-ID: <20190213080852.GA1702@jagdpanzerIV> References: <1549995065-27597-1-git-send-email-xiaoxiang@xiaomi.com> <20190212144606.4b7cf0f8@gandalf.local.home> <20190213062912.GA23233@jagdpanzerIV> <20190213063815.GA32272@jagdpanzerIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (02/13/19 15:14), xiang xiao wrote: > > But how can I precisely control timestamp on/off per message > through sysfs node? > Hmm. I don't know how many kernel printk-s you have and how often do you write to kmsg. I was thinking about something like this: echo 0 > /...printk.../time dump buffer to /dev/kmsg echo 1 > /...printk../time - If you would have several kernel printk-s in the meantime, then those would not have timestamps, but you kinda can roughly guess it write [1243] foo > /dev/kmsg write [1244] foo > /dev/kmsg << printk(bar) write [1245] foo > /dev/kmsg Maybe this won't suffice. -ss