Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Report.. DU command..

182 views
Skip to first unread message

Andres Abello

unread,
Apr 4, 2013, 11:12:09 AM4/4/13
to
Hi Everyone,

On a Monthly basis I have to deliver a Report about disk Usage on the MCP plataform.

I have to check every pack with the DU and DU SYSTEMDIRECTORY commands.

Is there any way I could write a program that reads this info and produce a text file or something???

thanks in advance...

Pieter Weerstand

unread,
Apr 5, 2013, 2:24:20 AM4/5/13
to
Abello,

I wrote this program some time ago; maybe its usefull for you. It produces a text file called DUDATA. (if emailsupport isnt sl-ed, you can skip it)

$Set Installation 1
Begin


Array
Gsa[0:49],
Info[0:1000],
Units[0:99],
Name[0:3],
Named[0:3],
Disp[0:8],
Std[0:20],
Outp[0:1,0:8];
Boolean
B;
String
Dummy;
Integer
NoOfUnits,
I,
Unit,
Entry;
Pointer
P,
P1,
P2,
Pe,
Po;
Real
V1,
V2,
Rslt=B;
Define % Unit type values
DiskType = 17#;
Define
CaseF = [04:05]#,
SubCaseF = [12:08]#,
UnitTypeF = [47:08]#;
Define
BaseUnit = Integer(Info[21]) Eql Unit#,
NameLen = Integer(Info[18].[47:08])#,
StartOfName = Info[18].[39:40]#,
FamilyIndex = Info[16].[35:8]#;
Define
Delim = ","#,
Space = " "#,
TotalSpace = Gsa[9].[47:48]#,
Available = Gsa[1].[47:48]#,
SectorSize = Gsa[10].[47:48]#,
IT = Decimal(String(TotalSpace,12))#,
IA = Decimal(String(Available,12))#;
File
TTY(
Kind=Remote),
DuData(
NewFile,
Kind=Disk,
Protection=Save);

Library EmailSupport(LibAccess=ByFunction);
Real Procedure Email(Pe); Value Pe; Pointer Pe;
Library EmailSupport;

Truthset
Letters(
"ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");

V1:=0 & 22 CaseF & 0 SubCaseF;
V2:=7;
B:=SystemStatus(Info,V1,V2);
Entry:=1;
P1:=Units[0];
While Integer(Info[Entry]) Neq 0 Do Begin
If Info[Entry+1].UnitTypeF Eql DiskType Then Begin
NoOfUnits:=*+1;
Replace P1:P1 By Integer(Info[Entry]);
End;
Entry:=*+2;
End;

Resize (Outp, NoOfUnits+1, Retain);
Replace Outp[0,0] By "Name,Index,Unit,TotSpace,",
"Avail,Sectors";
Write(DuData,//,Pointer(Outp[0,0]));
V1:=0 & 28 CaseF & 0 SubCaseF;
Entry:=0;
While Integer(Units[Entry]) Neq 0 Do Begin
Unit:=Integer(Units[Entry]);
B:=SystemStatus(Info,V1,Unit);
P:=Named[0];
Replace P By StartOfName, Info[19],Info[20];
P:=*+1;
P2:=Name[0];
Replace P2 By P Until Eql 48"00",".";
Replace Disp[0] By P2 Until Eql ".", ".";
DisplayToStandard (Pointer(Disp), Pointer(Std[0]));
Gsa[0]:=3;
Gsa[1]:=Integer(FamilyIndex);
Gsa[2]:=504;
Replace Gsa[3] By Std For 3 Words;
If Not B:=Getstatus (0 & 3[07:08] & 6 [15:08], 1, 0, Gsa)
Then Begin
Po:=Outp[Entry+1, 0];
Replace Po:Po By P2 Until Eql ".",Delim,
FamilyIndex For * Numeric, Delim,
Units[Entry] For * Numeric, Delim,
TotalSpace For * Numeric, Delim,
Available For * Numeric, Delim,
SectorSize For * Numeric;
Write(DuData,//,Pointer(Outp[Entry+1,0]));
Entry:=*+1;
End;
End;

%Programdump (Arrays);

End.

Op donderdag 4 april 2013 17:12:09 UTC+2 schreef Andres Abello het volgende:

Paul Kimpel

unread,
Apr 5, 2013, 10:23:46 AM4/5/13
to
Pieter's program handles the case of DU on <familyname>, but not DU
SYSTEMDIRECTORY on <familyname>. The directory statistics for a family
are available from the same Type-3/Subtype-6 call on GETSTATUS. To
retrieve them, replace the statement in Pieter's code:

Gsa[1]:=Integer(FamilyIndex);

by

Gsa[1]:= -2;

Also note that Pieter's program outputs statistics for each familyindex
of a family. You can get aggregate statistics for the whole family by
setting Gsa[1]:=0 prior to the GETSTATUS call.

There are more values available in the results of the call than Pieter
is formatting in his program. See the section on Subtype 6 Calls (Disk
Utilization) in Chapter 3 of the GETSTATUS/SETSTATUS Programming
Reference Manual for details.

--
Paul

Andres Abello

unread,
Apr 29, 2013, 4:31:48 PM4/29/13
to
Thank you guys..

I made a program with GETSTATUS/SETSTATUS Programming
Reference Manual, and following Paul an Pieter advices..

I tested it on a practice enviroment and it worked.

Unfortunadely on the production enviroment I havent recieved authorization :(

Thanks for your help....

David

unread,
Apr 30, 2013, 12:49:52 PM4/30/13
to
What privilege were you asking for in the production environment? You
only need GETSTATUS privilege (MP <codefile> + GETSTATUS) which may be
an easier privilege to request (since it doesn't give you the ability to
change state).

David
Message has been deleted

George Dickson

unread,
Jun 26, 2013, 7:30:29 AM6/26/13
to
As of IC PDIR-054.1A.1 Unisys now release a utility called *SYSTEM/PUNIT which will return disk information, which includes space usage. EG:

u *system/punit select kindname=PK and online=true show name, capacity,
largestszsects, availsects

As with PMIX and PDIR you can output to a text file, a csv file, or a tabbed file:

u *system/punit select kindname=PK and online=true show name, familyindex,
capacity, largestszsects, availsects:file dulist

Note however that this does not report SYSTEMDIRECTORY information nor does it aggregate over a family.

As of IC PDIR-054.1A.1 Unisys now release a utility called *SYSTEM/PUNIT which will return disk information, which includes space usage. EG:

u *system/punit select kindname=PK and online=true show name, capacity,
largestszsects, availsects

As with PMIX and PDIR you can output to a text file, a csv file, or a tabbed file:

u *system/punit select kindname=PK and online=true show name, familyindex,
capacity, largestszsects, availsects:file dulist

Note however that this does not report SYSTEMDIRECTORY information nor does it aggregate over a family.

George
0 new messages