Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Re: (Ovid) Re: Writing to a file

by dragonchild (Archbishop)
on Aug 21, 2001 at 00:24 UTC ( [id://106355]=note: print w/replies, xml ) Need Help??


in reply to Re: (Ovid) Re: Writing to a file
in thread Writing to a file

There is flock, which would lock the file. But, each process has to request what the flock status is and I'm not very conversant on how that works.

Now, what you're saying is that you're going to run this script on separate workstations. Why not just run it, store the logfile locally, then have another script which gathers together all the data?

------
/me wants to be the brightest bulb in the chandelier!

Vote paco for President!

Replies are listed 'Best First'.
Re: Re: Re: (Ovid) Re: Writing to a file
by swngnmonk (Pilgrim) on Aug 21, 2001 at 01:20 UTC
    Something in the back of my mind is scratching me and telling me there might be problems with using flock over NFS (I assume you're using NFS if all these workstations are writing to the same file?)

    Another potential approach? how about saving files as:

    localtime().hostname.extension?

    That way, you can sort the files date/time order simply by doing an ls -l.

    Note - this would assume that all the machines are synchronized to the same clock.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://106355]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-25 23:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found