Hi,
On Tue, Jan 28, 2003 at 10:04:33PM +0100, Patrick Hess wrote:
> Ich habe bei meinem "vmstat" nur eine Zeile:
> 
> serv1:~ > vmstat
>  procs      memory      page                    disks     faults      cpu
>  r b w     avm    fre  flt  re  pi  po  fr  sr ad0 md0   in   sy  cs us sy id
>  0 1 0   18220 197280    1   0   0   0   5   2   0   0  110  112  16  0  0 99
> serv1:~ > 
> 
> Egal, die Variante mit "top" gefällt mir eh besser.
vmstat -c 2 gibt zuerst den Mittelwert seit dem Systemstart aus, danach
die aktuellen Werte.  Mit etwas awk dann:
vmstat -c 2 | awk '{ if (NR==4) {print "user="$(NF-2)"\nsystem="$(NF-1)"\nidle="$NF}}'
 
TIMTOWTDI.
/s/Udo
-- Abandon the search for Truth; settle for a good fantasy. To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org with "unsubscribe de-bsd-questions" in the body of the messageReceived on Tue 28 Jan 2003 - 23:19:11 CET