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

20040628: Perl redirect problems (cont.)



>From: David Ovens <address@hidden>
>Organization: University of Washington
>Keywords: 200406241954.i5OJsCWb010248 LDM PIPE Perl

David,

re: This is why I am very curious about the environment in which the
script is running in each case.

>I've taken Tom's suggestion to output the environment variables as
>seen by the script and I think we've come up with something because
>they are not the same as the output from the ldmadmin action.  I've
>included the results below.

I suspected that the set of enviornment variables might be different.
I wasn't expecting that they would differ based on how the LDM was
started.

>Note that index and index2 are showing
>the bug-like behavior even though the two commands are run
>sequentially: 
>
>  $index = index(`ps guxww | grep 'Xvfb :$display' | grep -v grep`, "Xvfb");
>  $index2 = index(`ps guxww | grep 'Xvfb :$display' | grep -v grep`,"Xvfb");
>
>The biggest problem I see in the output below is that USER=ldm and
>LOGNAME=harry.  I think trying to restart the LDM on freshair with
>harry becoming ldm with 'su - ldm' instead of 'su ldm' might do the
>trick.  What do you folks think?

I am uncertain.

Quick question:

The listing labeled 'ldmadmin environment variables file output' looks
like you cat'd .cshrc, not listed the environment variables that
are active.  How did you get the set of environment variables in each
case?

Tom

>------------------ pqact environment variables file output ------------
>index = 63
>index2 = -1
>                    SSH_CLIENT -> ::ffff:128.95.176.96 35832 22
>                          HOST -> freshair
>                    AUTHORCOPY -> /home/disk/atmos/harry/News/articles.sent
>                    NNTPSERVER -> news.u.washington.edu
>                    REMOTEHOST -> moist.atmos.washington.edu
>                        OSTYPE -> linux
>                    LDMPQFNAME -> /home/pq/ldm.pq
>                       SAVEDIR -> /home/disk/atmos/harry/News
>                           PWD -> /usr/local/ldm
>                          USER -> ldm
>                       LOGNAME -> harry
>                         GROUP -> harry
>                           SUN -> 
>                         SHLVL -> 4
>                        MCDATA -> /home/data/mcidas
>                          PATH -> /usr/local/ldm/bin:/bin:/usr/bin:/usr/sbin:/
> sbin:/usr/ucb:/usr/usb:/usr/etc:/etc:/opt/intel/compiler80/bin:.:/usr/local/l
> dm/bin:/usr/local/wx/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/hos
> ts:/home/disk/damp/marka/wx/bin:/usr/local/bin:/usr/local/ncarg_pgi/bin:/usr/
> pgi/linux86/bin:/usr/local/ldm/mcidas/bin:/usr/local/ldm/local/bin:/usr/local
> /ldm/ldm-mcidas/bin:/usr/local/ldm/nawips/bin/linux:/usr/local/ldm/local/bin:
> /usr/local/bin:/usr/local/ldm/mcidas/bin
>                        MCPATH -> /home/data/mcidas:/usr/local/ldm/mcidas/data
> :/usr/local/ldm/mcidas/help
>                      HOSTTYPE -> i386-linux
>                          TERM -> xterm-r6
>                 MCTABLE_WRITE -> /home/data/mcidas/MCTABLE.TXT
>            INTEL_LICENSE_FILE -> /opt/intel/compiler80/licenses:/opt/intel/li
> censes:/opt/intel/compiler80/licenses:/opt/intel/licenses
>                       LDMHOME -> /usr/local/ldm
>                       SSH_TTY -> /dev/pts/8
>                         PAGER -> less -s
>                          HOME -> /usr/local/ldm
>        ULOG_FACILITY_OVERRIDE -> 7
>                SSH_CONNECTION -> ::ffff:128.95.176.96 35832 ::ffff:128.95.89.
> 10 22
>                       MANPATH -> /opt/intel/compiler80/man:/usr/share/man:/us
> r/local/man:/usr/man:/usr/X11R6/man
>                       DISPLAY -> :1
>                         MCGUI -> /usr/local/ldm/mcidas/bin
>                  MCTABLE_READ -> /home/data/mcidas/MCTABLE.TXT;/usr/local/ldm
> /mcidas/data/ADDESITE.TXT
>                          MAIL -> /var/mail/harry
>                        EDITOR -> emacs
>                            TZ -> GMT0
>                   LDMHOSTNAME -> freshair.atmos.washington.edu
>                        VENDOR -> intel
>                        FMHOME -> /usr/local/frame
>                       CVSROOT -> /home/disk/atmos/CVSROOT
>                             _ -> /usr/local/ldm/bin/rpc.ldmd
>                         NCARG -> /usr/local/ncarg_pgi
>                    NCARG_ROOT -> /usr/local/ncarg_pgi
>                      MACHTYPE -> i386
>                         SHELL -> /bin/tcsh
>                     CLASSPATH -> .:/usr/local/ldm/classes:/usr/local/classes
>                     UDRESPATH -> /usr/local/ldm/etc
>                           PGI -> /usr/pgi
>
>
>------------------ ldmadmin environment variables file output ------------
>setenv PATH "/usr/local/ldm/bin:/bin:/usr/bin:/usr/sbin:/sbin:/usr/ucb:/usr/us
> b:/usr/etc:/etc:/opt/intel/compiler80/bin:.:/usr/local/ldm/bin:/usr/local/wx/
> bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/hosts:/home/disk/damp/ma
> rka/wx/bin:/usr/local/bin:/usr/local/ncarg_pgi/bin:/usr/pgi/linux86/bin:/usr/
> local/ldm/mcidas/bin:/usr/local/ldm/local/bin:/usr/local/ldm/ldm-mcidas/bin:/
> usr/local/ldm/nawips/bin/linux:/usr/local/ldm/local/bin:/usr/local/bin:/usr/l
> ocal/ldm/mcidas/bin"
>setenv HOME "/usr/local/ldm"
>setenv SHELL "/bin/tcsh"
>setenv USER "ldm"
>setenv LOGNAME "ldm"
>setenv MAIL "/var/mail/ldm"
>setenv HOSTTYPE "i386-linux"
>setenv VENDOR "intel"
>setenv OSTYPE "linux"
>setenv MACHTYPE "i386"
>setenv SHLVL "2"
>setenv PWD "/usr/local/ldm"
>setenv GROUP "ldm"
>setenv HOST "freshair"
>setenv REMOTEHOST "moist.atmos.washington.edu"
>setenv MANPATH "/opt/intel/compiler80/man:/usr/share/man:/usr/local/man:/usr/m
> an:/usr/X11R6/man"
>setenv PGI "/usr/pgi"
>setenv NCARG_ROOT "/usr/local/ncarg_pgi"
>setenv NCARG "/usr/local/ncarg_pgi"
>setenv CLASSPATH ".:/usr/local/ldm/classes:/usr/local/classes"
>setenv LD_LIBRARY_PATH "/opt/intel/compiler80/lib:/usr/pgi/linux86/lib"
>setenv INTEL_LICENSE_FILE "/opt/intel/compiler80/licenses:/opt/intel/licenses"
>setenv UDRESPATH "/usr/local/ldm/etc"
>setenv ULOG_FACILITY_OVERRIDE "7"
>setenv MCDATA "/home/data/mcidas"
>setenv MCPATH "/home/data/mcidas:/usr/local/ldm/mcidas/data:/usr/local/ldm/mci
> das/help"
>setenv MCGUI "/usr/local/ldm/mcidas/bin"
>setenv MCTABLE_READ "/home/data/mcidas/MCTABLE.TXT;/usr/local/ldm/mcidas/data/
> ADDESITE.TXT"
>setenv MCTABLE_WRITE "/home/data/mcidas/MCTABLE.TXT"
>setenv DISPLAY ":1"
>setenv TZ "GMT0"
>setenv LDMHOME "/usr/local/ldm"
>setenv LDMHOSTNAME "freshair.atmos.washington.edu"
>
>-- 
>David Ovens             e-mail: address@hidden
>Research Meteorologist    phone: (206) 685-8108
>Dept of Atm. Sciences      plan: Real-time MM5 forecasting for the
>Box 351640                        Pacific Northwest
>University of Washington          http://www.atmos.washington.edu/mm5rt
>Seattle, WA  98195               Weather Graphics and Loops
>                                  http://www.atmos.washington.edu/~ovens/loops
>
--
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publically 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.

>From address@hidden  Mon Jun 28 15:48:10 2004

re:  How did you get the set of environment variables in each case?

>The first file comes from these lines inside zlib2gif.pl 

>$index = index(`ps guxww | grep 'Xvfb :$display' | grep -v grep`, "Xvfb");
>$index2 = index(`ps guxww | grep 'Xvfb :$display' | grep -v grep`, "Xvfb");
>open(E,">$envfile");
>print E "index = $index\nindex2 = $index2\n";
>foreach $key (keys(%ENV)) {
>    print E sprintf "%30s -> %s\n",$key,$ENV{$key};
>}
>close E;
>
>which was activated by the following pqact.conf line
>
>NIMAGE   ^(satz/ch[0-9]/.*/(.*)/([12][0-9][0-9][0-9][01][0-9][0-3][0-9]) 
>([0-2][0-9][0-5][0-9])/(.*)/(.*km))/
>       PIPE    -close
>       local/gini/bin/zlib2gif.pl
>       /home/data/gempak/nport/IMAGE/\5/\6/\2/\2_\3_\4 \1
> 
>I should have sent this as the 'ldmadmin environment variables file output'
>which was taken by running a slightly modified ldmadmin program from
>the command line:
>
>Z=100
>TERM=xterm-r6
>PATH=/usr/local/ldm/bin:/bin:/usr/bin:/usr/sbin:/sbin:/usr/ucb:/usr/usb:/usr/etc:/etc:/opt/intel/compiler80/bin:.:/usr/local/ldm/bin:/usr/local/wx/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/hosts:/home/disk/damp/marka/wx/bin:/usr/local/bin:/usr/local/ncarg_pgi/bin:/usr/pgi/linux86/bin:/usr/local/ldm/mcidas/bin:/usr/local/ldm/local/bin:/usr/local/ldm/ldm-mcidas/bin:/usr/local/ldm/nawips/bin/linux:/usr/local/ldm/local/bin:/usr/local/bin:/usr/local/ldm/mcidas/bin
>HOME=/usr/local/ldm
>SHELL=/bin/tcsh
>USER=ldm
>LOGNAME=ldm
>MAIL=/var/mail/ldm
>HOSTTYPE=i386-linux
>VENDOR=intel
>OSTYPE=linux
>MACHTYPE=i386
>SHLVL=2
>PWD=/usr/local/ldm
>GROUP=ldm
>HOST=freshair
>REMOTEHOST=moist.atmos.washington.edu
>MANPATH=/opt/intel/compiler80/man:/usr/share/man:/usr/local/man:/usr/man:/usr/X11R6/man
>PGI=/usr/pgi
>NCARG_ROOT=/usr/local/ncarg_pgi
>NCARG=/usr/local/ncarg_pgi
>CLASSPATH=.:/usr/local/ldm/classes:/usr/local/classes
>LD_LIBRARY_PATH=/opt/intel/compiler80/lib:/usr/pgi/linux86/lib
>INTEL_LICENSE_FILE=/opt/intel/compiler80/licenses:/opt/intel/licenses
>UDRESPATH=/usr/local/ldm/etc
>ULOG_FACILITY_OVERRIDE=7
>MCDATA=/home/data/mcidas
>MCPATH=/home/data/mcidas:/usr/local/ldm/mcidas/data:/usr/local/ldm/mcidas/help
>MCGUI=/usr/local/ldm/mcidas/bin
>MCTABLE_READ=/home/data/mcidas/MCTABLE.TXT;/usr/local/ldm/mcidas/data/ADDESITE.TXT
>MCTABLE_WRITE=/home/data/mcidas/MCTABLE.TXT
>DISPLAY=:1
>TZ=GMT0
>LDMHOME=/usr/local/ldm
>LDMHOSTNAME=freshair.atmos.washington.edu

>-- 
>David Ovens             e-mail: address@hidden
>Research Meteorologist    phone: (206) 685-8108
>Dept of Atm. Sciences      plan: Real-time MM5 forecasting for the
>Box 351640                        Pacific Northwest
>University of Washington          http://www.atmos.washington.edu/mm5rt
>Seattle, WA  98195               Weather Graphics and Loops
>                                  http://www.atmos.washington.edu/~ovens/loops