From owner-freebsd-questions Thu May 20 21:39:19 1999 Delivered-To: freebsd-questions@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id 6697A14D25 for ; Thu, 20 May 1999 21:39:16 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.9.3/8.9.3) id XAA26787; Thu, 20 May 1999 23:39:14 -0500 (CDT) (envelope-from dan) Date: Thu, 20 May 1999 23:39:14 -0500 From: Dan Nelson To: cjclark@home.com Cc: FreeBSD Questions Subject: Re: Columns in Script Outpur Message-ID: <19990520233914.A26666@dan.emsphone.com> References: <199905210427.AAA20685@cc942873-a.ewndsr1.nj.home.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.5i In-Reply-To: <199905210427.AAA20685@cc942873-a.ewndsr1.nj.home.com>; from "Crist J. Clark" on Fri May 21 00:27:11 GMT 1999 X-OS: FreeBSD 4.0-CURRENT Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In the last episode (May 21), Crist J. Clark said: > I have just noticed some undesirable behavior from a shell script > running in a cron job. The shell script writes ps output to a file. > The output in this file is being truncated to 80 columns. > > When I run the script at the command line, the output in the file has > the same number of columns as however I have my xterm currently > sized. I tried to put a stty command in the script as a quick way to > stop it, but the shell chokes on the stty saying stdin is not a > terminal. man ps; see the -w option. > Perhaps a better workaround is to not require this at all. I have a > FreeBSD mailserver at work, and one particular user is complaining > about the machine's performance. I've noticed lags and stalls here > and there which I have always accounted to disk access times. I want > to verify this is the problem and consider solutions. I am trying to > collect performace and operational data about the box to figure this > out. Is this an email router (i.e. bunch of sendmail processes), or a pop/imap host? If it's a pop/imap host and you're using UW-imapd, try switching to cyrus imapd, which doesn't bog down when users have large mailboxes. If it's a sendmail box, see how big your mail backlog is at any one time (mailq ; entries with a * are active) and possibly throttle back the number of active sendmail processes allowed at any one time. > Right now, I have my own cron jobs and shell scripts checking on > things every few minutes and logging results. It works to a degree, > but it's sloppy. I've looked in /usr/ports/sysutils, but have not > really found something that is suited for the job. Something the > textual equivalent of xload or xosview is what I'm looking for. > However, the machine does not have X, and I want to log numbers for > later analysis. iostat and vmstat should give you most of the information you need to troubleshoot things like this. -Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message