- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Need help scripting a show free disk space scr...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2004 03:39 AM
05-26-2004 03:39 AM
Now I have several scripts, each slighly different, and 2 that are not reporting correctly.
*** DISK SPACE STATISTICS OF MOUNTED DISKS ***
*****************************
Disk Stats 26-MAY-2004 12:31:28.10
Device Logical Free Total Open
Name Name Blocks Blocks Usage Files I/Os Errors
------------- ---------- --------- --------- ------- ----- --------- ------
$1$Dka1: OVMS731 24017282 48828160 0.* % 625 13486555 0
$1$Dka2: Application 39993146 48828160 18.0 % 190 21962506 0
------------- ---------- --------- --------- ------- ----- --------- ------
64010428 97656320 34.0 % 815 35449061 0
I/Os are cumulative since 1-JAN-2004 21:12:27.00.
*** DISK SPACE STATISTICS IN MEGS ***
*****************************
Megs Megs Megs Percent
Disk Total Used Free Free Volume
-------------- ------- ------- ------- ------- ------------
_$1$Dka1: 23841 12114 11727 49.19% OVMS731
_$1$Dka2: 23841 4313 19527 81.91% Application
-------------- ------- ------- ------- ------- ------------
Totals 47683 16428 31255 65.55%
This one shows as
Device Type Blks Free Blks Used Pcnt 0% 25% 50% 75% 100%
$1$DKA1: DGX0 24017282 24810878 220% |8* |
$1$DKA2: DGX0 39993146 8835014 18% | |
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2004 03:48 AM - last edited on 09-16-2024 02:21 AM by support_s
05-26-2004 03:48 AM - last edited on 09-16-2024 02:21 AM by support_s
Re: Need help scripting a show free disk space script.
Note, These are not proprietry scripts as they were originally pulled pre 2000 from comp.os.vms and modified by myself for use on various OpenVMS servers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2004 04:23 AM
05-26-2004 04:23 AM
Re: Need help scripting a show free disk space script.
you go in arithmetic overflow in this statement:
$ PERCENTUSED = ((USEDBLOCKS*100) + (TOTALBLOCKS/2)) / TOTALBLOCKS
because USEDBLOCKS*100 is greater then 2147483647 that's the biggest value of DCL integer.
You could evaluate all value in Kb or Mb such as:
$ USEDMB = USEDBLOCKS / 2048
then evaluate using MB
H.T.H.
Antonio Vigliotti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2004 05:06 AM
05-26-2004 05:06 AM
Solution$ USEDBLOCKS = TOTALBLOCKS -FREEBLOCKS ! Used blocks
$ PERCENTUSED = ((USEDBLOCKS*100) + (TOTALBLOCKS/2)) / TOTALBLOCKS
The factor with the divide by 2 is for roundup right?
Anyway, there is a 32 bit problem if you multiplly on the left. It is safer to divide on the right first, or go to MB all the way by dividing all blocks values by 2048
Suggested change:
$ USEDBLOCKS = TOTALBLOCKS - FREEBLOCKS ! Used blocks
$ PERCENTUSED = (USEDBLOCKS + (TOTALBLOCKS/200)) / (TOTALBLOCKS/100)
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2004 06:28 AM
05-26-2004 06:28 AM
Re: Need help scripting a show free disk space script.
Many Thanks, it works great.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2004 07:44 AM
05-26-2004 07:44 AM
Re: Need help scripting a show free disk space script.
if you are looking for a ready-to-run procedure, a while back I posted one at dcl.openvms.org
http://dcl.openvms.org/stories.php?story=04/01/27/9890517
(mind the wrap!)
And if you like one that gives a continues display, update every (you decide) minutes,
to run in a Decwindows display, have a look at
http://dcl.openvms.org/stories.php?story=04/01/27/5207367
as well.
Enjoy!
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2004 09:26 AM
05-26-2004 09:26 AM
Re: Need help scripting a show free disk space script.
I may have made a mistake when I copied the space.com file over as I get the following error when I test on my dev system. I will have to spend some time looking over the script.
@space
%DCL-W-MAXPARM, too many parameters - reenter command with fewer parameters
\DISK\
%SYSTEM-F-BADPARAM, bad parameter value
\!5!13!11!6!9!9!10!9!13!3!8\
The other file seems to run ok.
Very interesting site. Seems to have a ton of scripts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2004 02:15 PM
05-26-2004 02:15 PM
Re: Need help scripting a show free disk space script.
you might be interested in the /size=bytes
qualifer to various commands. I think it was introduced with 7.3-1 (it definitly is in 7.3-2)
Plus there is the "free" utility from Hunter Goatley, which should do pretty exactly what you are looking for.
http://vms.process.com/scripts/fileserv/fileserv_search.exe?package=free&description=&author=&system=Either&language=All
Greetings, Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2004 11:38 PM
05-26-2004 11:38 PM
Re: Need help scripting a show free disk space script.
thanks for the error message!.
I checked my routine again, and it works fine.
So, I took a very close look at the procedure as posted, and at first I couldn't understand. Your message pointed to the FAO params, and then I saw it:
The problem stems from HTML processing.
The roots of SPACE.COM are lost in time, but way back when I started with some procedure that had a good example of extensive f$FAO use.
It uses as FAO syntax to specify a counted string output specification:
!5 for string symbol, or
!9 for space-filled numeric.
This syntax isn't even in the manuals (anymore?).
And here is the root of the problem: HTML parsing assumes "< ... >" to be a directive.
In this case, un unknown directive, so it is simply removed....
I converted the F$FAO statement directives to new syntax, and that works (on my system) just the same.
I am rather surprised no-one complained before..
I will do an upload of the new version, and ask Ken to replace the old one.
Thanks again for the notification!
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2004 11:57 PM
05-26-2004 11:57 PM
Re: Need help scripting a show free disk space script.
Please let me know when the new version is uploaded and I will download it and try it out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2004 01:16 AM
05-27-2004 01:16 AM
Re: Need help scripting a show free disk space script.
Ken has found my upload & released it.
He named it SPACE.COM V2
At a quick glance it looks like the f$fao params now seem OK.
Success, have fun!
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2004 01:26 AM
05-27-2004 01:26 AM
Re: Need help scripting a show free disk space script.
Just for fun, let's put them in this box and see if they show up:
1st one:
$ TEXT= F$FAO -
("!28!7!9!9!10!9!13!3!8",-
space,unt,FRE_t,USE_t,tot_t,mag_t,gaatut,PERCFULL,eind)
2nd one:
$ TEXT= F$FAO -
("!28!7!9!9!10!9",-
space,unt,FRE_t,USE_t,tot_t,mag_t)
3rd one:
$ text= f$fao -
("!5!13!11!6!9!9!10!9!13!3!8",-
space,name,disk,hw,freeblocks,usedblocks,max,mag,gaatut,percfull,eind)
Thanks for the com!
Art
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2004 01:47 AM
05-27-2004 01:47 AM
Re: Need help scripting a show free disk space script.
This isn't a complaint, I read the disclaimer, I know I'm getting what I paid for! ;-)
What you don't see in the attached text file though, is that the shading used for the warning percentages does work very nicely! Cool!
Thanks again,
Art
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2004 02:08 AM
05-27-2004 02:08 AM
Re: Need help scripting a show free disk space script.
Like you say, you get what you pay for.
But then again, I got hit by my own (usually absent!) exagerated sense of neetness.
What I did do before posting was a 'nice' cleanup of traces of all debug & modification and change-comments & whatever.
Next, the filter between our intranet & the "evil big world" does (among a lot of other misery) block any .EXE & .COM
So, I converted it to a nice, clean .TXT
And thereafter we also got bigger disks, so for the ACTIVE .COM procedure we did update the formatting, and the version on dcl.openvms.org missed that.
But for now, I leave it to anyone needing it do do the excersize him/herself.
Hit: cannibalise the leading spaces!
fwiw
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2004 09:06 PM
05-28-2004 09:06 PM
Re: Need help scripting a show free disk space script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2004 11:30 PM
05-30-2004 11:30 PM
Re: Need help scripting a show free disk space script.
Also to any our American Neighbors to the South (I'm in Canada), Happy Memorial Day.
Vic..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2004 09:45 AM
05-31-2004 09:45 AM
Re: Need help scripting a show free disk space script.
Same disclaimer plus:
IS NOT FAULT TOLERANT AND IS NOT DESIGNED, MANUFACTURED, OR INTENDED FOR USE OR RESALE AS ON-LINE CONTROL EQUIPMENT IN HAZARDOUS ENVIRONMENTS REQUIRING FAIL-SAFE PERFORMANCE, SUCH AS IN THE OPERATION OF NUCLEAR FACILITIES, AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH THE FAILURE OF TECHNOLOGY COULD LEAD DIRECTLY TO DEATH, PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE.
But I'ld be real sorry if any of that did happen!!
Cheers,
Art