Sponsored Content
Top Forums Shell Programming and Scripting Log file is not getting created & unable to grep error from it Post 302434706 by ss_ss on Monday 5th of July 2010 01:28:17 AM
Old 07-05-2010
Thanks methyl, for your comments. Smilie
I incorporated them & now the log file is getting created.

Now I am not checking the ftp exit status instead just putting everything in one log file & greping the errors from it & putting in another log file.

Code:
/SYSTEM/custom/data/MNP/mpgsdev/log/ftp.log - Everything from ftp

/SYSTEM/custom/data/MNP/mpgsdev/log/error.log - Relevant errors from ftp

Need one more suggestion from you, once the files are ftp'ed i want them to move to filename.done in the same directory from where I am reading the files but this should only happen when there are no errors in ftp i.e. the file has actually ftp'ed then only it should be renamed to .done.

Could you please advice.

Thanks
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

want to cat the latest log file created

everytime a new logfile get created at certain interval of time and i want a simple shell script program which cat the lastest log file when manually excuted (1 Reply)
Discussion started by: vkandati
1 Replies

2. Shell Programming and Scripting

I want to get the file which created the error when the find command was run

I want to get the file which created the error when the find command was run ? I am wrote a script to mail a list of files whose file size is ge than 0 and returns 0 but wen it finds a folder with only empty files it exits as 1. i need to modify it so that the return for this is also 0 (but it... (1 Reply)
Discussion started by: guhas
1 Replies

3. Shell Programming and Scripting

autosys job error file not created

Hi All Something really weird happened, I have an autosys job: insert_job: CAT_LDN_BaseCorrs job_type: c command: $$(LDNFIRC)\CAT_LDN_BaseCorrs.bat -modeldate $$MODEL_DATE -cutdate $$CUT_DATE permission: gx, mx, wx description: "Rerun=0;625;#CAT_Autosys" std_out_file:... (0 Replies)
Discussion started by: evilsmile2004
0 Replies

4. Shell Programming and Scripting

Count number of Nodes created and write it to a Log file

Dear Experts, I have to count the number of AddressRecords formed in bbc.xml file using unix script file. For example: for below pasted file, I need to write an output to a log file as "No. of Address Records Created=4". Snippet of bbc.xml:- <?xml version="1.0" encoding="UTF-8" ?> -... (1 Reply)
Discussion started by: phani333
1 Replies

5. Shell Programming and Scripting

Parsing Log File Based on Date & Error

I'm still up trying to figure this out and it is driving me nuts. I have a log file which has a basic format of this... 2010-10-10 22:25:42 Init block 'UA Deployment Date': Dynamic refresh of repository scope variables has failed. The ODBC function has returned an error. The database... (4 Replies)
Discussion started by: k1ko
4 Replies

6. UNIX for Dummies Questions & Answers

Unable to copy file using SCP (Input/output & Permission denied error)

Hi, I am facing issue while using scp. Source & target machines are Linux & HP-UX respectively. On target machine, if I fire the following command, I get error: Now if I try scp on another file, which is on the same source machine, it works fine. All directories and subdirectories... (2 Replies)
Discussion started by: Technext
2 Replies

7. Solaris

Unable to mount ext4 filesystem (created from Ubuntu) in Solaris 11

Hello everyone, I am trying to mount an ext4 filesystem which I created from Ubuntu. But mount command fails saying: prakhar@Solaris:~$ sudo mount /dev/dsk/c10t0d0p1 /mnt Password: mount: /dev/dsk/c10t0d0p1 is not this fstype And I also tried this: prakhar@Solaris:~$ fstyp... (6 Replies)
Discussion started by: Prakhar Mishra
6 Replies

8. Shell Programming and Scripting

Need Script to ZIP/SAVE & then DELETE Log file & send a mail conformation for any error

ENVIROMENT Linux: RHEL 6.4 Log Path: /usr/iplanet/servers/https-company/logs Log Format: user.log.03-15-2015 I have log4j log rotation enabled rotating files on a daily basis. The rotated logs are NOT compressed & are taking up too much space. I need a script that will run daily that... (1 Reply)
Discussion started by: admin_job_admin
1 Replies

9. UNIX for Beginners Questions & Answers

Print Error in Console and both Error & Output in Log file - UNIX

I am writing a shell script with 2 run time arguments. During the execution if i got any error, then it needs to redirected to a error file and in console. Also both error and output to be redirected to a log file. But i am facing the below error. #! /bin/sh errExit () { errMsg=`cat... (1 Reply)
Discussion started by: sarathy_a35
1 Replies

10. Shell Programming and Scripting

Unable to grep using wildcard in a file.

I wish to check if my file has a line that does not start with '#' and has 1. Listen and 2. 443 echo "Listen 443" > test.out grep 'Listen *443' test.out | grep -v '#' Listen 443 The above worked fine but when the entry changes to the below the grep fails... (2 Replies)
Discussion started by: mohtashims
2 Replies
Debugging Plugin(3)						 globus ftp client					       Debugging Plugin(3)

NAME
Debugging Plugin - Defines #define GLOBUS_FTP_CLIENT_DEBUG_PLUGIN_MODULE (&globus_i_ftp_client_debug_plugin_module) Functions globus_result_t globus_ftp_client_debug_plugin_init (globus_ftp_client_plugin_t *plugin, FILE *stream, const char *text) globus_result_t globus_ftp_client_debug_plugin_destroy (globus_ftp_client_plugin_t *plugin) Detailed Description The FTP Debugging plugin provides a way for the user to trace FTP protocol messages which occur while the GridFTP client library processes an FTP operation. This may be useful for debugging FTP configuration problems. When this plugin is used for a GridFTP Client operation, information will be printed to the file stream associated with the plugin when a user begins an operation, for all data buffers which pass through while handling a data transfer, and for all protocol messages which are sent and received. Example Usage: The following example illustrates a typical use of the debug plugin. In this case, we configure a plugin instance to output log messages preceded by the process name and pid to a file named gridftp.log. int main(int argc, char *argv[]) { globus_ftp_client_plugin_t restart_plugin; globus_ftp_client_handleattr_t handleattr; globus_ftp_client_handle_t handle; FILE * log; char text[256]; /* Activate the necessary modules */ globus_module_activate(GLOBUS_FTP_CLIENT_MODULE); globus_module_activate(GLOBUS_FTP_CLIENT_DEBUG_PLUGIN_MODULE); /* Configure plugin to show custom text, and send plugin data to * a custom log file */ log = fopen('gridftp.log', 'a'); sprintf(text, '%s:%ld', argv[0], (long) getpid()); globus_ftp_client_debug_plugin_init(&debug_plugin, log, text); /* Set up our client handle to use the new plugin */ globus_ftp_client_handleattr_init(&handleattr); globus_ftp_client_handleattr_add_plugin(&handleattr, &debug_plugin); globus_ftp_client_handle_init(&handle, &handleattr); /* As this get is processed, data will be appended to our gridftp.log * file */ globus_ftp_client_get(&handle, 'ftp://ftp.globus.org/pub/globus/README', GLOBUS_NULL, GLOBUS_NULL, callback_fn, GLOBUS_NULL); } Define Documentation #define GLOBUS_FTP_CLIENT_DEBUG_PLUGIN_MODULE (&globus_i_ftp_client_debug_plugin_module) Module descriptor. Function Documentation globus_result_t globus_ftp_client_debug_plugin_init (globus_ftp_client_plugin_t *plugin, FILE *stream, const char *text) Initialize an instance of the GridFTP debugging plugin This function will initialize the debugging plugin-specific instance data for this plugin, and will make the plugin usable for ftp client handle attribute and handle creation. Parameters: plugin A pointer to an uninitialized plugin. The plugin will be configured as a debugging plugin, with the default of sending debugging messages to stderr. stream text Returns: This function returns an error if o plugin is null See also: globus_ftp_client_debug_plugin_destroy(), globus_ftp_client_handleattr_add_plugin(), globus_ftp_client_handleattr_remove_plugin(), globus_ftp_client_handle_init() globus_result_t globus_ftp_client_debug_plugin_destroy (globus_ftp_client_plugin_t *plugin) Destroy an instance of the GridFTP debugging plugin This function will free all debugging plugin-specific instance data from this plugin, and will make the plugin unusable for further ftp handle creation. Existing FTP client handles and handle attributes will not be affected by destroying a plugin associated with them, as a local copy of the plugin is made upon handle initialization. Parameters: plugin A pointer to a GridFTP debugging plugin, previously initialized by calling globus_ftp_client_debug_plugin_init() Returns: This function returns an error if o plugin is null o plugin is not a debugging plugin See also: globus_ftp_client_debug_plugin_init(), globus_ftp_client_handleattr_add_plugin(), globus_ftp_client_handleattr_remove_plugin(), globus_ftp_client_handle_init() Author Generated automatically by Doxygen for globus ftp client from the source code. Version 7.3 Mon Apr 30 2012 Debugging Plugin(3)
All times are GMT -4. The time now is 11:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy