From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1OmuIr-0003O4-O8 for garchives@archives.gentoo.org; Sat, 21 Aug 2010 20:04:34 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5EF3EE09C4 for ; Sat, 21 Aug 2010 20:04:33 +0000 (UTC) Received: from smtpout.karoo.kcom.com (smtpout.karoo.kcom.com [212.50.160.34]) by pigeon.gentoo.org (Postfix) with ESMTP id 0B9ECE07C7 for ; Sat, 21 Aug 2010 19:26:32 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.56,245,1280703600"; d="scan'208";a="211883417" Received: from 213-152-39-90.dsl.eclipse.net.uk (HELO compaq.stroller.uk.eu.org) ([213.152.39.90]) by smtpout.karoo.kcom.com with ESMTP; 21 Aug 2010 20:26:31 +0100 Received: from funf.stroller.uk.eu.org (funf.stroller.uk.eu.org [192.168.1.71]) by compaq.stroller.uk.eu.org (Postfix) with ESMTP id 59EC26C4E4 for ; Sat, 21 Aug 2010 20:26:27 +0100 (BST) Message-Id: <68A64BAB-F743-4908-A608-7D5549B0444C@stellar.eclipse.co.uk> From: Stroller To: gentoo-user@lists.gentoo.org In-Reply-To: <201008211525.35115.wonko@wonkology.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: [gentoo-user] Disable fcron logging Date: Sat, 21 Aug 2010 20:26:28 +0100 References: <201008211525.35115.wonko@wonkology.org> X-Mailer: Apple Mail (2.936) X-Archives-Salt: 97694f9b-81cf-40f9-aa73-0118c4d6ac55 X-Archives-Hash: 817ffa9d6bc4e1fafb32a570855510b0 On 21 Aug 2010, at 14:25, Alex Schuster wrote: > ... > I want to monitor the power status of my hard drives, so I wrote a =20 > little > script that gives me this output: > > sda: standby > sdb: standby > sdc: active/idle 32=B0C > sdd: active/idle 37=B0C > > This script is called every minute via an fcron entry, output goes =20 > into a > log file, and I use the file monitor plasmoid to watch this log file =20= > in > KDE. > > It's working fine, but also monitor my syslog in another file monitor > plamoid, and now I get lots of these entries: > > Aug 21 14:21:06 [fcron] pam_unix(fcron:session): session opened for =20= > user root by (uid=3D0) > Aug 21 14:21:06 [fcron] Job /usr/local/sbin/hdstate >> /var/log/=20 > hdstate started for user root (pid 24483) > Aug 21 14:21:08 [fcron] Job /usr/local/sbin/hdstate >> /var/log/=20 > hdstate completed > Aug 21 14:21:08 [fcron] pam_unix(fcron:session): session closed for =20= > user root #!/bin/bash while true do for drive in a b c d do /usr/sbin/smartctl /dev/sd$drive --whatever >> /var/log/hdstate done sleep 60 done I would personally update more often than this, and my concern would =20 be that if the process fails then your plasmoid isn't showing the =20 correct data. I presume this is the same with your current setup: if cron dies then =20= the current temperature will not be read to file, and the plasmoid =20 will continue reading the last lines in /var/log/hdstate - the drive =20 can overheat without you knowing about it. So I would expect there to be a better "plasmid" for this task. I'm =20 completely unfamiliar with plasmids, but what you really want is a =20 plasmid that itself runs a script and displays the stdout on your =20 screen. That way if there's no data, or an error, then _you see that =20 in the plasmid_, instead of silently ignoring it (as you may be at =20 present). The easiest (but dumb) way to handle this is to add the date to your =20 plasmid's display so that at least you can see that something's wrong =20= if it doesn't match the clock. A better way is not to have to watch a =20= status monitor at all, and just have a script running that emails you =20= if the temperature is above a specified range. Stroller.