[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[IDD #OII-423146]: suggestion for getting list of products via pqact



Hi Rick,

Sorry for the silence, I was out of the house on a food shopping
errand...

re:
> I don't want to do anything, just dump the file name to a file.

OK.

re:
> Basically I want to see what comes from the command  ldmdadmin watch -f
> CONDUIT. For the life of me can't figure out how to get that output to a
> log file.

I believe that the output from 'ldmadmin watch' is sent to STDERR, not
STDOUT.

Another way of logging the receipt of products is to use the LDM utility 
'notifyme'.
Here is an example for your system:

notifyme -vl /home/ldm/file-list.txt -f CONDUIT -p "gfs.*0p5"

I ran a slight variation of this on our machine, and the output
file has the expected Product IDs:

notifyme -vl /opt/ldm/file-list_gfs_0p5.txt -f CONDUIT -p "gfs.*0p5" -o 1800

From another terminal, I ran:

less /opt/ldm/file-list_gfs_0p5.txt

20200731T214102.568601Z notifyme[519856]            notifyme.c:main:363         
        NOTE  Starting Up: localhost: 20200731211102.568258 TS_ENDT {{CONDUIT, 
"gfs.*0p5"}}
20200731T214102.568679Z notifyme[519856]            ldm5_clnt.c:forn5:460       
        NOTE  LDM-5 desired product-class: 20200731211102.568258 TS_ENDT 
{{CONDUIT, "gfs.*0p5"}}
20200731T214102.569171Z notifyme[519856]            error.c:err_log:236         
        INFO  Resolving localhost to 127.0.0.1 took 0.000389 seconds
20200731T214102.571255Z notifyme[519856]            ldm5_clnt.c:forn_signon:294 
        NOTE  NOTIFYME(localhost): OK
20200731T214104.001444Z notifyme[519856]            
notifyme.c:notifymeprog_5:212       INFO       14284 20200731212748.358490 
CONDUIT 000  data/nccf/com/gfs/prod/gfs.20200731/18/gfs.t18z.pgrb2.0p50.f000 
!grib2/ncep/SSIGFS/#000/202007311800F000/CWTR/1 - HYBL! 000000
20200731T214104.001681Z notifyme[519856]            
notifyme.c:notifymeprog_5:212       INFO       12981 20200731212748.449997 
CONDUIT 000  data/nccf/com/gfs/prod/gfs.20200731/18/gfs.t18z.pgrb2.0p50.anl 
!grib2/ncep/SSIGFS/#000/202007311800F000/CWTR/1 - HYBL! 000000
20200731T214104.041640Z notifyme[519856]            
notifyme.c:notifymeprog_5:212       INFO      304665 20200731212749.137706 
CONDUIT 020  data/nccf/com/gfs/prod/gfs.20200731/18/gfs.t18z.pgrb2.0p50.f000 
!grib2/ncep/SSIGFS/#000/202007311800F000/OZMR/1 hPa PRES! 000020
 ...

The 'notifyme' output reminded me that the Product IDs for the CONDUIT
products have a section that is sorrounded by exclamation marks.
This lit a light bulb about why your script was not logging the
GFS Product IDs: the exclamation marks are being interpreted by
the Korn shell interpreter so what it is actually doing is not what
you want it to do.  I think you need to change your script to:

#!/bin/ksh

echo '$1' | grep "gfs.*0p5" >> /opt/ldm/file-list.txt

NB: surrounding the command line text with single quotes insures
that the shell won't try to interpret the exclamation marks.  Also,
I combined your two 'grep's into one as it is more compact.

Or, you can use 'notifyme' in the manner show above.  I recommend
using 'notifyme'...


Cheers,

Tom
--
****************************************************************************
Unidata User Support                                    UCAR Unidata Program
(303) 497-8642                                                 P.O. Box 3000
address@hidden                                   Boulder, CO 80307
----------------------------------------------------------------------------
Unidata HomePage                       http://www.unidata.ucar.edu
****************************************************************************


Ticket Details
===================
Ticket ID: OII-423146
Department: Support IDD
Priority: Normal
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.