12-10-2001
OK that clears it up a bit...
You pager/email-er shell script might include code like...
#!/bin/sh
if [ -f /tmp/myprog..LCK ]
then
exit 0
fi
echo $$ > /tmp/myprog..LCK
...
Do your paging and email stuff here
...
sleep 3600
rm -f /tmp/myprog..LCK
exit 0
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I want to do the foll steps:
1. Check if someone has a lock on my file1.
2. if file1 is locked by any other user
wait in a loop till another user releases lock
3. when lock released, lock file1.
4. do procesing (write) on file1.
5. processing complete. release lock on file1.
... (2 Replies)
Discussion started by: sunil_neha
2 Replies
2. Shell Programming and Scripting
hi Guys,
I just wondering how I can check and ensure a file is not locked by another process. I need to modify a file using sed but I need to ensure that is not being modified by another process at the same time. Thanks.
Harby. (2 Replies)
Discussion started by: hariza
2 Replies
3. Shell Programming and Scripting
I have a file named "suspected" with series of line like these :
{'protocol': 17, 'service': 'BitTorrent KRPC', 'server': '219.78.120.166', 'client_port': 52044, 'client': '10.64.68.44', 'server_port': 8291, 'time': 1226506312L, 'serverhostname': ''}
{'protocol': 17, 'service': 'BitTorrent... (3 Replies)
Discussion started by: rk4k
3 Replies
4. UNIX for Advanced & Expert Users
Hi,
I want to list out all files which are lock by some process.
ex- ~/critical
I want to list all files in critical directory which has been locked.
I need this very badly. Any suggestion highly appriciated.
Regards,
Ashok (1 Reply)
Discussion started by: ashokd001
1 Replies
5. UNIX for Dummies Questions & Answers
using OS X and the Terminal, I'd like to find all locked files in a specified directory, unlock them, and print a list of those files that were unlocked
how can I do this?
I'm familiar with chflags nouchg for unlocking one file but not familiar with unix enough to do what I'd like.
Thanks! (0 Replies)
Discussion started by: alternapop
0 Replies
6. Solaris
Hi Guys.
This is part of my filesystem structure :
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d0 47G 5.2G 42G 12% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% ... (2 Replies)
Discussion started by: aggadtech08
2 Replies
7. Shell Programming and Scripting
Dear community,
I've a continuos tcpdump on redhat that close the dumped file every 100000 captured packets.
To avoid disk full I would like to gzip the closed *.cap file. But how can I check if the file is currently opened by tcpdump and skip it from gzip?
Thanks!
EDIT: Just to post an... (9 Replies)
Discussion started by: Lord Spectre
9 Replies
8. UNIX for Dummies Questions & Answers
I am facing an Issue with a particular Unix Account ( ie a particular Userid) getting LOCKED everyday between 7:30am and 8:00am. The Password associated with this particular Account has been setup such that it should never Expire at all but it does LOCK the Account after more than 3 failed... (5 Replies)
Discussion started by: pchegoor
5 Replies
9. Shell Programming and Scripting
I was trying to read the file to create a table in SAS and I got error as follows while I read.
Resource is write-locked by another user. File
=/usr/sas/sas_config/Lev1/SASApp/StoredProcessServer/Logs/SASApp_STPServer_2015-09-29_tmp_18208.log. System Error Code =
0.
ERROR: File is in... (10 Replies)
Discussion started by: Ram Kumar_BE
10 Replies
10. Shell Programming and Scripting
Hi Experts,
I am beginner to shell scripting, I have a archive script which will connect to the FTP server and archive the files from FTP source location to FTP archive location.
Now the problem here is, the script working for few files and not working for few.I am facing the below error... (1 Reply)
Discussion started by: spidy
1 Replies
LEARN ABOUT OSF1
feedback
feedback(1) General Commands Manual feedback(1)
NAME
feedback - Generate an optimization feedback file using pixie and prof
SYNOPSIS
feedback [prof-options] [-o feedback-file] [-v] objfile [objfile-arguments]
OPTIONS
The feedback command accepts the following prof(1) options and any unambiguous abbreviations: -asm, -clock megahertz, -{e|E}xclude proce-
dure_name, -feedback filename, -heavy, -invocations, -lines, -merge filename, -numbers, -{o|O}nly procedure_name, -procedures, -quit n,
-testcoverage, -truecycles [0,1,2], -zero.
The feedback command ignores all other options in order to provide compatiblility with older versions of the feedback command. An
option argument following an option not recognized by this or older versions of the feedback command will be treated as the objfile
argument. Specifies the name of the feedback file. This can also be specified by the -feedback option of prof. You should use only
one of these options to specify a feedback file, not both. Causes the pixie, application, and prof commands to be printed as they
are invoked.
OPERANDS
Specifies the executable of the application for which a feedback file is to be generated. A pixie-instrumented version of this executable
will be executed with the current working directory and environment variables. The feedback file that is generated will reflect the behav-
ior of one execution of the instrumented objfile. Specify the arguments that will cause the behavior that you want to have optimized when
the compiler uses the feedback file.
DESCRIPTION
The feedback command invokes pixie to add profiling code to an object file. The object file generated by pixie is executed to obtain pro-
filing information. The feedback command then invokes prof to analyze the profiling information.
If the output of objfile needs to be redirected, but not the output of the feedback utility, the redirection characters need to have sh(1)
syntax and be within quotes. If objfile is multi-threaded, the LD_LIBRARY_PATH environment variable needs to include the current working
directory.
EXAMPLES
Send the profiling information to the standard output: $ feedback myprog Write a binary formatted performance profile to the file
myprog.feedback, which then helps a subsequent recompilation optimize the program: $ feedback -feedback myprog.feedback myprog $ cc -O
-feedback myprog.feedback -o myprog myprog.c
FILES
Object with profiling code. Generated by pixie. Basic block addresses. Generated by pixie. Basic block counts. Generated by
myprog.pixie.
Note: Run pixie and prof independently if alternative names are needed.
SEE ALSO
cc(1), pixie(5), prof(1)
feedback(1)