/* interpret command time accounting */
#define NC sizeof(acctbuf.ac_comm)
extern tcmp(), ncmp(), bcmp();
for(i
=1; argv
[0][i
]; i
++)
if(tab
[i
].name
[j
] == '?')
junkp
= enter("***other");
tab
[junkp
].count
+= tab
[i
].count
;
tab
[junkp
].realt
+= tab
[i
].realt
;
tab
[junkp
].cput
+= tab
[i
].cput
;
tab
[junkp
].syst
+= tab
[i
].syst
;
tab
[k
].name
[j
] = tab
[i
].name
[j
];
tab
[k
].count
= tab
[i
].count
;
tab
[k
].realt
= tab
[i
].realt
;
tab
[k
].cput
= tab
[i
].cput
;
tab
[k
].syst
= tab
[i
].syst
;
if ((ff
= fopen("/usr/adm/usracct", "w")) != NULL
) {
fwrite((char *)user
, sizeof(user
), 1, ff
);
if ((ff
= fopen("/usr/adm/savacct", "w")) == NULL
) {
fwrite((char *)tab
, sizeof(tab
[0]), k
, ff
);
qsort(tab
, k
, sizeof(tab
[0]), nflg
? ncmp
: (bflg
?bcmp
:tcmp
));
column(ncom
, treal
, tcpu
, tsys
);
column(ft
, tab
[i
].realt
, tab
[i
].cput
, tab
[i
].syst
);
printf(" %.14s\n", tab
[i
].name
);
while (*cp
!=':' &&*cp
!='\n' && *cp
)
user
[i
].ncomm
, user
[i
].fctime
/60);
printf("%6.2f%%", 100.*n
/ncom
);
col(n
, 3600*(b
/(b
+c
)), tcpu
+tsys
);
printf("%6.1f", a
/(b
+c
));
printf("%9.2f", a
/(n
*60.)); else
printf("%9.2f", a
/3600.);
printf("%6.2f%%", 100.*a
/m
);
printf("Only 1 file with -s\n");
if ((ff
= fopen(f
, "r"))==NULL
) {
printf("Can't open %s\n", f
);
while (fread((char *)&fbuf
, sizeof(fbuf
), 1, ff
) == 1) {
if (fbuf
.ac_comm
[0]==0) {
for (cp
= fbuf
.ac_comm
; cp
< &fbuf
.ac_comm
[NC
]; cp
++) {
if (c
&& (c
< ' ' || c
>= 0200)) {
if (fbuf
.ac_flag
&AFORK
) {
for (cp
=fbuf
.ac_comm
; cp
< &fbuf
.ac_comm
[NC
]; cp
++)
x
= expand(fbuf
.ac_utime
) + expand(fbuf
.ac_stime
);
printf("%3d%6.1f %.14s\n", fbuf
.ac_uid
&0377, x
/60.0,
x
= expand(fbuf
.ac_etime
)*60;
x
= expand(fbuf
.ac_utime
);
x
= expand(fbuf
.ac_stime
);
if(p1
->count
== p2
->count
)
return(p1
->count
- p2
->count
);
return(p2
->count
- p1
->count
);
if ((f
= fopen("/usr/adm/savacct", "r")) == NULL
)
while (fread((char *)&tbuf
, sizeof(tbuf
), 1, f
) == 1) {
tab
[i
].count
= tbuf
.count
;
tab
[i
].realt
= tbuf
.realt
;
if ((f
= fopen("/usr/adm/usracct", "r")) == NULL
)
fread((char *)user
, sizeof(user
), 1, f
);
for (i
%=size
; tab
[i
].name
[0]; i
= (i
+1)%size
) {
if (tab
[i
].name
[j
]!=np
[j
])
for (i
= 0; i
<size
; i
++) {
if (tab
[i
].name
[0] && tab
[i
].count
<=thres
) {
printf("%.14s--", tab
[i
].name
);
if ((c
=getchar())=='y') {
tab
[j
].count
+= tab
[i
].count
;
tab
[j
].realt
+= tab
[i
].realt
;
tab
[j
].cput
+= tab
[i
].cput
;
tab
[j
].syst
+= tab
[i
].syst
;