Sponsored Content
Full Discussion: Help in background process
Top Forums Shell Programming and Scripting Help in background process Post 302148862 by chella on Tuesday 4th of December 2007 12:58:06 AM
Old 12-04-2007
Quote:
Originally Posted by Smiling Dragon
It sounds like the two functions are logging to the same logfile?
If so, make sure both are using >> rather than > so the entries get interleaved.

Alternativly, give them different logs to write to.
Thanks for the reply.

I don't have any problem in logging into same file. But the background process fails to log the information in its log file when I have a foreground process running which logs the information in different file. I want to make clear that the foreground and background process are not logging the information in the same file.
Main.ksh - Main_ddmmyy(Foreground)
Sub.ksh - Sub_ddmmyy(background process)
New.ksh - Main_ddmmyy(Foreground)
The problem is with logging the sub_ddmmyy file.

Please suggest me on it.

Thanks in advance.
Chella
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

capture the process id when starting a background process

Hello all, How do I start a background process and save the process id to a file on my system. For example %wait 5 & will execute and print the process id. I can't figure out how to get it to a file. I've tried: > filename 0>filename 1>filename. Any assistance is most appreciated. Thanks, Jim... (10 Replies)
Discussion started by: jleavitt
10 Replies

2. Shell Programming and Scripting

process in background

Hi Guys, I am facing some weird problem with my shell script. The script shows up a menu and for every ontion internally calls a shell script which start/stop various servers. When I am using '&' while calling the internal shell script so that the server run in the background. For exiting... (1 Reply)
Discussion started by: agoyal
1 Replies

3. Shell Programming and Scripting

background process

Hi, In shell script when I use script1 >> filelog the echo statments of script1 gets printed in the filelog but when I try to run script in background i.e, script1 & >> filelog nothing gets printed in the filelog. Anybody knows whats going on here. thanks (3 Replies)
Discussion started by: k_oops9
3 Replies

4. UNIX for Dummies Questions & Answers

background process

How, can I hide background process's output? (5 Replies)
Discussion started by: zylwyz
5 Replies

5. Red Hat

Background process

If I run a process in the back ground like find . -name "abc" & after the process is complete we get a msg like + Done find . -name "abc" & Is it possible to redirect this msg to /dev/null Thanks for your help (1 Reply)
Discussion started by: Ujan
1 Replies

6. UNIX for Dummies Questions & Answers

Background Process

I need to submit a script that will continue to run after logging out and after a reboot or shutdown. I entered the following: nohup script & The script continues to run in the background after logging off the system but is killed after a reboot or shutdown. Any help would be greatly... (1 Reply)
Discussion started by: powwm
1 Replies

7. UNIX for Dummies Questions & Answers

Script to start background process and then kill process

What I need to learn is how to use a script that launches background processes, and then kills those processes as needed. The script successfully launches the script. But how do I check to see if the job exists before I kill it? I know my problem is mostly failure to understand parameter... (4 Replies)
Discussion started by: holocene
4 Replies

8. AIX

Background process

how to check the process running in background? how can i run a process in background? pls explain with commands (1 Reply)
Discussion started by: udtyuvaraj
1 Replies

9. Shell Programming and Scripting

How to put FTP process as a background process/job in perl?

Hi, I am using net::ftp for transferring files now i am trying in the same Linux server as a result ftp is very fast but if the server is other location (remote) then the file transferred will be time consuming. So i want try putting FTP part as a background process. I am unaware how to do... (5 Replies)
Discussion started by: vanitham
5 Replies

10. Shell Programming and Scripting

Make background process interact with fg process

Hi, I have written a menu driven shell script in which as per the choice, I run the another script on background. For eg: 1. get info 2)process info 3)modify info All the operations have different scripts which i schedule in background using &. However I wish to display the error... (0 Replies)
Discussion started by: ashima jain
0 Replies
tntnet.properties(7)						Tntnet users guide					      tntnet.properties(7)

NAME
tntnet.properties - configuration-file for tntnet (8) DESCRIPTION
tntnet(8) uses cxxtools for logging and is configured in the configuration-file tntnet.properties. Because cxxtools is a meta-logging-library, which can be compiled to use different logging-libraries, the content of tntnet.properties is dependend of the underlying logging-library. Cxxtool has a built-in logging-library as default, which is documented here. format The format of tntnet.properties is line-based. A line consists of a variable-name followed by a equals-symbol and a value. Lines, which does not follow this format and lines, which start with a hash (#), are ignored. It is recomended to prefix non-empty comments with a hash to make clear, that it is a comment. level The logging-library has 5 levels for logging: fatal, error, warn, info and debug. Fatal has the highers priority and "debug" the lowest. category Each log-message has a category. Categories are hierarchical. Names of subcategories are devided by a dot. log-message Each log-message has a level and a category. If the level of the message is higher or equal to the level of the category, the message is logged. To assign a level to a category put a line with the word "logger", a dot, the category, the symbol "=" and the category into tnt- net.properties. Only the first letter of the value is checked and case is ignored, so e.g. info can be specified with INFO, info, I or even ixxxx. If no level is specified for the current category, the upper category is checked. If nothing is found, the default level is used. The default level is specified by the variable "rootLogger". If no rootLogger is specified, the level error is used. destination If nothing else is specified, log-messages are printed to standard-output. To redirect output to a file, specify the filename with the variable file. The cxxtools-logger can limit the size of the log-file by rolling log-files. If the limit is reached, the current file is renamed by appending ".1" to it. If there is already a file with that name, this file is renamed to "*.2" and so on, until the maximum backupfile limit is reached. The oldest file is deleted then. To specify the maximum file size, set the variable maxfilesize. The value specified here can be postfixed with 'k' or 'M' to specify kBytes or MBytes. The maximum fileindex backed up is set with maxbackupindex. Since writing the file can take some time, output can be buffered and written physically in regular intervals. The interval is specified in milliseconds with the variable flushdelay. The logging-library starts a background-thread, which flushes the buffer regulary. This improves logging-speed significantly. The problem is, that a background-thread is used, which consumes resources and if the program crashes, the most recent log-messages might not be in the file. Log-messages can be sent to another host in the network with udp. This is done by specifying a hostname and a port with the variable host. The value must be a hostname, followed by a ':' and a port. Each log-message is sent in a single udp-message. EXAMPLES
logging to standard-output: rootLogger=INFO logger.tntnet=WARN logging to a file with rolling file and a background-flusher: rootLogger=INFO logger.tntnet=WARN file=tntnet.log maxfilesize=1MB maxbackupindex=10 flulshdelay=100 logging to another host rootLogger=INFO logger.tntnet=WARN host=pluto.tntnet.org:1234 AUTHOR
This manual page was written by Tommi Makitalo <tommi@tntnet.org>. SEE ALSO
tntnet(8) Tntnet 2006-08-13 tntnet.properties(7)
All times are GMT -4. The time now is 10:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy