This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Neil,
The problem is that the "mkdir" and "ln" actions are being performed almost
simultaneously because pqact(1) doesn't wait for EXEC actions to terminate
before continuing to the next entry.
The solution is to use the "-wait" option of EXEC in the "mkdir" entry. I.e.,
EXEC<tab>-wait mkdir -p data/gempak/nexrad/ALLNIDS/\5/\4
Alternatively, you could combine all three actions into one shell script that
was stored in, say, "~/util" (which would have to be in the LDM user's PATH
environment variable). This has the advantage of not requiring that all
pathnames and regular expressions be consonant.
> I would like to see if I can get pqact to create a symlink to a NIDS file
> after it has stored the NIDS file.
>
> NEXRAD ^SDUS[2357]. ....
> ([0-3][0-9])([0-2][0-9])([0-6][0-9]).*/p(N[013][QUSP])(...)
> STDIOFILE -close
> data/gempak/nexrad/NIDS/(\1:yyyy)(\1:mm)(\1:dd)/\5/\4/\4_(\1:yyyy)(\1:mm)\1_\2\3
>
> NEXRAD ^SDUS[2357]. ....
> ([0-3][0-9])([0-2][0-9])([0-6][0-9]).*/p(N[013][QUSP])(...)
> EXEC mkdir -p data/gempak/nexrad/ALLNIDS/\5/\4
>
> NEXRAD ^SDUS[2357]. ....
> ([0-3][0-9])([0-2][0-9])([0-6][0-9]).*/p(N[013][QUSP])(...)
> EXEC ln --symbolic --force
> data/gempak/nexrad/NIDS/(\1:yyyy)(\1:mm)(\1:dd)/\5/\4/\4_(\1:yyyy)(\1:mm)\1_\2\3
> data/gempak/nexrad/ALLNIDS/\5/\4/\4_(\1:yyyy)(\1:mm)\1_\2\3
>
> I found that I had to create the destination directories in ‘ALLNIDS’ first
> or I would get permission denied on the ln command.
> However, I found that I will get
>
> pqact[810] ERROR: Child 1591 exited with status 1
> pqact[810] ERROR: Deleting failed EXEC entry "ln --symbolic --force
> data/gempak/nexrad/NIDS/20160126/MRX/N1P/N1P_20160126_1759
> data/gempak/nexrad/ALLNIDS/MRX/N1P/N1P_20160126_1759”
>
> but I don’t get the error and indeed do get a hard link created without the
> ‘ln’ options ‘—symbolic —force’ (or alternatively -sf).
>
> What am I doing wrong here? What syntax should I be using in order to get a
> symlink instead of hardlink created?
>
> Currently this experiment is on a system where the links are created in the
> same filesystem as the nexrad files. But I will want to do this on a system
> where the destination directory for the symlinks are on a separate (ZFS)
> filesystem and thus will have to create symlinks.
>
> -Neil
Regards,
Steve Emmerson
Ticket Details
===================
Ticket ID: DIL-286118
Department: Support LDM
Priority: Normal
Status: Closed