table of contents
condor_chirp(1) | General Commands Manual | condor_chirp(1) |
Name¶
condor_chirp Access - files or job ClassAd from an executing jobSynopsis¶
condor_chirp <Chirp-Command>Description¶
condor_chirp is not a command-line tool. condor_chirp is invoked by a Condor job, while the job is executing. It accesses files or job ClassAd attributes on the submit machine. Files can be read, written or removed. Job attributes can be read, and most attributes can be updated. When invoked by a Condor job, the command-line arguments describe the operation to be performed. Each of these arguments is described below within the section on Chirp Commands. Descriptions using the terms localand remoteare given from the point of view of the executing job. If the input file name for putor writeis a dash, condor_chirpuses standard input as the source. If the output file name for fetchis a dash, condor_chirpwrites to standard output instead of a local file. Jobs that use condor_chirpmust have the attribute WantIOProxy set to True in the job ClassAd. To do this, placeChirp Commands¶
fetch RemoteFileName LocalFileName- Copy the RemoteFileNamefrom the submit machine to the execute machine, naming it LocalFileName.
- Copy the LocalFileNamefrom the execute machine to the submit machine, naming it RemoteFileName. The optional -perm UnixPermargument describes the file access permissions in a Unix format; 660 is an example Unix format.
- The optional -mode modeargument is one or more of the following characters describing the RemoteFileNamefile: w , open for writing; a , force all writes to append; t , truncate before use; c , create the file, if it does not exist; x , fail if c is given and the file already exists.
- Remove the RemoteFileNamefile from the submit machine.
- Prints the named job ClassAd attribute to standard output.
- Sets the named job ClassAd attribute with the given attribute value.
- Appends Messageto the job's user log.
- Read Lengthbytes from RemoteFileName. Optionally, implement a stride by starting the read at offsetand reading lengthbytes with a stride of skipbytes.
- Write the contents of LocalFileNameto RemoteFileName. Optionally, start writing to the remote file at offsetand write lengthbytes with a stride of skipbytes.
- Delete the directory specified by RemotePath. If the optional -ris specified, recursively delete the entire directory.
- List the contents of the directory specified by RemotePath. If -lis specified, list all metadata as well.
- Get the user's current identity.
- Get the identity of RemoteHost.
- Create a hard link from OldRemotePathto NewRemotePath. If the optional -sis specified, create a symbolic link instead.
- Read the contents of the file defined by the symbolic link RemoteFileName.
- Get metadata for RemotePath. Examines the target, if it is a symbolic link.
- Get metadata for RemotePath. Examines the file, if it is a symbolic link.
- Get file system metadata for RemotePath.
- Check access permissions for RemotePath. Modeis one or more of the characters r , w , x , or f , representing read, write, execute, and existence, respectively.
- Change the permissions of RemotePathto UnixPerm. UnixPermdescribes the file access permissions in a Unix format; 660 is an example Unix format.
- Change the ownership of RemotePathto UIDand GID. Changes the target of RemotePath, if it is a symbolic link.
- Change the ownership of RemotePathto UIDand GID. Changes the link, if RemotePathis a symbolic link.
- Truncates RemoteFileNameto Lengthbytes.
- Change the access to AccessTimeand modification time to ModifyTimeof RemotePath.
Examples¶
To copy a file from the submit machine to the execute machine while the user job is running, runcondor_chirp fetch remotefile localfile To print to standard output the value of the Requirements expression from within a running job, run
condor_chirp get_job_attr Requirements Note that the remote (submit-side) directory path is relative to the submit directory, and the local (execute-side) directory is relative to the current directory of the running program. To append the word "foo" to a file called RemoteFile on the submit machine, run
echo foo | condor_chirp put -mode wa - RemoteFile To append the message "Hello World" to the user log, run
condor_chirp ulog "Hello World"
Exit Status¶
condor_chirpwill exit with a status value of 0 (zero) upon success, and it will exit with the value 1 (one) upon failure.Author¶
Condor Team, University of Wisconsin-MadisonCopyright¶
Copyright (C) 1990-2012 Condor Team, Computer Sciences Department, University of Wisconsin-Madison, Madison, WI. All Rights Reserved. Licensed under the Apache License, Version 2.0. See the Condor Version 7.8.2 Manualor http://www.condorproject.org/licensefor additional notices. condor-admin@cs.wisc.eduFebruary 2015 |