Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 May 1999 23:39:14 -0500
From:      Dan Nelson <dnelson@emsphone.com>
To:        cjclark@home.com
Cc:        FreeBSD Questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Columns in Script Outpur
Message-ID:  <19990520233914.A26666@dan.emsphone.com>
In-Reply-To: <199905210427.AAA20685@cc942873-a.ewndsr1.nj.home.com>; from "Crist J. Clark" on Fri May 21 00:27:11 GMT 1999
References:  <199905210427.AAA20685@cc942873-a.ewndsr1.nj.home.com>

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




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