Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 May 1999 00:27:11 -0400 (EDT)
From:      "Crist J. Clark" <cjc@cc942873-a.ewndsr1.nj.home.com>
To:        freebsd-questions@FreeBSD.ORG (FreeBSD Questions)
Subject:   Columns in Script Outpur
Message-ID:  <199905210427.AAA20685@cc942873-a.ewndsr1.nj.home.com>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199905210427.AAA20685>