Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Account usage

 
SOLVED
Go to solution
nipun_2
Regular Advisor

Regarding Account usage

Hi,
I have Vms 7.3-2 running on DS25s cluster with a common system disk.

I am trying to keep a log of account usage.

We have 6 accounts and all the users use
3 different queues for their jobs.

Can I track each user account for each specific que for a specific date.

If someone can provide an example for an execution queue (let's say name is time_que1, time_que2,time_que3 and users are usr1,usr2,usr3,... )

Thanks in advance.
I am familiar with basic VMS at a very basic level so details would be very helpful. If there are additional questions please let me know.

8 REPLIES 8
John Gillings
Honored Contributor

Re: Regarding Account usage

nipun,

You need to work out exactly what you mean by "account". The meaning of "account" in SYSUAF is probably different from what you're thinking of!

If you have accounting enabled (yikes, another overloading of the term!), you can track system usage in the accounting log. Check:


$ SHOW ACCOUNT
Accounting is currently enabled to log the following activities:

PROCESS any process termination
INTERACTIVE interactive job termination
LOGIN_FAILURE login failures
SUBPROCESS subprocess termination
DETACHED detached job termination
BATCH batch job termination
NETWORK network job termination
PRINT all print jobs
MESSAGE user messages

You can extract information using the ACCOUNTING utility, which produces reports of system usage. See HELP ACCOUNTING, or check out the System Managers Manual.

Specifically, you can generate summary reports of individual users usage of each queue, across arbitrary timespans.
A crucible of informative mistakes
Jon Pinkley
Honored Contributor

Re: Regarding Account usage

I know of no way to get a report with a single pass of the accounting utility. However since you have only 3 queues you are interested in, you can do it in 3 passes.

$ accounting /type=process /sum=user /queue=time_que1 /report=(elap,proc,dir,buf,fau,rec) /sin=date /bef=next_date

repeat with /queue=time_que2 and /queue=time_que3

If you want the reports to be per user, instead of per queue, then

$ accounting /type=process /sum=queue /queue=(time_que1,time_que2,time_que3) /user=usr1 /report=(elap,proc,dir,buf,fau,rec) /sin=date /bef=next_date

repeat with /user=usr2 ... /user=usrN

You could write a command procedure to do this if you need to do it daily.


Also read:

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1194995

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1171928

http://h71000.www7.hp.com/doc/732FINAL/6048/6048pro.html#acc_u
it depends
nipun_2
Regular Advisor

Re: Regarding Account usage

Hello,
thank you both John and Jon for your responses.

John:
To further clarify (still learning) when I typed

$show account

I got the same options as you have mentioned. I believe the correct term for me is

user accounts

Jon:
thank you for the detailed command it was really helpful. I was able to test it and it worked for one que and one user!
e.g usr1 and time_que1

Now here is an additional point/question

1) Now when I tried to add time_que2 and time_que3 I did not get any report at all. Of course the time_que2 and time_que3 were in use at that time (when I was generating the report). Does this make a difference ? Do all the queues have to be idle or paused to generate the report. These all are execution queues



2)
I guess we only have to measure the Execution Queues and not the Generic Queues correct ?

In my case - it is generic_que1 with time_que1, time_que2, time_que3 as execution queues. So I would like to get a report for all the three queues together as shown in the example by Jon. This doesnt make sense for the generic queue as the generic queue merely assigns the job and doesn't actually execute the job.

Is my understanding correct ?


Jon Pinkley
Honored Contributor
Solution

Re: Regarding Account usage

nipun,

What gets written to the accounting file is related to the types of things that show accounting displays.

PROCESS any process termination
INTERACTIVE interactive job termination
LOGIN_FAILURE login failures
SUBPROCESS subprocess termination
DETACHED detached job termination
BATCH batch job termination
NETWORK network job termination
PRINT all print jobs
MESSAGE user messages

In addition if you enable image accounting a record will be written for each image executed.

These records do not get written to the accounting file until they happen, i.e. until a process terminates there will be no accounting. So if you have a batch job that starts at system startup and never exits, there will never be an accounting record written until the system shutdown. If the system crashes, there is no chance to write the accounting record, so in that case, there would be no accounting for the job. That is why companies that charge for resources usually have something that periodically snapshots the process accounting. 15 years ago when I worked somewhere else we had a package called PACS that allowed that to happen (it also allowed charging different rates at different time periods, so that was another reason to take snapshots when these time periods changed.

The point is, perhaps the reason you got nothing for time_que2 and time_que3 is that there is nothing that finished during that time period. The /before and /since are for when the record was written to the accounting file. For example if there was a batch job that started at 12:01 AM on the 29th, and finished at 12:01 AM on the 30th, an accounting /sin=29--:/bef=30--: would find nothing, an account/sin=30--:/bef=30--:00:02 would report 1 day's resources, even though the duration of the "accounting" was 2 minutes.

Also, when a batch job runs (and therefore when it terminates) it is always in an execution queue, so the answer to your question about generic queues is that there will never be anything in accounting that tells what generic queue it was submitted to (at least that I am aware of).

If you are really interested in the total usage per user, and you don't care which of the three execution queues it ran on, then you can use the command:

$ accounting /type=process /sum=user /queue=(time_que1,time_que2,time_que3) /report=(elap,proc,dir,buf,fau,rec) /sin=date /bef=next_date

This will combine the resources for time_que1...time_que3 and summarize by user.

And if you haven't' read the other threads, please do, as you have a cluster, and the execution queues may be on different nodes, and therefore in different accounting files.
it depends
nipun_2
Regular Advisor

Re: Regarding Account usage

Very very helpful Jon.

thank you

Yes I did read the other threads also. But I think this explains a lot. I will be testing your theory and update sometime tomorrow (U.S E.S.T time)

nipun
Jon Pinkley
Honored Contributor

Re: Regarding Account usage

nipun,

If you haven't yet done this, it is a good learning exercise. It shows what is in the accounting file. It will display one record at a time, and will wait for you to press before going to the next record. You can press ^Z to exit after you have seen enough records to satisfy your curiosity.

$ accounting/full

The accounting file is a sequential file, i.e. new records are always appended to the end of the file, therefore what you see in accounting/full is in chronological order of when the records were written to the file.

Note that the records are in order by "Finish time:". For some records it may appear they are ordered by start time, but that's just a coincidence.

Find a record that shows a significant elapsed time, then press ^Z to exit.

For example, let say you find a record with a

Finish time: 28-JAN-2008 20:55:44.63
Start time: 28-JAN-2008 09:16:22.41
Elapsed time: 0 11:39:22.21
Processor time: 0 00:00:15.20

Now use the command:

$ acc/ful/sin="28-JAN-2008 20:55:44.63"

It will display the record you just looked at (unless there was another record that finished before but within the same centisecond). The point is that the times you specify are compared to the "finish time", not the start time. Elapsed time does not even exist in the accounting file, it is derived by the accounting utility from the start and finish time.

The layout of the ACCOUNTNG.DAT file used to be documented (in I believe the System Manager's Utilities Reference Manual), but it isn't there in the current online manuals. I have no idea why this was removed, probably because they used to print documentation and most was never read anyway, so removing it saved money. I really wish it got put back in, but I won't hold my breath. The records are variable length, so it isn't something you can just load into an excel spreadsheet and display. You can see this by doing something like

$ dump/record=c:20 sys$manager:accountng.data

or if your are not interested in seeing the data,

$ pipe dump/rec=c:20 sys$manager:accountng.dat | search sys$pipe "RFA("

and noting the "bytes" are not constant.

There have been DECUS submissions of programs that will process the ACCOUNTNG file, and Datatrieve definitions to allow it to process the files, but what tapes they were on, I don't know.
it depends
nipun_2
Regular Advisor

Re: Regarding Account usage

Hello Jon

This works perfectly. I checked your theory about the queues in use. Everything makes much more sense to me.

$ accounting /type=process /sum=user /queue=(time_que1,time_que2,time_que3) /report=(elap,proc,dir,buf,fau,rec) /sin=date /bef=next_date


Thank you for sending additional information regarding the accounting report itself.

That completes one cycle. Of course ideally (I will repost this to make it different from this thread) I also want to track application times (they are not run using queues) and I guess there might be a commercical applcation, hopefully not too $4K. However, as I mentioned for now this will be useful.

nipun_2
Regular Advisor

Re: Regarding Account usage

The query has been resolved as noted in my previous comments