From owner-freebsd-questions Thu May 20 21:26:55 1999 Delivered-To: freebsd-questions@freebsd.org Received: from cc942873-a.ewndsr1.nj.home.com (cc942873-a.ewndsr1.nj.home.com [24.2.89.207]) by hub.freebsd.org (Postfix) with ESMTP id 2613B14ECA for ; Thu, 20 May 1999 21:26:52 -0700 (PDT) (envelope-from cjc@cc942873-a.ewndsr1.nj.home.com) Received: (from cjc@localhost) by cc942873-a.ewndsr1.nj.home.com (8.9.3/8.8.8) id AAA20685 for freebsd-questions@FreeBSD.ORG; Fri, 21 May 1999 00:27:11 -0400 (EDT) (envelope-from cjc) From: "Crist J. Clark" Message-Id: <199905210427.AAA20685@cc942873-a.ewndsr1.nj.home.com> Subject: Columns in Script Outpur To: freebsd-questions@FreeBSD.ORG (FreeBSD Questions) Date: Fri, 21 May 1999 00:27:11 -0400 (EDT) Reply-To: cjclark@home.com X-Mailer: ELM [version 2.4ME+ PL40 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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. I assume this is some special bahvior from ps causing this. How do I work around it and have ps not truncate lines? Note that it is something that should work from a crontab. 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. 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. Did I overlook a port? Anyone else know of good tools? Have suggestions for how to write my shell scripts? ;) Thanks for help on either problem. -- Crist J. Clark cjclark@home.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message