Last Comments

Rich Jordan (My Digital Collec…): I never got a tote or lar…
Rich Jordan (My Digital Collec…): I look forward to these. …
Chris (PmWiki): I would say that you prob…
tmr (PmWiki): Has anybody tried to run …
rafael (Print, baby, prin…): Thank you very much. I …
Mark (PmWiki): Yes, that did the trick. …
Chris (PmWiki): Hi Mark, In the apache$…
Mark (PmWiki): Hi, I am also suffering f…
Jose Baars (Burn, baby, burn): Hi, Thanks for writing th…
Aaron (Keeping PAKs): I’ve been working with HP…

Archives

01 Jan - 31 Dec 2006
01 Jan - 31 Dec 2007
01 Jan - 31 Dec 2008
01 Jan - 31 Dec 2009

Reference

dcl.OpenVMS.org
www.OpenVMS.org
OpenVMS FAQ
OpenVMS' official site
OpenVMS documentation
OpenVMS WebRing
Secure Web Server
OpenVMS Hobbyist Forums
Pivot Homepage

Blogs

eight-cubed.com
HoffmannLabs
SYSMGR in the attic
VMS Spoken Here

Miscellany

Powered byPivot - 1.30.2: 'Rippersnapper' 
XML Feed (RSS 1.0) 
XML: Atom Feed 

« OV on i64 | Home | OpenVMS online help s… »

Finding the size of open files

A quick pipe hack

Here's a one-liner that will allow you to search for open files on a disk, then display the file size. Note that the parameter for findp can be altered to restrict the search to specific file types that are open (e.g., ".log").

$ pipe sh dev /file | findp " [" | eachline file -
"pipe file = f$extr(24,99,file) ; dire/size=all &file"

Note that findp is a shortcut symbol for "search sys$pipe" and eachline comes from dcl.openvms.org. This one liner can be added to your login.com.

I used this recently when I found that one of my disk drives was getting full, but I couldn't identify what was hogging the space.  It turned out that an SMTP process was stuck processing spam, and it was filling up a log file.  The log file didn't appear to be growing -- the space used was sitting stationary -- but it turned out the allocated space was way beyond that.  This one-liner allowed me to quickly find all the open files and show me what kind of disk space they were using.



No comments:


No trackbacks:

Please enable javascript to generate a trackback url


  
Remember personal info?

Emoticons / Textile

To prevent automated comment spam, I've got to ask you this innocuous question about the creator of our fav OS, DEC.
 

  ( Register your username / Log in )

Notify:
Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.