ADSM-L

Re: DSMADMC Output Format

1999-08-25 17:11:25
Subject: Re: DSMADMC Output Format
From: "Richard C. Dempsey" <dempsey AT KODAK DOT COM>
Date: Wed, 25 Aug 1999 17:11:25 -0400
In addition to Mark's recommendations, I am also a fan of the
-commadelimited (which may be abbreviated to -comma) switch in
batch mode.  For example:
batch mode.  For example:

#!/bin/ksh
dsmadmc -id=drdata -password=password -comma query node abc\*

In the example, I used the backslash to escape the wildcard for
the shell, but in Perl, you'll be using a different syntax.

Rich

At 02:03 PM 8/25/99 -0700, you wrote:
>Patrick,
>
>my first recommendation is not to use the "query" commands,
>but to use the SQL "select", as that gives you a much richer
>environment to customize what data you are looking for.
>There are also the formatting commands, -tabdelimited, that
>that allows the results of a select statement to just have the "data"
>and not the column headings.
>
>Mark Mapes
>
>
>> ----------
>> From:         Varney, Patrick
>> Reply To:     ADSM: Dist Stor Manager
>> Sent:         Wednesday, August 25, 1999 1:39PM
>> To:   ADSM-L AT VM.MARIST DOT EDU
>> Subject:      DSMADMC Output Format
>>
>> Hello all,
>>
>>
>> I am working on a script (the current one is in perl, but I get the same
>> results in a ksh script) that processes information from DSMADMC in batch
>> mode, but am having a problem getting the output to come out the way I
>> want
>> it. For example, if I run the following command in interactive mode, I get
>> the output formatted as shown:
>>
>> adsm> query node abc* format=detailed
>>
>>                      Node Name: ABCDWS03A
>>                       Platform: (?)
>>             Policy Domain Name: ABC_DOMAIN
>>          Last Access Date/Time: 01/13/1997 17:11:04
>>         Days Since Last Access: 10
>>         Password Set Date/Time: 01/13/1997 17:11:04
>>        Days Since Password Set: 123
>>                        Locked?: No
>>                 and so on.....
>>
>> But when I run the same command in batch mode within the perl script or
>> just
>> redirect it to a file, I get the long column type output which is
>> difficult
>> to process in a script due to the line continuations:
>>
>> Node Name      Platform     Policy           Last    and so on....
>>                             Domain          Access
>>                             Name          Date/Time
>> ------------   --------     ---------     ----------
>> ABCDWS03A      (?)          ABC_DOMA-     01/13/1997 and so on....
>>                              IN            17:11:04
>>
>>
>> I realize that it automatically formats the output based on how much room
>> it
>> has, but I was wondering if there is an option to configure the output
>> format or fool it into thinking that it has a small output window. Or is
>> there a better way to get this information?
>>
>> I originally tried this on a Sun Solaris 7 client, but have had the same
>> results on an NT 4.0 client. The server version is 2, Release 1, Level
>> 5.19.
>>
>> Any help would be appreciated,
>>
>> Patrick Varney, MCSE
>> Pacific Gas & Electric Company
>> Fairfield, CA, USA
>> 707.436.2823
>>
>
>

Richard C. Dempsey                 email: dempsey AT kodak DOT com
Public Online Services             pager: 716-975-3539
11th Floor, Bldg 83, RL            phone: 716-477-3457
Eastman Kodak Company              fax:   716-722-3885
Rochester, NY 14650-2203
<Prev in Thread] Current Thread [Next in Thread>