csuite: bug in bin/login-summary

Date: Wed, 12 Mar 1997 11:21:52 -0400
From: Landon Boyd <landon@csuite.chebucto.ns.ca>
To: CSuite Technical Reports <csuite-tech@chebucto.ns.ca>
Precedence: bulk

next message in archive
no next message in thread
previous message in archive
previous message in thread
Index of Subjects

Index of Subjects

I think I've eliminated all possible divide by zero problems in
login-summary.


On Wed, 12 Mar 1997, Gerard MacNeil wrote:

> In bin/login-summary
>         agr = gremtime / gremcount / 60
>         ar = remtime / remcount / 60
>         ag = gloctime / gloccount / 60
>         a = loctime / loccount / 60
> 
> Any of 'gremcount remcount gloccount loccount'  could be 0.
> 
> 
> 
> wwhcn:/var/log$ cat !$
> cat test.wtmp-rotate
> +++ getdate
> ++ putdate %Y%m%d 858070825
> + old=wtmp.19970311
> + cd /var/adm
> + mv wtmp wtmp.19970311
> + touch wtmp
> + login-summary wtmp.19970311
> + tee /tmp/ls10768
> + head -1
> gawk: cmd. line:42: (FILENAME=- FNR=76) fatal: division by zero attempted
> + sed -n 2,$p /tmp/ls10768
> + rm -f /tmp/ls10768
> + gzip wtmp.19970311
> + exit 0
> 
> 
> Gerard MacNeil, P. Eng.
> 
> 


==================================================================
Landon Boyd                          landon@chebucto.ns.ca
Distribution Support Technician,     http://chebucto.ns.ca/~landon
Chebucto Community Net               902-455-4099hm 902-494-2449wk
==================================================================



next message in archive
no next message in thread
previous message in archive
previous message in thread
Index of Subjects