11-19-2013
Quote:
Originally Posted by
acascianelli
I have a Linux server that runs a Java based app that automates file transfers for a large number of users/systems. I'm running into a problem with the scripts for this automation program in that when I have a function in the script generate an output file, and the next line requires that file to be present; the script will fail because the file hasn't made it to disk yet.
sync is irrelevant -- a file in cache is as good as a file on disk as far as programs are concerned. The file must really be
missing, even from cache, a sync won't force it to appear. It's the wait that does the trick either way.
Both
sync and short delays are liable to fail I think -- particularly when the system is busy and longer delays might happen. Either correct the java program so it doesn't return until the file actually exists, or poll for the file's existence every so often.
Quote:
My question is, could there be any undesired side affects to running the 'sync' command so often on a system?
Reduced disk performance since its busy doing more writes all the time. It may end up writing more than it would have otherwise, too.
Last edited by Corona688; 11-19-2013 at 12:24 PM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Dear Frenz,
Is there any possbility to get the list of previous commands that
i executed in SCO-Unix and reexecute them as required.
Like Doskey in DOS
Please help me
Regards
myuser (3 Replies)
Discussion started by: myuser
3 Replies
2. What is on Your Mind?
to start, i will continue to be an active member of this community and still love computers and unix based operating systems.
ive been busy recently with a pretty big project, not involving unix :p
one of my other hobbies is automobiles. i have a 1986.5 toyota supra, now if anyone here has... (8 Replies)
Discussion started by: norsk hedensk
8 Replies
3. SuSE
Sir,
I using the following commands in a file (part of a bigger script):
#!/bin/bash
cd /opt/oracle/bin
ls -lt | tail -1 | awk '{print $6}' >> /tmp/ramb.out
If I run this from the command prompt the result is:
2007-05-16
if I run it as a cron job then... (5 Replies)
Discussion started by: rajranibl
5 Replies
4. Solaris
Hi all....I have a Sun Ultra2 that I want to use with my PC monitor. I have purchased an adapter that does not work and I was told I need to change my video card setting (if I can) to Separate Sync.....my Monitor product number ends in 1343......I am running SunOS 5.7 ......anyone have any ideas?
... (0 Replies)
Discussion started by: psantinello
0 Replies
5. Solaris
Deall All,
I have facing some problem. I have a Sun 4500 Server at the customer place. Now the server is not booting mean's once the server is coming up it is automatically rebooting. As this is the critical server for the customer that is use for production .
Can this be solved by... (10 Replies)
Discussion started by: sudhansu
10 Replies
6. UNIX for Dummies Questions & Answers
I'm reading about debugging aids in bash and have come across the set command. It says in my little book that an addition to typing
set
you can also use them "on the command line when running a script..." and it lists this in a small table:
set -o option Command Line... (5 Replies)
Discussion started by: Straitsfan
5 Replies
7. Linux
I have Red hat Linux server. There are 14 NFS shares which are coming from NAS. There are so many messages filling /var/log/messages, which seems like some NFS logging is enables somewhere, but I am not able to figure it out. Every few minutes, it will filll my /var (which is part of root) to 100%... (2 Replies)
Discussion started by: solaris_1977
2 Replies
8. Shell Programming and Scripting
Hi,
Is there any specific command to use to check only say Running jobs via autorep or similar command for Autosys? (0 Replies)
Discussion started by: sidnow
0 Replies
9. AIX
exec(): 0509-036 Cannot load program /usr/opt/freeware/bin/rpm because of the following errors:
0509-022 Cannot load module /opt/freeware/lib/libintl.a(libintl.so.1).
0509-150 Dependent module /opt/freeware/lib/libiconv.a(shr4.o) could not be loaded.
0509-152 Member... (4 Replies)
Discussion started by: Ohmkar
4 Replies
10. UNIX for Beginners Questions & Answers
Hello Forum,
I'm making very good progress on my report thanks to the very helpful people on this forum. I've been able to successfully create my report for my Red Hat servers. But I do have a few ubuntu servers in the mix and I'd like to capture some data from them when an ssh connection is... (8 Replies)
Discussion started by: greavette
8 Replies
LEARN ABOUT MOJAVE
jstack
jstack(1) General Commands Manual jstack(1)
NAME
jstack - stack trace
SYNOPSIS
jstack [ option ] pid
jstack [ option ] executable core
jstack [ option ] [server-id@]remote-hostname-or-IP
DESCRIPTION
jstack prints Java stack traces of Java threads for a given Java process or core file or a remote debug server. For each Java frame, the
full class name, method name, 'bci' (byte code index) and line number, if available, are printed. With the -m option, jstack prints both
Java and native frames of all threads along with the 'pc' (program counter). For each native frame, the closest native symbol to 'pc', if
available, is printed. C++ mangled names are not demangled. To demangle C++ names, the output of this command may be piped to c++filt.
NOTE - This utility is unsupported and may or may not be available in future versions of the J2SE SDK. jstack is not currently available
on Windows platforms or on the Linux Itanium platform.
PARAMETERS
Options are mutually exclusive. Option, if used, should follow immediately after the command name.
pid process id for which the stacktrace is to be printed. The process must be a Java process. To get a list of Java processes
running on a machine, jps may be used.
executable Java executable from which the core dump was produced.
core core file for which the stack trace is to be printed.
remote-hostname-or-IP
remote debug server's (see jsadebugd) hostname or IP address.
server-id optional unique id, if multiple debug servers are running on the same remote host.
OPTIONS
-m prints mixed mode (both Java and native C/C++ frames) stack trace.
-h Prints a help message.
-help Prints a help message.
SEE ALSO
pstack(1) c++filt(1) jps(1) jsadebugd(1)
KNOWN BUGS
Mixed mode stack trace, the -m option, does not work with the remote debug server.
13 June 2004 jstack(1)