| Have your customer write a kernel-mode routine that places the name
of the project into CTL$T_ACCOUNT in P1 space. It's only 8 bytes,
so he'll probably have to use some kind of coding scheme.
Basically, invoke this program at login time to get the project
number for the user, and put it in. When the user logs out (here's
the trick) it will be written to the system accounting file, along
with his process statistics. You can then get accounting to sort-break
on this field for output (VMS doesn't use the ACCOUNT field, so
this is kosher).
Caveats: this will NOT allow the user to change projects in mid-stream.
It will also NOT pick up anything the user does in a sub-process
(if you want that, use the field PCB$T_ACCOUNT (in the PCB) AS WELL
AS CTL$T_ACCOUNT)
If you were VERY creative, you could give the user a sub-process
for each of several projects (appropriately setting CTL$T_ACCOUNT)
and that would allow him to dynamically switch (using ATTACH).
Honest, this works -- I've helped people do it.
- HBM
|
| Another possibility (and takes less privs -- OPER?) is to hack
one of the accounting fields, especially since DEC provides
you with one. This would require a little thought and the
normal post-processing of the accounting file.
a short example of sending text to the accounting file ala semi-BLISS:
local
sndjbc_itmlst : $itmlst_decl(items=1);
$itmlst_init(itmlst=sndjbc_itmlst,
(itmcod=sjc$_accounting_message, bufadr=.buf_adr, bufsiz=.buf_len));
status=$sndjbcw(
efn=0,
func=sjc$_write_accounting,
nullarg=0,
itmlst=sndjbc_itmlst,
iosb=0,
astadr=0,
astprm=0);
|