Sponsored Content
Top Forums UNIX for Advanced & Expert Users Multiple processes write to log file at the same time Post 302456951 by casttree on Monday 27th of September 2010 02:44:19 AM
Old 09-27-2010
Multiple processes write to log file at the same time

If we have 3 process to write to same log file at the same time like below. will it cause the data outdated because the multiple process writing same time? It this a safe way to keep the log for multiple process?

p1 >> test.log &;
p2 >> test.log &;
p3 >> test.log &


Thanks,
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to log start/stop time of ALL processes

Hi all, I joined this forum today and this is my first question. I thank you all for viewing it. I will try to be brief. The OS: HP-UX B.11.11 U 9000/800 There are lot of cron scheduled perl scripts running on this server, which do different things at different time. Some of them process... (10 Replies)
Discussion started by: bluesky099
10 Replies

2. Shell Programming and Scripting

Multiple processes writing on the same file simultaneously

Hi All, I have encountered a problem,please help me. I have a script in which multiple processes are writing on to the same file . How should I stop this , I mean lock mechanism can be implemented or we can write the at different files and then concatenate the files. What would be a better... (1 Reply)
Discussion started by: Sayantan
1 Replies

3. UNIX for Advanced & Expert Users

Script to Extract time from log files and write to a excel

Can someone help me with writing a unix script for following requirement 1) I have a log file in which we have start time and end time (format: hh:mm:ss) Example: starting script on Thu Jun 5 20:50:52 Thu Jun 5 21:55:33 - Script Completed 2) I want to extract start time and end time of... (0 Replies)
Discussion started by: santosham
0 Replies

4. Shell Programming and Scripting

Script to Extract time from log files and write to a excel

Can someone help me with writing a unix script for following requirement 1) I have a log file in which we have start time and end time (format: hh:mm:ss) Example: starting script on Thu Jun 5 20:50:52 Thu Jun 5 21:55:33 - Script Completed 2) I want to extract start time and end time of... (0 Replies)
Discussion started by: santosham
0 Replies

5. UNIX for Dummies Questions & Answers

Script to Extract time from log files and write to a excel

Can someone help me with writing a unix script for following requirement 1) I have a log file in which we have start time and end time (format: hh:mm:ss) Example: starting script on Thu Jun 5 20:50:52 --------- Thu Jun 5 21:55:33 - Script Completed 2) I want to extract... (4 Replies)
Discussion started by: santosham
4 Replies

6. Programming

File access from multiple processes or threads?

Hi, Can anyone give me any idea when multiple processes access a file (like opening it, modifying it etc.) how can the synchronization can be done if they can access the same file at any time? How can this scenario is different from when multiple threads access a same file, modifying it etc- in... (7 Replies)
Discussion started by: sanzee
7 Replies

7. Shell Programming and Scripting

Multiple process write to same log file at the same time

If we have 3 process to write to same log file at the same time like below. will it cause the data outdated because the multiple process writing same time? It this a safe way to keep the log for multiple process? p1 >> test.log &; p2 >> test.log &; p3 >> test.log & Thanks, (5 Replies)
Discussion started by: casttree
5 Replies

8. Shell Programming and Scripting

Batch write multiple usb in same time

Hi there, I would write a bash script to format then create a range of folder (folder name is number) to a usb stick. for numbers in $(seq -w 001 999) do pause "Press any key to start" mkfs.vfat -F32 /dev/sdc1 mount /dev/sdc1 /media/usb mkdir /media/$numbers umount /dev/sdc1... (8 Replies)
Discussion started by: wayneliao38
8 Replies

9. Shell Programming and Scripting

Multi threading - running multiple processes at the same time

so i've been using this a lot in a lot of my scripts: ( columnA & columnAPID=$! & columnB & columnBPID=$! & columnC & columnCPID=$! &) & wait ${columnAPID} wait ${columnBPID} wait ${columnCPID} It seems to work as ive seen it dramatically reduce run time of my scripts. however, i'm... (5 Replies)
Discussion started by: SkySmart
5 Replies

10. UNIX for Beginners Questions & Answers

File write begin/end, recording time

Hello all, How can I find out the start and end of the writing file in the directory or recording time for writing file? I have a directory where small ~ 1*MB temporary files are written. After the end of the record, they are retrieved and erased. I can only find out that the files are... (4 Replies)
Discussion started by: mrAibo
4 Replies
Sendpage::KeesLog(3pm)					User Contributed Perl Documentation				    Sendpage::KeesLog(3pm)

NAME
Sendpage::KeesLog - implements a logging subsystem SYNOPSIS
$log=Sendpage::KeesLog->new(); $log->on(); $log->do('crit',"Something bad happened"); $log->reconfig($config); $log->do('debug',"I'm doing things"); $log->off(); $log->do('info',"Look at me, I'm writing to stderr now"); DESCRIPTION
This module is used in sendpage(1). BUGS
I need to write more docs for it. AUTHOR
Kees Cook <kees@outflux.net> SEE ALSO
perl(1), sendpage(1), Sendpage::KeesConf(3), Sendpage::Modem(3), Sendpage::PagingCentral(3), Sendpage::PageQueue(3), Sendpage::Page(3), Sendpage::Recipient(3), Sendpage::Queue(3) COPYRIGHT
Copyright 2000 Kees Cook. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.0 2008-01-03 Sendpage::KeesLog(3pm)
All times are GMT -4. The time now is 04:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy