Operating System - OpenVMS
1826402 Members
4128 Online
109692 Solutions
New Discussion

Re: Output of "show dev d" seems not correct

 
SOLVED
Go to solution
Ricky Pardede
Occasional Advisor

Re: Output of "show dev d" seems not correct

@Jon :
Thanks for the tips to check open files.
Yes, this system is SMSC.

The disk is normal now.
I stop all processes that still lock files, then delete those files.
The disk occupancy back to normal.

I want to ask regarding the locked files :
dir /size=all
XXX00.DUMP;1 0/*******
XXX01.DUMP;1 0/*******
XXX02.DUMP;1 0/*******

It shows 0 of used, but so big in allocated.

Can help to explain how OpenVMS decides block size for used and allocated for 1 process?



Joseph Huber_1
Honored Contributor

Re: Output of "show dev d" seems not correct

An open file gets no update on size,date,etc. until it is closed.
So if an application just opens a file once, and only closes when the program terminates, then it shows 0 blocks used, and a growing number of blocks allocated.

Some utilities do close/reopen log files on a regular interval, so one can see the used block s in a directory listing.
http://www.mpp.mpg.de/~huber
Jon Pinkley
Honored Contributor

Re: Output of "show dev d" seems not correct

@Ricky
I want to ask regarding the locked files :
dir /size=all
XXX00.DUMP;1 0/*******

It shows 0 of used, but so big in allocated.

Can help to explain how OpenVMS decides block size for used and allocated for 1 process?

-----------------

Joseph Huber explained why the used size is displayed as zero. Unless a process explicitly request that the EOF (End Of File) pointer is updated, it will remain static. It gets updated when the file metadata gets resynched by the programs request; either an RMS $FLUSH or when the file is closed. If the file is created when it is opened, then written to for a long period of time, then the file will continue to be extend the file's allocated space to make room for the data. The end of data pointer is constantly updated in the memory of the process writing the data, but unless the metadata is resynched, the updated value will not be visible to other processes, and what is displayed by directory/size=used will remain 0.

In the directory output above, the files were larger than 5 GB (9,999,999). The default width for the size field is 7, so the allocated blocks were displayed as ********. To see the actual value, you can user directory/full file or directory/width=(size=12)/size=all (see help dir/width)

The used/allocated concept isn't unique to VMS, windows does the same thing, although is a bit harder to see the "allocated" space in windows. The allocated space in windows shows up in file properties as "Size on Disk".

Size: 706 bytes (706 bytes)
Size on Disk: 4.00 KB (4,096 bytes)

------------------

There is probably a cleaner way to get the processes to close and open a new .dump file than to stop the process, but I know nothing about the SMSC software. You will need to consult the documentation for that.

Jon
it depends